35 #ifndef __HAL_SDIO_H__ 36 #define __HAL_SDIO_H__ 37 #include "hal_platform.h" 39 #ifdef HAL_SDIO_MODULE_ENABLED uint32_t clock
The SDIO bus clock.
Definition: hal_sdio.h:405
void(* hal_sdio_callback_t)(hal_sdio_callback_event_t event, void *user_data)
This defines the callback function prototype.
Definition: hal_sdio.h:448
No error occurred during the function call.
Definition: hal_sdio.h:355
hal_sdio_status_t hal_sdio_set_bus_width(hal_sdio_port_t sdio_port, hal_sdio_bus_width_t bus_width)
This function sets the bus widths for the MSDC and SDIO slave.
hal_sdio_callback_event_t
Definition: hal_sdio.h:386
SDIO function 0, this function selects the common I/O area register to read or write.
Definition: hal_sdio.h:382
hal_sdio_direction_t
This enum defines the SDIO command direction types.
Definition: hal_sdio.h:367
uint8_t data
Write or read back data.
Definition: hal_sdio.h:429
The SDIO bus width is 4 bits.
Definition: hal_sdio.h:362
This structure defines the SDIO COMMAND53 configuration parameter.
Definition: hal_sdio.h:411
hal_sdio_status_t hal_sdio_set_clock(hal_sdio_port_t sdio_port, uint32_t clock)
This function sets the output clock of the MSDC.
SDIO function 1, this function selects the I/O function 1 register to read or write.
Definition: hal_sdio.h:383
This structure defines the SDIO COMMAND52 configuration parameter.
Definition: hal_sdio.h:424
hal_sdio_command53_operation_t
This enum defines the SDIO command operation types.
Definition: hal_sdio.h:374
The transaction completed without any error.
Definition: hal_sdio.h:387
The SDIO read command.
Definition: hal_sdio.h:368
hal_sdio_status_t hal_sdio_init(hal_sdio_port_t sdio_port, hal_sdio_config_t *sdio_config)
This function initializes the MSDC hardware and SDIO slave.
hal_sdio_status_t hal_sdio_execute_command53(hal_sdio_port_t sdio_port, hal_sdio_command53_config_t *command53_config)
This function reads from or writes to the SDIO slave with COMMAND53 MCU mode.
hal_sdio_status_t hal_sdio_execute_command52(hal_sdio_port_t sdio_port, hal_sdio_command52_config_t *command52_config)
This function reads from or writes to the SDIO slave with COMMAND52.
SDIO multi-byte read/write at a fixed address.
Definition: hal_sdio.h:375
hal_sdio_bus_width_t
This enum define the SDIO bus width types.
Definition: hal_sdio.h:360
hal_sdio_status_t hal_sdio_register_callback(hal_sdio_port_t sdio_port, hal_sdio_callback_t sdio_callback, void *user_data)
This function registers a callback function to inform the user the transfer is complete.
The SDIO write command.
Definition: hal_sdio.h:369
uint16_t count
Byte or block count.
Definition: hal_sdio.h:416
hal_sdio_status_t hal_sdio_execute_command53_dma(hal_sdio_port_t sdio_port, hal_sdio_command53_config_t *command53_config)
This function reads from or writes to the SDIO slave with COMMAND53 DMA interrupt mode...
SDIO multi-byte read/write at an incrementing address.
Definition: hal_sdio.h:376
uint32_t buffer
Buffer address for data transfer.
Definition: hal_sdio.h:418
hal_sdio_status_t
This enum defines the SDIO API return type.
Definition: hal_sdio.h:352
hal_sdio_status_t hal_sdio_execute_command53_dma_blocking(hal_sdio_port_t sdio_port, hal_sdio_command53_config_t *command53_config)
This function reads from or writes to the SDIO slave with COMMAND53 DMA interrupt mode...
hal_sdio_status_t hal_sdio_deinit(hal_sdio_port_t sdio_port)
This function deinitializes the MSDC and the SDIO slave settings.
hal_sdio_direction_t direction
Read/write direction for the SDIO COMMAND52.
Definition: hal_sdio.h:425
hal_sdio_status_t hal_sdio_get_block_size(hal_sdio_port_t sdio_port, hal_sdio_function_id_t function, uint32_t *block_size)
This function gets the transaction block size of the MSDC.
An error occurred and the operation failed.
Definition: hal_sdio.h:354
hal_sdio_function_id_t
This enum defines the SDIO command function number.
Definition: hal_sdio.h:381
hal_sdio_status_t hal_sdio_set_block_size(hal_sdio_port_t sdio_port, hal_sdio_function_id_t function, uint32_t block_size)
This function sets the transaction block size of the MSDC.
CRC error occurred during transaction.
Definition: hal_sdio.h:389
uint32_t address
Read/write address of the SDIO COMMAND53.
Definition: hal_sdio.h:417
hal_sdio_bus_width_t bus_width
Bus width for the SDIO read/write operation.
Definition: hal_sdio.h:404
An error occurred during transaction.
Definition: hal_sdio.h:388
hal_sdio_command53_operation_t operation
Operation mode for the SDIO COMMAND53.
Definition: hal_sdio.h:415
hal_sdio_port_t
This enum defines the SDIO port.
Definition: hal_platform.h:1084
An error occurred, the SDIO bus is busy.
Definition: hal_sdio.h:353
uint32_t address
Read/write address of the SDIO COMMAND52.
Definition: hal_sdio.h:430
hal_sdio_status_t hal_sdio_get_clock(hal_sdio_port_t sdio_port, uint32_t *clock)
This function gets the output clock of the MSDC.
bool stop
Indicates if the data transfer stopped or not.
Definition: hal_sdio.h:428
The SDIO bus width is 1 bit.
Definition: hal_sdio.h:361
hal_sdio_direction_t direction
Read/write direction for the SDIO COMMAND53.
Definition: hal_sdio.h:412
Data timeout occurred during transaction.
Definition: hal_sdio.h:390
This structure defines the SDIO initialization parameters.
Definition: hal_sdio.h:403
bool block
Indicates whether read/write is in a block mode or not.
Definition: hal_sdio.h:414
bool read_after_write
Indicates whether read is after write or not.
Definition: hal_sdio.h:427