EasyManuals Logo

Espressif ESP32-S2 User Manual

Espressif ESP32-S2
1695 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #746 background imageLoading...
Page #746 background image
Chapter 2. API Reference
ESP_OK on success
ESP_ERR_NOT_SUPPORTED if the host controller does not support IO interrupts
Parameters
card: pointer to card information structure previously initialized using sdmmc_card_init
esp_err_t sdmmc_io_wait_int(sdmmc_card_t *card, TickType_t timeout_ticks)
Block until an SDIO interrupt is received
Slave uses D1 line to signal interrupt condition to the host. This function can be used to wait for the interrupt.
Return
ESP_OK if the interrupt is received
ESP_ERR_NOT_SUPPORTED if the host controller does not support IO interrupts
ESP_ERR_TIMEOUT if the interrupt does not happen in timeout_ticks
Parameters
card: pointer to card information structure previously initialized using sdmmc_card_init
timeout_ticks: time to wait for the interrupt, in RTOS ticks
esp_err_t sdmmc_io_get_cis_data(sdmmc_card_t *card, uint8_t *out_buer, size_t buer_size,
size_t *inout_cis_size)
Get the data of CIS region of an SDIO card.
You may provide a buffer not sufficient to store all the CIS data. In this case, this function stores as much data
into your buffer as possible. Also, this function will try to get and return the size required for you.
Return
ESP_OK: on success
ESP_ERR_INVALID_RESPONSE: if the card does not (correctly) support CIS.
ESP_ERR_INVALID_SIZE: CIS_CODE_END found, but buffer_size is less than required size,
which is stored in the inout_cis_size then.
ESP_ERR_NOT_FOUND: if the CIS_CODE_END not found. Increase input value of in-
out_cis_size or set it to 0, if you still want to search for the end; output value of inout_cis_size
is invalid in this case.
and other error code return from sdmmc_io_read_bytes
Parameters
card: pointer to card information structure previously initialized using sdmmc_card_init
out_buffer: Output buffer of the CIS data
buffer_size: Size of the buffer.
inout_cis_size: Mandatory, pointer to a size, input and output.
input: Limitation of maximum searching range, should be 0 or larger than buffer_size. The
function searches for CIS_CODE_END until this range. Set to 0 to search infinitely.
output: The size required to store all the CIS data, if CIS_CODE_END is found.
esp_err_t sdmmc_io_print_cis_info(uint8_t *buer, size_t buer_size, FILE *fp)
Parse and print the CIS information of an SDIO card.
Note Not all the CIS codes and all kinds of tuples are supported. If you see some unresolved code, you can
add the parsing of these code in sdmmc_io.c and contribute to the IDF through the Github repository.
using sdmmc_card_init
Return
ESP_OK: on success
ESP_ERR_NOT_SUPPORTED: if the value from the card is not supported to be parsed.
ESP_ERR_INVALID_SIZE: if the CIS size fields are not correct.
Parameters
buffer: Buffer to parse
buffer_size: Size of the buffer.
fp: File pointer to print to, set to NULL to print to stdout.
Header File
components/driver/include/driver/sdmmc_types.h
Espressif Systems 735
Submit Document Feedback
Release v4.4

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif ESP32-S2 and is the answer not in the manual?

Espressif ESP32-S2 Specifications

General IconGeneral
BrandEspressif
ModelESP32-S2
CategorySingle board computers
LanguageEnglish