Zephyr API Documentation
3.7.0
A Scalable Open Source RTOS
|
Public API for SDIO subsystem. More...
Go to the source code of this file.
Functions | |
int | sdio_init_func (struct sd_card *card, struct sdio_func *func, enum sdio_func_num num) |
Initialize SDIO function. | |
int | sdio_enable_func (struct sdio_func *func) |
Enable SDIO function. | |
int | sdio_set_block_size (struct sdio_func *func, uint16_t bsize) |
Set block size of SDIO function. | |
int | sdio_read_byte (struct sdio_func *func, uint32_t reg, uint8_t *val) |
Read byte from SDIO register. | |
int | sdio_write_byte (struct sdio_func *func, uint32_t reg, uint8_t write_val) |
Write byte to SDIO register. | |
int | sdio_rw_byte (struct sdio_func *func, uint32_t reg, uint8_t write_val, uint8_t *read_val) |
Write byte to SDIO register, and read result. | |
int | sdio_read_fifo (struct sdio_func *func, uint32_t reg, uint8_t *data, uint32_t len) |
Read bytes from SDIO fifo. | |
int | sdio_write_fifo (struct sdio_func *func, uint32_t reg, uint8_t *data, uint32_t len) |
Write bytes to SDIO fifo. | |
int | sdio_read_blocks_fifo (struct sdio_func *func, uint32_t reg, uint8_t *data, uint32_t blocks) |
Read blocks from SDIO fifo. | |
int | sdio_write_blocks_fifo (struct sdio_func *func, uint32_t reg, uint8_t *data, uint32_t blocks) |
Write blocks to SDIO fifo. | |
int | sdio_read_addr (struct sdio_func *func, uint32_t reg, uint8_t *data, uint32_t len) |
Copy bytes from an SDIO card. | |
int | sdio_write_addr (struct sdio_func *func, uint32_t reg, uint8_t *data, uint32_t len) |
Copy bytes to an SDIO card. | |
Public API for SDIO subsystem.
int sdio_enable_func | ( | struct sdio_func * | func | ) |
Enable SDIO function.
Enables SDIO card function. sdio_init_func must be called to initialized the function structure before enabling it in the card.
func | function to enable |
0 | function was enabled successfully |
-ETIMEDOUT | card I/O timed out |
-EIO | I/O error |
int sdio_init_func | ( | struct sd_card * | card, |
struct sdio_func * | func, | ||
enum sdio_func_num | num | ||
) |
Initialize SDIO function.
Initializes SDIO card function. The card function will not be enabled, but after this call returns the SDIO function structure can be used to read and write data from the card.
func | function structure to initialize |
card | SD card to enable function on |
num | function number to initialize |
0 | function was initialized successfully |
-EIO | I/O error |
Copy bytes from an SDIO card.
Copies bytes from an SDIO card, starting from provided address.
func | function to read from |
reg | register address to start copy at |
data | buffer to copy data into |
len | length of data to read |
0 | read succeeded |
-EBUSY | card is busy with another request |
-ETIMEDOUT | card read timed out |
-EIO | I/O error |
int sdio_read_blocks_fifo | ( | struct sdio_func * | func, |
uint32_t | reg, | ||
uint8_t * | data, | ||
uint32_t | blocks | ||
) |
Read blocks from SDIO fifo.
Reads blocks from SDIO register, treating it as a fifo. Reads will all be done from same address.
func | function to read from |
reg | register address of fifo |
data | filled with data read from fifo |
blocks | number of blocks to read from fifo |
0 | read succeeded |
-EBUSY | card is busy with another request |
-ETIMEDOUT | card read timed out |
-EIO | I/O error |
Read byte from SDIO register.
Reads byte from SDIO register
func | function to read from |
reg | register address to read from |
val | filled with byte value read from register |
0 | read succeeded |
-EBUSY | card is busy with another request |
-ETIMEDOUT | card read timed out |
-EIO | I/O error |
Read bytes from SDIO fifo.
Reads bytes from SDIO register, treating it as a fifo. Reads will all be done from same address.
func | function to read from |
reg | register address of fifo |
data | filled with data read from fifo |
len | length of data to read from card |
0 | read succeeded |
-EBUSY | card is busy with another request |
-ETIMEDOUT | card read timed out |
-EIO | I/O error |
Write byte to SDIO register, and read result.
Writes byte to SDIO register, and reads the register after write
func | function to write to |
reg | register address to write to |
write_val | value to write to register |
read_val | filled with value read from register |
0 | write succeeded |
-EBUSY | card is busy with another request |
-ETIMEDOUT | card write timed out |
-EIO | I/O error |
Set block size of SDIO function.
Set desired block size for SDIO function, used by block transfers to SDIO registers.
func | function to set block size for |
bsize | block size |
0 | block size was set |
-EINVAL | unsupported/invalid block size |
-EIO | I/O error |
Copy bytes to an SDIO card.
Copies bytes to an SDIO card, starting from provided address.
func | function to write to |
reg | register address to start copy at |
data | buffer to copy data from |
len | length of data to write |
0 | write succeeded |
-EBUSY | card is busy with another request |
-ETIMEDOUT | card write timed out |
-EIO | I/O error |
int sdio_write_blocks_fifo | ( | struct sdio_func * | func, |
uint32_t | reg, | ||
uint8_t * | data, | ||
uint32_t | blocks | ||
) |
Write blocks to SDIO fifo.
Writes blocks from SDIO register, treating it as a fifo. Writes will all be done to same address.
func | function to write to |
reg | register address of fifo |
data | data to write to fifo |
blocks | number of blocks to write to fifo |
0 | write succeeded |
-EBUSY | card is busy with another request |
-ETIMEDOUT | card write timed out |
-EIO | I/O error |
Write byte to SDIO register.
Writes byte to SDIO register
func | function to write to |
reg | register address to write to |
write_val | value to write to register |
0 | write succeeded |
-EBUSY | card is busy with another request |
-ETIMEDOUT | card write timed out |
-EIO | I/O error |
Write bytes to SDIO fifo.
Writes bytes to SDIO register, treating it as a fifo. Writes will all be done to same address.
func | function to write to |
reg | register address of fifo |
data | data to write to fifo |
len | length of data to write to card |
0 | write succeeded |
-EBUSY | card is busy with another request |
-ETIMEDOUT | card write timed out |
-EIO | I/O error |