LPCOpen Platform for LPC18XX/43XX microcontrollers: C:/w/lpcopen_docs/software/lpc_core/lpc_chip/chip_18xx_43xx/sdio_18xx_43xx.c File Reference

| LPCOpen Platform for LPC18XX/43XX microcontrollers 18XX43XX LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Functions | Variables
sdio_18xx_43xx.c File Reference
`#include "chip.h"`

Go to the source code of this file.

## Macros
#define | SDIO_CMD_INT_MSK 0xA146 /* Interrupts to be enabled for CMD */
#define | SDIO_DATA_INT_MSK 0xBE88 /* Interrupts to enable for data transfer */
#define | SDIO_CARD_INT_MSK (1UL << 16) /* SDIO Card interrupt */

## Functions
static int | SDIO_Card_SetVoltage (LPC_SDMMC_T *pSDMMC)
static int | SDIO_CARD_SetRCA (LPC_SDMMC_T *pSDMMC)
static int | SDIO_Card_SetMode (LPC_SDMMC_T *pSDMMC, uint32_t clk, int mode_4bit)
int | SDIO_Card_SetBlockSize (LPC_SDMMC_T *pSDMMC, uint32_t func, uint32_t blkSize)
| Sets the block size of a given function. More...
uint32_t | SDIO_Card_GetBlockSize (LPC_SDMMC_T *pSDMMC, uint32_t func)
| Gets the block size of a given function. More...
int | SDIO_Card_WriteData (LPC_SDMMC_T *pSDMMC, uint32_t func, uint32_t dest_addr, const uint8_t *src_addr, uint32_t size, uint32_t flags)
| Writes stream or block of data to the SDIO card [Using CMD53]. More...
int | SDIO_Card_ReadData (LPC_SDMMC_T *pSDMMC, uint32_t func, uint8_t *dest_addr, uint32_t src_addr, uint32_t size, uint32_t flags)
| Reads stream or block of data from the SDIO card [Using CMD53]. More...
int | SDIO_Card_EnableInt (LPC_SDMMC_T *pSDMMC, uint32_t func)
| Enable SDIO interrupt for a given function. More...
int | SDIO_Card_DisableInt (LPC_SDMMC_T *pSDMMC, uint32_t func)
| Disable SDIO interrupt for a given function. More...
int | SDIO_Card_Init (LPC_SDMMC_T *pSDMMC, uint32_t freq)
| Initialize the SDIO card. More...
int | SDIO_Write_Direct (LPC_SDMMC_T *pSDMMC, uint32_t func, uint32_t addr, uint32_t data)
| Write 8-Bit register from SDIO register space. More...
int | SDIO_WriteRead_Direct (LPC_SDMMC_T *pSDMMC, uint32_t func, uint32_t addr, uint32_t *data)
| Write 8-Bit register from SDIO register space and read the register back. More...
int | SDIO_Read_Direct (LPC_SDMMC_T *pSDMMC, uint32_t func, uint32_t addr, uint32_t *data)
| Read an 8-Bit register from SDIO register space. More...
void | SDIO_Setup_Callback (LPC_SDMMC_T *pSDMMC, void(*wake_evt)(LPC_SDMMC_T *pSDMMC, uint32_t event, void *arg), uint32_t(*wait_evt)(LPC_SDMMC_T *pSDMMC, uint32_t event, void *arg))
| Setup SDIO wait and wakeup callbacks. More...
uint32_t | SDIO_Send_Command (LPC_SDMMC_T *pSDMMC, uint32_t cmd, uint32_t arg)
| Sends a command to the SDIO Card [Example CMD52]. More...
void | SDIO_Handler (LPC_SDMMC_T *pSDMMC)
| SDIO Event handler [Should be called from SDIO interrupt handler]. More...

## Variables
struct {
void(* wake_evt )(LPC_SDMMC_T *pSDMMC, uint32_t event, void *arg)
uint32_t(* wait_evt )(LPC_SDMMC_T *pSDMMC, uint32_t event, void *arg)
uint32_t flag
uint32_t response [4]
int fnum
uint16_t blkSz [8]
sdif_device sdev
} | sdio_context
struct {
void(* wake_evt )(LPC_SDMMC_T *pSDMMC, uint32_t event, void *arg)
uint32_t(* wait_evt )(LPC_SDMMC_T *pSDMMC, uint32_t event, void *arg)
uint32_t flag
uint32_t response [4]
int fnum
uint16_t blkSz [8]
sdif_device sdev
} | sdioif = &sdio_context

## Macro Definition Documentation

#define SDIO_CARD_INT_MSK (1UL << 16) /* SDIO Card interrupt */

Definition at line 40 of file sdio_18xx_43xx.c.

#define SDIO_CMD_INT_MSK 0xA146 /* Interrupts to be enabled for CMD */

Definition at line 38 of file sdio_18xx_43xx.c.

#define SDIO_DATA_INT_MSK 0xBE88 /* Interrupts to enable for data transfer */

Definition at line 39 of file sdio_18xx_43xx.c.

## Function Documentation

static int SDIO_Card_SetMode | ( | LPC_SDMMC_T * | pSDMMC,
|  | uint32_t | clk,
|  | int | mode_4bit
| ) |  |
| static

Definition at line 136 of file sdio_18xx_43xx.c.

static int SDIO_CARD_SetRCA | ( | LPC_SDMMC_T * | pSDMMC | ) |
| static

Definition at line 109 of file sdio_18xx_43xx.c.

static int SDIO_Card_SetVoltage | ( | LPC_SDMMC_T * | pSDMMC | ) |
| static

Definition at line 62 of file sdio_18xx_43xx.c.

## Variable Documentation

uint16_t blkSz[8]

Definition at line 49 of file sdio_18xx_43xx.c.

uint32_t flag

Definition at line 46 of file sdio_18xx_43xx.c.

int fnum

Definition at line 48 of file sdio_18xx_43xx.c.

uint32_t response[4]

Definition at line 47 of file sdio_18xx_43xx.c.

sdif_device sdev

Definition at line 50 of file sdio_18xx_43xx.c.

struct { ... } sdio_context

struct { ... } * sdioif

uint32_t(* wait_evt)(LPC_SDMMC_T *pSDMMC, uint32_t event, void *arg)

Definition at line 45 of file sdio_18xx_43xx.c.

void(* wake_evt)(LPC_SDMMC_T *pSDMMC, uint32_t event, void *arg)

Definition at line 44 of file sdio_18xx_43xx.c.