Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
sdhc_emul.h
Go to the documentation of this file.
1/*
2 * Copyright 2026 Alif Semiconductor
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
16
17#ifndef ZEPHYR_INCLUDE_DRIVERS_SDHC_SDHC_EMUL_H_
18#define ZEPHYR_INCLUDE_DRIVERS_SDHC_SDHC_EMUL_H_
19
20#include <zephyr/device.h>
21#include <stdbool.h>
22#include <stdint.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
40int sdhc_emul_set_fault(const struct device *dev, uint8_t cmd_index);
41
52int sdhc_emul_clear_fault(const struct device *dev);
53
63int sdhc_emul_set_card_present(const struct device *dev, bool present);
64
76void sdhc_emul_trigger_sdio_irq(const struct device *dev, uint8_t fn);
77
90
100int sdhc_emul_get_block_count(const struct device *dev, uint32_t *count);
101
102#ifdef __cplusplus
103}
104#endif
105
106#endif /* ZEPHYR_INCLUDE_DRIVERS_SDHC_SDHC_EMUL_H_ */
APIs and macros for the Zephyr device model.
int sdhc_emul_clear_fault(const struct device *dev)
Clear any active fault injection.
uint8_t * sdhc_emul_get_storage(const struct device *dev)
Get a pointer to the emulated card storage.
int sdhc_emul_set_fault(const struct device *dev, uint8_t cmd_index)
Set fault injection on a specific CMD index.
int sdhc_emul_set_card_present(const struct device *dev, bool present)
Set the virtual card presence state.
void sdhc_emul_trigger_sdio_irq(const struct device *dev, uint8_t fn)
Trigger an SDIO interrupt.
int sdhc_emul_get_block_count(const struct device *dev, uint32_t *count)
Get the number of blocks in the emulated card.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Runtime device structure (in ROM) per driver instance.
Definition device.h:543