Microchip® Advanced Software Framework

nmsdio.c File Reference

This module contains WILC SDIO protocol bus APIs implementation.

Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.

Macros

#define N_FAIL   0
 
#define N_OK   1
 
#define N_RESET   -1
 
#define N_RETRY   -2
 
#define NMI_INTR_ENABLE   (NMI_INTR_REG_BASE)
 
#define NMI_INTR_REG_BASE   (NMI_PERIPH_REG_BASE+0xa00)
 
#define NMI_PERIPH_REG_BASE   0x1000
 
#define NMI_PIN_MUX_0   (NMI_PERIPH_REG_BASE + 0x408)
 
#define SDIO_ALGN_USE_STATIC_BUFFER
 
#define WILC_SDIO_BLOCK_SIZE   512
 

Functions

sint8 nm_sdio_deinit (void)
 
sint8 nm_sdio_init (void)
 Initialize the SDIO. More...
 
sint8 nm_sdio_read_block (uint32 u32Addr, uint8 *puBuf, uint16 u16Sz)
 
uint32 nm_sdio_read_reg (uint32 u32Addr)
 
sint8 nm_sdio_read_reg_with_ret (uint32 u32Addr, uint32 *pu32RetVal)
 
sint8 nm_sdio_write_block (uint32 u32Addr, uint8 *puBuf, uint16 u16Sz)
 
sint8 nm_sdio_write_reg (uint32 u32Addr, uint32 u32Val)
 
static int sdio_int_enable (void)
 
static int sdio_read (uint32_t addr, uint8_t *buf, uint32_t size)
 
static int sdio_read_reg (uint32_t addr, uint32_t *data)
 
static int sdio_set_func0_block_size (uint32_t block_size)
 
static int sdio_set_func0_csa_address (uint32_t adr)
 
static int sdio_set_func1_block_size (uint32_t block_size)
 
static int sdio_write (uint32_t addr, uint8_t *buf, uint32_t size)
 
static int sdio_write_reg (uint32_t addr, uint32_t data)
 

#define N_FAIL   0
#define N_OK   1
#define N_RESET   -1
#define N_RETRY   -2
#define NMI_INTR_ENABLE   (NMI_INTR_REG_BASE)

Referenced by sdio_int_enable().

#define NMI_INTR_REG_BASE   (NMI_PERIPH_REG_BASE+0xa00)
#define NMI_PERIPH_REG_BASE   0x1000
#define NMI_PIN_MUX_0   (NMI_PERIPH_REG_BASE + 0x408)

Referenced by sdio_int_enable().

#define SDIO_ALGN_USE_STATIC_BUFFER
#define WILC_SDIO_BLOCK_SIZE   512

sint8 nm_sdio_deinit ( void  )

References M2M_SUCCESS.

Referenced by nm_drv_init().

sint8 nm_sdio_read_block ( uint32  u32Addr,
uint8 puBuf,
uint16  u16Sz 
)

References sdio_read().

Referenced by p_nm_read_block().

uint32 nm_sdio_read_reg ( uint32  u32Addr)

References sdio_read_reg().

Referenced by nm_read_reg().

sint8 nm_sdio_read_reg_with_ret ( uint32  u32Addr,
uint32 pu32RetVal 
)

References sdio_read_reg().

Referenced by nm_read_reg_with_ret().

sint8 nm_sdio_write_block ( uint32  u32Addr,
uint8 puBuf,
uint16  u16Sz 
)

References sdio_write().

Referenced by p_nm_write_block().

sint8 nm_sdio_write_reg ( uint32  u32Addr,
uint32  u32Val 
)

References sdio_write_reg().

Referenced by nm_write_reg().

static int sdio_int_enable ( void  )
static

interrupt pin mux select

interrupt enable

References M2M_ERR, M2M_ERR_INIT, M2M_SUCCESS, NMI_INTR_ENABLE, NMI_PIN_MUX_0, sdio_read_reg(), and sdio_write_reg().

Referenced by nm_sdio_init().