|
Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
|
SDHC Emulation Interface. More...
Data Structures | |
| struct | sdhc_emul |
| Node in a linked list of emulators for SDHC card devices. More... | |
| struct | sdhc_emul_api |
| Definition of the emulator API for SDHC card devices. More... | |
Typedefs | |
| typedef int(* | sdhc_emul_request_t) (const struct emul *target, struct sdhc_command *cmd, struct sdhc_data *data) |
| Passes an SDHC request to the card emulator. | |
| typedef int(* | sdhc_emul_card_busy_t) (const struct emul *target) |
| Check if the emulated card is busy. | |
| typedef int(* | sdhc_emul_card_present_t) (const struct emul *target) |
| Check if the emulated card is present. | |
Functions | |
| int | sdhc_emul_register (const struct device *dev, struct sdhc_emul *emul) |
| Register an emulated card device on the controller. | |
| struct sdhc_emul * | sdhc_emul_get_card (const struct device *dev) |
| Find the first SDHC emulator registered on a controller. | |
| void | sdhc_emul_raise_interrupt (const struct device *dev, int sources) |
| Raise an interrupt from an emulated SDHC card through its controller. | |
SDHC Emulation Interface.
| typedef int(* sdhc_emul_card_busy_t) (const struct emul *target) |
#include <zephyr/drivers/sdhc_emul.h>
Check if the emulated card is busy.
| target | The device Emulator instance. |
| 0 | Card is not busy. |
| 1 | Card is busy. |
| typedef int(* sdhc_emul_card_present_t) (const struct emul *target) |
#include <zephyr/drivers/sdhc_emul.h>
Check if the emulated card is present.
| target | The device Emulator instance. |
| 0 | Card not present. |
| 1 | Card present. |
| typedef int(* sdhc_emul_request_t) (const struct emul *target, struct sdhc_command *cmd, struct sdhc_data *data) |
#include <zephyr/drivers/sdhc_emul.h>
Passes an SDHC request to the card emulator.
| target | The device Emulator instance. |
| cmd | SDHC command to process. |
| data | Optional data transfer associated with the command. |
| 0 | If successful. |
| -EIO | General input / output error. |
| -ENOTSUP | Command not supported. |
#include <zephyr/drivers/sdhc_emul.h>
Find the first SDHC emulator registered on a controller.
| dev | SDHC emulation controller device. |
| void sdhc_emul_raise_interrupt | ( | const struct device * | dev, |
| int | sources ) |
#include <zephyr/drivers/sdhc_emul.h>
Raise an interrupt from an emulated SDHC card through its controller.
| dev | SDHC emulation controller device. |
| sources | Interrupt source bits, using SDHC_INT_* values. |
#include <zephyr/drivers/sdhc_emul.h>
Register an emulated card device on the controller.
| dev | Device that will use the emulator (the controller) |
| emul | SDHC card emulator to register |