Functions | |
| void | SDIO_Init (stc_sdio_irq_cb_t *pfuCb) |
| en_sdio_result_t | SDIO_SendCommandAndWait (stc_sdio_cmd_t *pstcCmd) |
| void | SDIO_EnableIntClock (void) |
| void | SDIO_DisableIntClock (void) |
| void | SDIO_EnableSdClk (void) |
| void | SDIO_DisableSdClk (void) |
| void | SDIO_SetSdClkFrequency (uint32_t u32SdClkFreqHz) |
| void | SDIO_Reset (void) |
| void | SDIO_EnableChipInt (void) |
| void | SDIO_DisableChipInt (void) |
| void | SDIO_Free (void) |
| void | SDIO_SendCommand (stc_sdio_cmd_config_t *pstcCmdConfig) |
| en_sdio_result_t | SDIO_GetResponse (uint8_t bCmdIndexCheck, uint8_t bCmdCrcCheck, uint8_t u8CmdIdx, uint32_t *pu32Response, uint8_t *pu8ResponseBuf) |
| void | SDIO_InitDataTransfer (stc_sdio_data_config_t *pstcDataConfig) |
| en_sdio_result_t | SDIO_CheckForEvent (en_sdio_event_t enEventType) |
| uint8_t | SDIO_CalculateCrc7 (uint8_t *pu8Data, uint8_t pu8Size) |
| void | SDIO_SetBlockSize (uint8_t u8ByteCount) |
| void | SDIO_SetNumBlocks (uint8_t u8BlockCount) |
| void | SDIO_SetupDMA (void) |
| void | SDIO_IRQ (void) |
| void | SDIO_READ_DMA_IRQ (void) |
| void | SDIO_WRITE_DMA_IRQ (void) |
| void | SDIO_Crc7Init (void) |
| cy_en_syspm_status_t | SDIO_DeepSleepCallback (cy_stc_syspm_callback_params_t *params, cy_en_syspm_callback_mode_t mode) |
| void SDIO_Init | ( | stc_sdio_irq_cb_t * | pfuCb | ) |
Initializes the SDIO hardware
| pfuCb | Pointer to structure that holds pointers to callback function see stc_sdio_irq_cb_t. |
| en_sdio_result_t SDIO_SendCommandAndWait | ( | stc_sdio_cmd_t * | pstcCmd | ) |
This function sends a command on the command channel and waits for that command to finish before returning. If a Command 53 is issued this function will handle all of the data transfer and wait to return until it is done.
| pstcCmd | Pointer command configuration structure see stc_sdio_cmd_t. |
| void SDIO_EnableIntClock | ( | void | ) |
Enable Internal clock for the block
| void SDIO_DisableIntClock | ( | void | ) |
Enable Disable clock for the block
| void SDIO_EnableSdClk | ( | void | ) |
Enable SD Clock out to pin
| void SDIO_DisableSdClk | ( | void | ) |
Disable SD Clock out to the pin
| void SDIO_SetSdClkFrequency | ( | uint32_t | u32SdClkFreqHz | ) |
Sets the frequency of the SD Clock
| u32SdClkFreqHz | Frequency of SD Clock in Hz. |
| void SDIO_Reset | ( | void | ) |
Reset the SDIO interface
| void SDIO_EnableChipInt | ( | void | ) |
Enables the SDIO Chip Int by setting the mask bit
| void SDIO_DisableChipInt | ( | void | ) |
Enables the SDIO Chip Int by setting the mask bit
| void SDIO_Free | ( | void | ) |
Frees any system resources that were allocated by the SDIO driver.
| void SDIO_SendCommand | ( | stc_sdio_cmd_config_t * | pstcCmdConfig | ) |
Send an SDIO command, don't wait for it to finish.
| pstcCmdConfig | Command configuration structure. See stc_sdio_cmd_config_t. |
| en_sdio_result_t SDIO_GetResponse | ( | uint8_t | bCmdIndexCheck, |
| uint8_t | bCmdCrcCheck, | ||
| uint8_t | u8cmdIdx, | ||
| uint32_t * | pu32Response, | ||
| uint8_t * | pu8ResponseBuf | ||
| ) |
Takes a 6 byte response buffer, and extracts the 32 bit response, also checks for index errors, CRC errors, and end bit errors.
| bCmdIndexCheck | If True check for index errors |
| bCmdCrcCheck | If True check for CRC errors |
| u8cmdIdx | Command index, used for checking the index error |
| pu32Response | location to store 32 bit response |
| pu8ResponseBuf | buffer that holds the 6 bytes of response data |
| void SDIO_InitDataTransfer | ( | stc_sdio_data_config_t * | pstcDataConfig | ) |
Configure the data channel for a data transfer. For a write this doesn't start the write, that must be done separately after the response is received.
| pstcDataConfig | Data configuration structure. See stc_sdio_data_config_t |
| en_sdio_result_t SDIO_CheckForEvent | ( | en_sdio_event_t | enEventType | ) |
Checks to see if a specific event has occurred such a command complete or transfer complete.
| enEventType | The type of event to check for. See en_sdio_event_t. |
| uint8_t SDIO_CalculateCrc7 | ( | uint8_t * | pu8Data, |
| uint8_t | u8Size | ||
| ) |
Calculate the 7 bit CRC for the command channel
| pu8Data | Data to calculate CRC on |
| u8Size | Number of bytes to calculate CRC on |
| void SDIO_SetBlockSize | ( | uint8_t | u8ByteCount | ) |
Sets the size of each block
| u8ByteCount | Size of the block |
| void SDIO_SetNumBlocks | ( | uint8_t | u8BlockCount | ) |
Sets the number of blocks to send
| u8BlockCount | Size of the block |
| void SDIO_SetupDMA | ( | void | ) |
Configures the DMA for the SDIO block
| void SDIO_IRQ | ( | void | ) |
SDIO interrupt, checks for events, and calls callbacks
| void SDIO_READ_DMA_IRQ | ( | void | ) |
SDIO DMA Read interrupt, checks counts and toggles to other descriptor if needed
| void SDIO_WRITE_DMA_IRQ | ( | void | ) |
SDIO DMA Write interrupt, checks counts and toggles to other descriptor if needed
| void SDIO_Crc7Init | ( | void | ) |
Initialize 7-bit CRC Table
| cy_en_syspm_status_t SDIO_DeepSleepCallback | ( | cy_stc_syspm_callback_params_t * | params, |
| cy_en_syspm_callback_mode_t | mode | ||
| ) |
Callback executed during Deep Sleep entry/exit
| params | Pointer to structure that holds callback parameters for this driver. |
| mode | The state transition mode that is currently happening. |