Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
sdio.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12#ifndef ZEPHYR_INCLUDE_SD_SDIO_H_
13#define ZEPHYR_INCLUDE_SD_SDIO_H_
14
15#include <zephyr/device.h>
16#include <zephyr/drivers/sdhc.h>
17#include <zephyr/sd/sd.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
35int sdio_init_func(struct sd_card *card, struct sdio_func *func,
36 enum sdio_func_num num);
37
49
62
76
89int sdio_write_byte(struct sdio_func *func, uint32_t reg, uint8_t write_val);
90
104int sdio_rw_byte(struct sdio_func *func, uint32_t reg, uint8_t write_val,
105 uint8_t *read_val);
106
122 uint32_t len);
123
139 uint32_t len);
140
156 uint32_t blocks);
157
173 uint32_t blocks);
174
189 uint32_t len);
190
206 uint32_t len);
207
208#ifdef __cplusplus
209}
210#endif
211
212#endif /* ZEPHYR_INCLUDE_SD_SDMMC_H_ */
Public API for SD subsystem.
sdio_func_num
SDIO function number.
Definition sd_spec.h:784
SD Host Controller public API header file.
int sdio_read_byte(struct sdio_func *func, uint32_t reg, uint8_t *val)
Read byte from SDIO register.
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_set_block_size(struct sdio_func *func, uint16_t bsize)
Set block size of SDIO function.
int sdio_write_addr(struct sdio_func *func, uint32_t reg, uint8_t *data, uint32_t len)
Copy bytes to an SDIO card.
int sdio_write_fifo(struct sdio_func *func, uint32_t reg, uint8_t *data, uint32_t len)
Write bytes to 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_fifo(struct sdio_func *func, uint32_t reg, uint8_t *data, uint32_t len)
Read bytes from SDIO fifo.
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_write_byte(struct sdio_func *func, uint32_t reg, uint8_t write_val)
Write byte to SDIO register.
int sdio_enable_func(struct sdio_func *func)
Enable SDIO function.
int sdio_init_func(struct sd_card *card, struct sdio_func *func, enum sdio_func_num num)
Initialize SDIO function.
int sdio_read_blocks_fifo(struct sdio_func *func, uint32_t reg, uint8_t *data, uint32_t blocks)
Read blocks from SDIO fifo.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
SD card structure.
Definition sd.h:63
SDIO function definition.
Definition sd.h:48
static fdata_t data[2]
Definition test_fifo_contexts.c:15
static void func(void *arg1, void *arg2, void *arg3)
Definition main.c:26