LPCOpen Platform for LPC18XX/43XX microcontrollers  18XX43XX
LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers
Macros | Functions | Variables
sdmmc_18xx_43xx.c File Reference
#include "chip.h"
#include "string.h"

Go to the source code of this file.

Macros

#define SD_INT_ERROR
 

Functions

static int32_t sdmmc_execute_command (LPC_SDMMC_T *pSDMMC, uint32_t cmd, uint32_t arg, uint32_t wait_status)
 
static int32_t prv_card_acquired (void)
 
static uint32_t prv_get_bits (int32_t start, int32_t end, uint32_t *data)
 
static void prv_process_csd (LPC_SDMMC_T *pSDMMC)
 
static int32_t prv_set_trans_state (LPC_SDMMC_T *pSDMMC)
 
static int32_t prv_set_card_params (LPC_SDMMC_T *pSDMMC)
 
int32_t Chip_SDMMC_GetState (LPC_SDMMC_T *pSDMMC)
 Get card's current state (idle, transfer, program, etc.) More...
 
uint32_t Chip_SDMMC_Acquire (LPC_SDMMC_T *pSDMMC, mci_card_struct *pcardinfo)
 Function to enumerate the SD/MMC/SDHC/MMC+ cards. More...
 
uint64_t Chip_SDMMC_GetDeviceSize (LPC_SDMMC_T *pSDMMC)
 Get the device size of SD/MMC card (after enumeration) More...
 
int32_t Chip_SDMMC_GetDeviceBlocks (LPC_SDMMC_T *pSDMMC)
 Get the number of device blocks of SD/MMC card (after enumeration) Since Chip_SDMMC_GetDeviceSize is limited to 32 bits cards with greater than 2 GBytes of data will not be correct, in such cases users can use this function to get the size of the card in blocks. More...
 
int32_t Chip_SDMMC_ReadBlocks (LPC_SDMMC_T *pSDMMC, void *buffer, int32_t start_block, int32_t num_blocks)
 Performs the read of data from the SD/MMC card. More...
 
int32_t Chip_SDMMC_WriteBlocks (LPC_SDMMC_T *pSDMMC, void *buffer, int32_t start_block, int32_t num_blocks)
 Performs write of data to the SD/MMC card. More...
 

Variables

static mci_card_structg_card_info
 

Macro Definition Documentation

#define SD_INT_ERROR
Value:

Definition at line 43 of file sdmmc_18xx_43xx.c.

Function Documentation

static int32_t prv_card_acquired ( void  )
static

Definition at line 149 of file sdmmc_18xx_43xx.c.

static uint32_t prv_get_bits ( int32_t  start,
int32_t  end,
uint32_t *  data 
)
static

Definition at line 156 of file sdmmc_18xx_43xx.c.

static void prv_process_csd ( LPC_SDMMC_T pSDMMC)
static

Definition at line 173 of file sdmmc_18xx_43xx.c.

static int32_t prv_set_card_params ( LPC_SDMMC_T pSDMMC)
static

Definition at line 275 of file sdmmc_18xx_43xx.c.

static int32_t prv_set_trans_state ( LPC_SDMMC_T pSDMMC)
static

Definition at line 239 of file sdmmc_18xx_43xx.c.

static int32_t sdmmc_execute_command ( LPC_SDMMC_T pSDMMC,
uint32_t  cmd,
uint32_t  arg,
uint32_t  wait_status 
)
static

Definition at line 56 of file sdmmc_18xx_43xx.c.

Variable Documentation

mci_card_struct* g_card_info
static

Definition at line 40 of file sdmmc_18xx_43xx.c.