![]() |
RAFW Flexible Software Package Documentation
Release v2.0.1
|
|
Functions | |
| fsp_err_t | R_SDEMMC_W_Open (sdmmc_ctrl_t *const p_api_ctrl, sdmmc_cfg_t const *const p_cfg) |
| fsp_err_t | R_SDEMMC_W_MediaInit (sdmmc_ctrl_t *const p_api_ctrl, sdmmc_device_t *const p_device) |
| fsp_err_t | R_SDEMMC_W_Read (sdmmc_ctrl_t *const p_api_ctrl, uint8_t *const p_dest, uint32_t const start_sector, uint32_t const sector_count) |
| fsp_err_t | R_SDEMMC_W_Write (sdmmc_ctrl_t *const p_api_ctrl, uint8_t const *const p_source, uint32_t const start_sector, uint32_t const sector_count) |
| fsp_err_t | R_SDEMMC_W_ReadIo (sdmmc_ctrl_t *const p_api_ctrl, uint8_t *const p_data, uint32_t const function, uint32_t const address) |
| fsp_err_t | R_SDEMMC_W_WriteIo (sdmmc_ctrl_t *const p_api_ctrl, uint8_t *const p_data, uint32_t const function, uint32_t const address, sdmmc_io_write_mode_t const read_after_write) |
| fsp_err_t | R_SDEMMC_W_ReadIoExt (sdmmc_ctrl_t *const p_api_ctrl, uint8_t *const p_dest, uint32_t const function, uint32_t const address, uint32_t *const count, sdmmc_io_transfer_mode_t transfer_mode, sdmmc_io_address_mode_t address_mode) |
| fsp_err_t | R_SDEMMC_W_WriteIoExt (sdmmc_ctrl_t *const p_api_ctrl, uint8_t const *const p_source, uint32_t const function, uint32_t const address, uint32_t const count, sdmmc_io_transfer_mode_t transfer_mode, sdmmc_io_address_mode_t address_mode) |
| fsp_err_t | R_SDEMMC_W_IoIntEnable (sdmmc_ctrl_t *const p_api_ctrl, bool enable) |
| fsp_err_t | R_SDEMMC_W_StatusGet (sdmmc_ctrl_t *const p_api_ctrl, sdmmc_status_t *const p_status) |
| fsp_err_t | R_SDEMMC_W_Erase (sdmmc_ctrl_t *const p_api_ctrl, uint32_t const start_sector, uint32_t const sector_count) |
| fsp_err_t | R_SDEMMC_W_CallbackSet (sdmmc_ctrl_t *const p_api_ctrl, void(*p_callback)(sdmmc_callback_args_t *), void *const p_context, sdmmc_callback_args_t *const p_callback_memory) |
| fsp_err_t | R_SDEMMC_W_ResultGet (sdmmc_ctrl_t *const p_api_ctrl, sdemmc_w_transfer_result_t *p_result) |
| fsp_err_t | R_SDEMMC_W_Close (sdmmc_ctrl_t *const p_api_ctrl) |
Driver for the SD/MMC Host Interface (SDEMMC_W) peripheral on RA for Wireless (RAFW) MCUs. This module implements the SD/MMC Interface.
| Configuration | Options | Default | Description |
|---|---|---|---|
| Parameter Checking |
| Default (BSP) | If selected code for parameter checking is included in the build. |
| SD Support |
| Enabled | If selected code for SD card support is included in the build. |
| eMMC Support |
| Disabled | If selected code for eMMC device support is included in the build. |
| SDIO Support |
| Disabled | If selected code for SDIO card support is included in the build. |
| Configuration | Options | Default | Description |
|---|---|---|---|
| Name | Name must be a valid C symbol | g_sdmmc0 | Module name. |
| Bus Width | MCU Specific Options | Select the bus width. | |
| Block Size | Value must be an integer between 1 and 512 | 512 | Select the media block size. Must be 512 for SD cards or eMMC devices. Must be 1-512 for SDIO. |
| Clk_div | Value must be an integer between 0 and 255 | 0 | Clock divide value. Must be 0-255. |
| Port Selection |
| Port P1_[3:0] and P1_[15:10] | Select SD/eMMC/SDIO host port. Must be 0 or 1. |
| rxclk_in selection |
| clkout signal | Select SD/eMMC/SDIO rxclk_in selection. Must be 0 or 1. |
| Pull enable |
| CMD and Datas pull enabled | Select SD/eMMC/SDIO PADS mode pull enable. |
| Pull selection |
| Pull up | Set SD/eMMC/SDIO PADS mode pull selection. |
| Card Detection |
| Not Used | Select the card detection method. |
| Write Protection |
| Not Used | Select whether or not to use the write protect pin. Select Not Used if the MCU or device does not have a write protect pin. |
| Callback | Name must be a valid C symbol | g_sdmmc0_callback | A user callback function can be provided. If this callback function is provided, it will be called from the interrupt service routine (ISR). |
| Access and Card Interrupt Priority | MCU Specific Options | Select the access and card interrupt priority. |
| Configuration | Options | Default | Description |
|---|---|---|---|
| Name | Name must be a valid C symbol | g_sdmmc_sdio_device0 | Module name. |
| Bus Width |
| 4 Bits | Select the bus width. |
| Block Size | Value must be an integer between 1 and 512 | 512 | Select the media block size. Must be 512 for SD cards or eMMC devices. Must be 1-512 for SDIO. |
| Drive current |
| 2mA | Pads drive current |
| Port Selection |
| Port P0_[13:8] | Select SDIO device port. Must be 0 or 1. |
| Pull enable |
| CMD and Datas pull enabled | Select SDIO device PADS mode pull enable. |
| Pull selection |
| Pull up | Set SDIO device PADS mode pull selection. |
| Callback | Name must be a valid C symbol | g_sdio0_callback | A user callback function can be provided. If this callback function is provided, it will be called from the interrupt service routine (ISR). |
| SDIO Interrupt Priority | MCU Specific Options | Select the SDIO interrupt priority. |
The following interrupts are required to use the r_sdemmc_w module:
Using SD/MMC:
Using SDIO Device:
The Card interrupt is optional and only available on MCU packages that have the CDETECT pin.
The SDMMC MCU peripheral (SDEMMC_W) uses the PERI_CLK for its clock source. The SDMMC driver selects the optimal built-in divider based on the PERI_CLK frequency and the maximum clock rate allowed by the device obtained at media initialization.
The SDMMC driver supports the following pins: port_sel 0
port_sel 1
CDETECT can be assigned any GPIO.
WPROTECT can be assigned any GPIO.
Once the SD host use the port_sel 0, SDIO device should use port_sel 1. And the SD host use the port_sel 1, SDIO device should use port_sel 0.
The drive capacity for each pin should be set to "Medium" or "High" for most hardware designs. This can be configured in the Pins tab of the RA6W1/RA6W2 Configuration editor by selecting the pin under Pin Selection -> Ports.
When Card Detection is configured to "CD Pin" in the RA6W1/RA6W2 Configuration editor, interrupt flags are cleared and card detection is enabled during R_SDEMMC_W_Open().
R_SDEMMC_W_StatusGet() can be called to retrieve the current status of the card (including whether a card is present). If the Card Interrupt Priority is enabled, a callback is called when a card is inserted or removed.
If a card is removed and reinserted, R_SDEMMC_W_MediaInit() must be called before reading from the card or writing to the card.
The R_SDEMMC_W_MediaInit() API completes the entire device identification and configuration process. This involves several command-response cycles at a bus width of 1 bit and a bus speed of 400 kHz or less.
Developers should be aware of the following limitations when using the SDEMMC_W:
The following functions block execution until the response is received for at least one command:
Once the function returns the status of the operation can be determined via R_SDEMMC_W_StatusGet or through receipt of a callback.
This is a basic example of minimal use of the r_sdemmc_w in an application.
This is an example of using SDEMMC_W when the card may not be plugged in. The card detection interrupt must be enabled to use this example.
Data Structures | |
| union | sdemmc_w_event_t |
| struct | sdio_device_dma_config |
| struct | sdemmc_w_extended_cfg_t |
| struct | sdemmc_w_transfer_result_t |
| struct | sdemmc_w_instance_ctrl_t |
Enumerations | |
| enum | sdemmc_w_transfer_dir_t |
| enum | sdemmc_w_priv_event_t |
| enum | sdemmc_w_sdio_device_drive_current_t |
| enum | sdemmc_w_role_t |
| union sdemmc_w_event_t |
Private structure used in sdemmc_w_instance_ctrl_t.
| struct sdio_device_dma_config |
| struct sdemmc_w_extended_cfg_t |
Extended SDMMC interface configuration
| Data Fields | ||
|---|---|---|
| sdio_device_dma_config | dma_config_tx | ADMA Region physical memory. |
| sdio_device_dma_config | dma_config_rx | ADMA Region physical memory. |
| uint32_t | sdemmc_w_role | SD/eMMC/SDIO host or SDIO device. |
| uint8_t | clk_div | Clock divider value. |
| uint8_t | host_port_sel | SD/eMMC/SDIO host port selection. 0: P0_[13:4], 1: P1_[3:0] and P1_[15:10]. |
| uint8_t | host_rxclk_in_sel | SD/eMMC/SDIO host rxclk_in selection. 0: clkout signal, 1: clkout_inv signal. |
| uint8_t | host_pull_en_cfg | SD/eMMC/SDIO host PADs mode pull enable. |
| uint8_t | host_pull_sel_cfg | SD/eMMC/SDIO host PADs mode pull selection. |
| uint8_t | device_port_sel | SDIO device port selection. 0: Port P0_[13:8], 1: Port P1_[15:10]. |
| uint8_t | device_pull_en_cfg | SDIO device PADs mode pull enable. |
| uint8_t | device_pull_sel_cfg | SDIO device PADs mode pull selection. |
| sdemmc_w_sdio_device_drive_current_t | drive_current | Drive current. |
| struct sdemmc_w_transfer_result_t |
| struct sdemmc_w_instance_ctrl_t |
SDMMC instance control block. This is private to the FSP and should not be used or modified by the application.
Data Fields | |
| uint32_t | open |
| Indicates whether the open() API has been successfully called. | |
| sdmmc_cfg_t const * | p_cfg |
| Pointer to instance configuration. | |
| sdmmc_device_t | device |
| Information of the media device used. | |
| bool | sector_addressing |
| Whether or not use sector addressing in transfer. | |
| bool | transfer_in_progress |
| Whether or not transfer is in progress. | |
| bool | initialized |
| Whether or not driver is initialized. | |
| SDIO_Type * | p_reg |
| Base SDIO register for this channel. | |
| SDEMMC_Type * | p_reg_mmc |
| Base SD/eMMC register for this channel. | |
| volatile sdemmc_w_event_t | sdemmc_w_event |
| Events of SDEMMC_W. | |
| sdemmc_w_transfer_result_t | result |
| Extended callback arguments. | |
| void(* | p_callback )(sdmmc_callback_args_t *) |
| Pointer to callback. | |
| sdmmc_callback_args_t * | p_callback_memory |
| Pointer to optional callback argument memory. | |
| void * | p_context |
| Pointer to context to be passed into callback function. | |
Private enumeration used in sdemmc_w_instance_ctrl_t.
| Enumerator | |
|---|---|
| SDEMMC_W_TRANSFER_DIR_NONE | The transfer direction is none. |
| SDEMMC_W_TRANSFER_DIR_READ | The transfer direction is read. |
| SDEMMC_W_TRANSFER_DIR_WRITE | The transfer direction is write. |
Private enumeration used in sdmmc_callback_args_t.
| Enumerator | |
|---|---|
| SDEMMC_W_PRIV_EVENT_CARD_REMOVED | Card removed event. |
| SDEMMC_W_PRIV_EVENT_CARD_INSERTED | Card inserted event. |
| SDEMMC_W_PRIV_EVENT_RESPONSE | Response event. |
| SDEMMC_W_PRIV_EVENT_SDIO | IO event. |
| SDEMMC_W_PRIV_EVENT_TRANSFER_COMPLETE | Read or write complete. |
| SDEMMC_W_PRIV_EVENT_TRANSFER_ERROR | Read or write failed. |
| SDEMMC_W_PRIV_EVENT_ERASE_COMPLETE | Erase completed. |
| SDEMMC_W_PRIV_EVENT_ERASE_BUSY | Erase timeout, poll sdmmc_api_t::statusGet. |
| SDEMMC_W_PRIV_EVENT_SDIO_FN1_WR_OVR | IO event. |
| SDEMMC_W_PRIV_EVENT_SDIO_FN1_RD_OVR | IO event. |
| SDEMMC_W_PRIV_EVENT_SDIO_FN1_MSG_RDY | IO event. |
| SDEMMC_W_PRIV_EVENT_SDIO_FN1_ACK_TO_ARM | IO event. |
| enum sdemmc_w_role_t |
SDIO role used in sdmmc_cfg_t p_extend.
| Enumerator | |
|---|---|
| SDEMMC_W_ROLE_HOST | Act as SD/eMMC/SDIO host. |
| SDEMMC_W_ROLE_DEVICE | Act as SDIO device. |
| fsp_err_t R_SDEMMC_W_Open | ( | sdmmc_ctrl_t *const | p_api_ctrl, |
| sdmmc_cfg_t const *const | p_cfg | ||
| ) |
Opens the driver. Resets SDEMMC_W, and enables card detection interrupts if card detection is enabled. R_SDEMMC_W_MediaInit must be called after this function before any other functions can be used.
Implements sdmmc_api_t::open().
Example:
| FSP_SUCCESS | Module is now open. |
| FSP_ERR_ASSERTION | Null Pointer or block size is not in the valid range of 1-512. Block size must be 512 bytes for SD cards and eMMC devices. It is configurable for SDIO only. |
| FSP_ERR_ALREADY_OPEN | Driver has already been opened with this instance of the control structure. |
| FSP_ERR_IRQ_BSP_DISABLED | Access interrupt is not enabled. |
| FSP_ERR_IP_CHANNEL_NOT_PRESENT | Requested channel does not exist on this MCU. |
| fsp_err_t R_SDEMMC_W_MediaInit | ( | sdmmc_ctrl_t *const | p_api_ctrl, |
| sdmmc_device_t *const | p_device | ||
| ) |
Initializes the SDEMMC_W hardware and completes identification and configuration for the SD or eMMC or SDIO device. This procedure requires several sequential commands. This function blocks until all identification and configuration commands are complete.
Implements sdmmc_api_t::mediaInit().
Example:
| FSP_SUCCESS | Module is now ready for read/write access. |
| FSP_ERR_ASSERTION | Null Pointer or block size is not in the valid range of 1-512. Block size must be 512 bytes for SD cards and eMMC devices. It is configurable for SDIO only. |
| FSP_ERR_NOT_OPEN | Driver has not been initialized. |
| FSP_ERR_TIMEOUT | Device did not respond. |
| FSP_ERR_INVALID_DATA | Unrecognized structure version. |
| FSP_ERR_UNSUPPORTED | Unsupported device. |
| FSP_ERR_INVALID_STATE | Sending command retry failure. |
| FSP_ERR_OUT_OF_MEMORY | There is no more memory available. |
| FSP_ERR_NOT_FOUND | Card not exist. |
| fsp_err_t R_SDEMMC_W_Read | ( | sdmmc_ctrl_t *const | p_api_ctrl, |
| uint8_t *const | p_dest, | ||
| uint32_t const | start_sector, | ||
| uint32_t const | sector_count | ||
| ) |
Reads data from an SD or eMMC device. Up to 0x10000 sectors can be read at a time. Implements sdmmc_api_t::read().
A callback with the event SDMMC_EVENT_TRANSFER_COMPLETE is called when the read data is available.
Example:
| FSP_SUCCESS | Data read successfully. |
| FSP_ERR_ASSERTION | NULL pointer. |
| FSP_ERR_NOT_OPEN | Driver has not been initialized. |
| FSP_ERR_CARD_NOT_INITIALIZED | Card was unplugged. |
| FSP_ERR_DEVICE_BUSY | Driver is busy with a previous operation. |
| FSP_ERR_UNSUPPORTED | SD and eMMC support disabled in SDEMMC_W_CFG_SD_SUPPORT_ENABLE and SDEMMC_W_CFG_EMMC_SUPPORT_ENABLE. |
| FSP_ERR_TIMEOUT | Device did not respond. |
| fsp_err_t R_SDEMMC_W_Write | ( | sdmmc_ctrl_t *const | p_api_ctrl, |
| uint8_t const *const | p_source, | ||
| uint32_t const | start_sector, | ||
| uint32_t const | sector_count | ||
| ) |
Writes data to an SD or eMMC device. Up to 0x10000 sectors can be written at a time. Implements sdmmc_api_t::write().
A callback with the event SDMMC_EVENT_TRANSFER_COMPLETE is called when the all data has been written and the device is no longer holding DAT0 low to indicate it is busy.
Example:
| FSP_SUCCESS | Card write finished successfully. |
| FSP_ERR_ASSERTION | Handle or Source address is NULL. |
| FSP_ERR_NOT_OPEN | Driver has not been initialized. |
| FSP_ERR_CARD_NOT_INITIALIZED | Card was unplugged. |
| FSP_ERR_DEVICE_BUSY | Driver is busy with a previous operation. |
| FSP_ERR_CARD_WRITE_PROTECTED | SD card is Write Protected. |
| FSP_ERR_WRITE_FAILED | Write operation failed. |
| FSP_ERR_UNSUPPORTED | SD and eMMC support disabled in SDEMMC_W_CFG_SD_SUPPORT_ENABLE and SDEMMC_W_CFG_EMMC_SUPPORT_ENABLE. |
| FSP_ERR_TIMEOUT | Device did not respond. |
| fsp_err_t R_SDEMMC_W_ReadIo | ( | sdmmc_ctrl_t *const | p_api_ctrl, |
| uint8_t *const | p_data, | ||
| uint32_t const | function, | ||
| uint32_t const | address | ||
| ) |
The Read function reads a one byte register from an SDIO card. Implements sdmmc_api_t::readIo().
This function blocks until the command is sent and the response is received. p_data contains the register value read when this function returns.
| FSP_SUCCESS | Data read successfully. |
| FSP_ERR_ASSERTION | NULL pointer. |
| FSP_ERR_NOT_OPEN | Driver has not been initialized. |
| FSP_ERR_CARD_NOT_INITIALIZED | Card was unplugged. |
| FSP_ERR_UNSUPPORTED | SDIO support disabled in SDEMMC_W_CFG_SDIO_SUPPORT_ENABLE. |
| FSP_ERR_TIMEOUT | Device did not respond. |
| FSP_ERR_DEVICE_BUSY | Device is holding DAT0 low (device is busy) or another operation is ongoing. |
| fsp_err_t R_SDEMMC_W_WriteIo | ( | sdmmc_ctrl_t *const | p_api_ctrl, |
| uint8_t *const | p_data, | ||
| uint32_t const | function, | ||
| uint32_t const | address, | ||
| sdmmc_io_write_mode_t const | read_after_write | ||
| ) |
Writes a one byte register to an SDIO card. Implements sdmmc_api_t::writeIo().
This function blocks until the command is sent and the response is received. The register has been written when this function returns. If read_after_write is true, p_data contains the register value read when this function returns.
| FSP_SUCCESS | Card write finished successfully. |
| FSP_ERR_ASSERTION | Handle or Source address is NULL. |
| FSP_ERR_NOT_OPEN | Driver has not been initialized. |
| FSP_ERR_CARD_NOT_INITIALIZED | Card was unplugged. |
| FSP_ERR_WRITE_FAILED | Write operation failed. |
| FSP_ERR_UNSUPPORTED | SDIO support disabled in SDEMMC_W_CFG_SDIO_SUPPORT_ENABLE. |
| FSP_ERR_TIMEOUT | Device did not respond. |
| FSP_ERR_DEVICE_BUSY | Device is holding DAT0 low (device is busy) or another operation is ongoing. |
| FSP_ERR_UNSUPPORTED | SDIO support disabled in SDEMMC_W_CFG_SDIO_SUPPORT_ENABLE. |
| fsp_err_t R_SDEMMC_W_ReadIoExt | ( | sdmmc_ctrl_t *const | p_api_ctrl, |
| uint8_t *const | p_dest, | ||
| uint32_t const | function, | ||
| uint32_t const | address, | ||
| uint32_t *const | count, | ||
| sdmmc_io_transfer_mode_t | transfer_mode, | ||
| sdmmc_io_address_mode_t | address_mode | ||
| ) |
Reads data from an SDIO card function. Implements sdmmc_api_t::readIoExt().
This function blocks until the command is sent and the response is received. A callback with the event SDMMC_EVENT_TRANSFER_COMPLETE is called when the read data is available.
| FSP_SUCCESS | Data read successfully. |
| FSP_ERR_ASSERTION | NULL pointer, or count is not in the valid range of 1-512 for byte mode or 1-511 for block mode. |
| FSP_ERR_NOT_OPEN | Driver has not been initialized. |
| FSP_ERR_CARD_NOT_INITIALIZED | Card was unplugged. |
| FSP_ERR_DEVICE_BUSY | Driver is busy with a previous operation. |
| FSP_ERR_INVALID_ARGUMENT | Parameter passed into function was invalid. |
| FSP_ERR_TIMEOUT | Device did not respond. |
| FSP_ERR_UNSUPPORTED | SDIO support disabled in SDEMMC_W_CFG_SDIO_SUPPORT_ENABLE. |
| fsp_err_t R_SDEMMC_W_WriteIoExt | ( | sdmmc_ctrl_t *const | p_api_ctrl, |
| uint8_t const *const | p_source, | ||
| uint32_t const | function, | ||
| uint32_t const | address, | ||
| uint32_t const | count, | ||
| sdmmc_io_transfer_mode_t | transfer_mode, | ||
| sdmmc_io_address_mode_t | address_mode | ||
| ) |
Writes data to an SDIO card function. Implements sdmmc_api_t::writeIoExt().
This function blocks until the command is sent and the response is received. A callback with the event SDMMC_EVENT_TRANSFER_COMPLETE is called when the all data has been written.
| FSP_SUCCESS | Card write finished successfully. |
| FSP_ERR_ASSERTION | NULL pointer, or count is not in the valid range of 1-512 for byte mode or 1-511 for block mode. |
| FSP_ERR_NOT_OPEN | Driver has not been initialized. |
| FSP_ERR_CARD_NOT_INITIALIZED | Card was unplugged. |
| FSP_ERR_DEVICE_BUSY | Driver is busy with a previous operation. |
| FSP_ERR_INVALID_ARGUMENT | Parameter passed into function was invalid. |
| FSP_ERR_TIMEOUT | Device did not respond. |
| FSP_ERR_UNSUPPORTED | SDIO support disabled in SDEMMC_W_CFG_SDIO_SUPPORT_ENABLE. |
| fsp_err_t R_SDEMMC_W_IoIntEnable | ( | sdmmc_ctrl_t *const | p_api_ctrl, |
| bool | enable | ||
| ) |
Enables or disables the SDIO Interrupt. Implements sdmmc_api_t::ioIntEnable().
| FSP_SUCCESS | Card enabled or disabled SDIO interrupts successfully. |
| FSP_ERR_NOT_OPEN | Driver has not been initialized. |
| FSP_ERR_ASSERTION | NULL pointer. |
| FSP_ERR_DEVICE_BUSY | Driver is busy with a previous operation. |
| FSP_ERR_UNSUPPORTED | SDIO support disabled in SDEMMC_W_CFG_SDIO_SUPPORT_ENABLE. |
| fsp_err_t R_SDEMMC_W_StatusGet | ( | sdmmc_ctrl_t *const | p_api_ctrl, |
| sdmmc_status_t *const | p_status | ||
| ) |
Provides driver status. Implements sdmmc_api_t::statusGet().
| FSP_SUCCESS | Status stored in p_status. |
| FSP_ERR_ASSERTION | NULL pointer. |
| FSP_ERR_NOT_OPEN | Driver has not been initialized. |
| fsp_err_t R_SDEMMC_W_Erase | ( | sdmmc_ctrl_t *const | p_api_ctrl, |
| uint32_t const | start_sector, | ||
| uint32_t const | sector_count | ||
| ) |
Erases sectors of an SD card or eMMC device. Implements sdmmc_api_t::erase().
Poll the status to determine when erase is complete.
| FSP_SUCCESS | Erase operation requested. |
| FSP_ERR_ASSERTION | A required pointer is NULL or an argument is invalid. |
| FSP_ERR_NOT_OPEN | Driver has not been initialized. |
| FSP_ERR_CARD_NOT_INITIALIZED | Card was unplugged. |
| FSP_ERR_CARD_WRITE_PROTECTED | SD card is Write Protected. |
| FSP_ERR_RESPONSE | Device responded with an error. |
| FSP_ERR_TIMEOUT | Device did not respond. |
| FSP_ERR_UNSUPPORTED | SD and eMMC support disabled in SDEMMC_W_CFG_SD_SUPPORT_ENABLE and SDEMMC_W_CFG_EMMC_SUPPORT_ENABLE. |
| FSP_ERR_DEVICE_BUSY | Device is holding DAT0 low (device is busy) or another operation is ongoing. |
| fsp_err_t R_SDEMMC_W_CallbackSet | ( | sdmmc_ctrl_t *const | p_api_ctrl, |
| void(*)(sdmmc_callback_args_t *) | p_callback, | ||
| void *const | p_context, | ||
| sdmmc_callback_args_t *const | p_callback_memory | ||
| ) |
Updates the user callback with the option to provide memory for the callback argument structure. Implements sdmmc_api_t::callbackSet.
| FSP_SUCCESS | Callback updated successfully. |
| FSP_ERR_ASSERTION | A required pointer is NULL. |
| FSP_ERR_NOT_OPEN | The control block has not been opened. |
| fsp_err_t R_SDEMMC_W_ResultGet | ( | sdmmc_ctrl_t *const | p_api_ctrl, |
| sdemmc_w_transfer_result_t * | p_result | ||
| ) |
Get the SDEMMC transfer result.
| FSP_SUCCESS | Callback updated successfully. |
| FSP_ERR_ASSERTION | A required pointer is NULL. |
| FSP_ERR_NOT_OPEN | The control block has not been opened. |
| fsp_err_t R_SDEMMC_W_Close | ( | sdmmc_ctrl_t *const | p_api_ctrl | ) |
Closes an open SD/MMC device. Implements sdmmc_api_t::close().
| FSP_SUCCESS | Successful close. |
| FSP_ERR_ASSERTION | The parameter p_ctrl is NULL. |
| FSP_ERR_NOT_OPEN | Driver has not been initialized. |
| FSP_ERR_TIMEOUT | Device did not respond. |