15#ifndef ZEPHYR_INCLUDE_DRIVERS_SDHC_EMUL_H_
16#define ZEPHYR_INCLUDE_DRIVERS_SDHC_EMUL_H_
APIs and macros for the Zephyr device model.
static void cmd(uint32_t command)
Execute a display list command by co-processor engine.
Definition ft8xx_reference_api.h:153
int(* sdhc_emul_card_present_t)(const struct emul *target)
Check if the emulated card is present.
Definition sdhc_emul.h:90
void sdhc_emul_raise_interrupt(const struct device *dev, int sources)
Raise an interrupt from an emulated SDHC card through its controller.
int(* sdhc_emul_card_busy_t)(const struct emul *target)
Check if the emulated card is busy.
Definition sdhc_emul.h:80
int sdhc_emul_register(const struct device *dev, struct sdhc_emul *emul)
Register an emulated card device on the controller.
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.
Definition sdhc_emul.h:68
struct sdhc_emul * sdhc_emul_get_card(const struct device *dev)
Find the first SDHC emulator registered on a controller.
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:44
Main header file for SDHC (Secure Digital Host Controller) driver API.
Header file for the single-linked list API.
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Runtime device structure (in ROM) per driver instance.
Definition device.h:543
An emulator instance - represents the target emulated device/peripheral that is interacted with throu...
Definition emul.h:90
const struct device * dev
handle to the device for which this provides low-level emulation
Definition emul.h:94
SD host controller command structure.
Definition sdhc.h:48
SD host controller data structure.
Definition sdhc.h:66
void * data
Data to transfer or receive.
Definition sdhc.h:74
Definition of the emulator API for SDHC card devices.
Definition sdhc_emul.h:119
sdhc_emul_request_t request
Pass an SDHC request to the card emulator.
Definition sdhc_emul.h:121
sdhc_emul_card_busy_t card_busy
Check if the emulated card is busy.
Definition sdhc_emul.h:124
sdhc_emul_card_present_t card_present
Check if the emulated card is present.
Definition sdhc_emul.h:127
Node in a linked list of emulators for SDHC card devices.
Definition sdhc_emul.h:37
struct sdhc_emul_api * mock_api
A mock API that if not NULL will take precedence over the actual API.
Definition sdhc_emul.h:51
const struct sdhc_emul_api * api
API provided for this device.
Definition sdhc_emul.h:45
uint16_t slot
Card slot index (typically 0 for single-slot controllers).
Definition sdhc_emul.h:54
sys_snode_t node
Linked list node for emulator registry.
Definition sdhc_emul.h:39
const struct emul * target
Target emulator - REQUIRED for all emulated bus nodes.
Definition sdhc_emul.h:42