HPM SDMMC common APIs. More...
Functions | |
| hpm_stat_t | sdmmc_go_idle_state (sdmmc_host_t *host, uint32_t argument) |
| Switch device to Idle state. More... | |
| hpm_stat_t | sdmmc_go_inactive_state (sdmmc_host_t *host, uint16_t relative_addr) |
| Switch device to Inactive state. More... | |
| hpm_stat_t | sdmmc_select_card (sdmmc_host_t *host, uint16_t relative_addr, bool is_selected) |
| Select/De-select the device. More... | |
| hpm_stat_t | sdmmc_send_application_command (sdmmc_host_t *host, uint16_t relative_addr) |
| Send Application Command. More... | |
| hpm_stat_t | sdmmc_set_block_count (sdmmc_host_t *host, uint32_t block_count) |
| Set block count. More... | |
| hpm_stat_t | sdmmc_set_block_size (sdmmc_host_t *host, uint32_t block_size) |
| Set Block size. More... | |
| hpm_stat_t | sdmmc_enable_auto_tuning (const sdmmc_host_t *host) |
| Enable Auto Tuning mode. More... | |
| uint32_t | extract_csd_field (const uint32_t *raw_csd, uint8_t end_offset, uint8_t start_offset) |
| Extract Fields from raw CSD data. More... | |
| uint32_t | sdmmc_get_sys_addr (const sdmmc_host_t *host, uint32_t addr) |
| Get System address. More... | |
| hpm_stat_t | emmc_init (emmc_card_t *card) |
| Initialize eMMC device, include both host and the device. More... | |
| void | emmc_deinit (emmc_card_t *card) |
| De-Initialize eMMC device. More... | |
| hpm_stat_t | emmc_card_init (emmc_card_t *card) |
| Initialize eMMC device. More... | |
| hpm_stat_t | emmc_send_cid (emmc_card_t *card) |
| Request eMMC device to send CID to Host. More... | |
| hpm_stat_t | emmc_probe_device (emmc_card_t *card) |
| Probe eMMC device. More... | |
| hpm_stat_t | emmc_select_card (const emmc_card_t *card, bool is_selected) |
| Select eMMC device. More... | |
| hpm_stat_t | emmc_go_idle (emmc_card_t *card, emmc_idle_option_t option) |
| Go to Idle mode. More... | |
| hpm_stat_t | emmc_switch_function (const emmc_card_t *card, emmc_switch_cmd_arg_t arg, uint32_t timeout_us) |
| Switch eMMC function. More... | |
| hpm_stat_t | emmc_configure_partition (const emmc_card_t *card, emmc_config_partition_option_t option) |
| Configure eMMC Partition. More... | |
| hpm_stat_t | emmc_enable_high_density_erase_group (emmc_card_t *card, bool enable) |
| Enable High Density Erase group. More... | |
| hpm_stat_t | emmc_program_csd (emmc_card_t *card, const uint32_t *raw_csd) |
| Program CSD register. More... | |
| hpm_stat_t | emmc_read_blocks (emmc_card_t *card, uint8_t *buffer, uint32_t start_block, uint32_t block_count) |
| Read eMMC blocks. More... | |
| hpm_stat_t | emmc_write_blocks (emmc_card_t *card, const uint8_t *buffer, uint32_t start_block, uint32_t block_count) |
| Write eMMC blocks. More... | |
| hpm_stat_t | emmc_erase_blocks (emmc_card_t *card, uint32_t start_block, uint32_t block_count, emmc_erase_option_t option) |
| Erase eMMC Blocks. More... | |
| hpm_stat_t | emmc_enter_sleep_mode (const emmc_card_t *card) |
| Switch eMMC device into sleep mode. More... | |
| hpm_stat_t | emmc_exit_sleep_mode (const emmc_card_t *card) |
| Switch eMMC device into standby mode. More... | |
| hpm_stat_t | sdmmchost_init (sdmmc_host_t *host) |
| SDMMC Host Initialization. More... | |
| void | sdmmchost_set_card_bus_width (sdmmc_host_t *host, sdmmc_buswidth_t bus_width) |
| Set the card bus width. More... | |
| uint32_t | sdmmchost_set_card_clock (sdmmc_host_t *host, uint32_t freq, bool clock_inverse) |
| Set the Card clock. More... | |
| void | sdmmchost_deinit (sdmmc_host_t *host) |
| Deinitialize the host. More... | |
| void | sdmmchost_reset (const sdmmc_host_t *host) |
| Reset the host. More... | |
| void | sdmmchost_wait_card_active (const sdmmc_host_t *host) |
| Wait until the card is active. More... | |
| hpm_stat_t | sdmmchost_send_command (sdmmc_host_t *host, const sdmmchost_cmd_t *cmd) |
| Send command via the host. More... | |
| hpm_stat_t | sdmmchost_transfer (sdmmc_host_t *host, const sdmmchost_xfer_t *content) |
| Transfer data via the host. More... | |
| bool | sdmmchost_is_card_detected (const sdmmc_host_t *host) |
| Check whether the card is detected or not. More... | |
| void | sdmmchost_init_io (sdmmc_host_t *host, hpm_sdmmc_operation_mode_t operation_mode) |
| Initialize the Host IO according to the operation mode. More... | |
| void | sdmmchost_delay_ms (const sdmmc_host_t *host, uint32_t ms) |
| Host delay. More... | |
| hpm_stat_t | sdmmchost_switch_to_1v8 (sdmmc_host_t *host) |
| Switch the Host to 1.8V IO voltage. More... | |
| void | sdmmchost_vsel_pin_control (const sdmmc_host_t *host, hpm_sdmmc_io_volt_t io_volt) |
| Control the Voltage selection pin. More... | |
| void | sdmmchost_enable_emmc_support (const sdmmc_host_t *host, bool enable) |
| Enable the eMMC support on the host. More... | |
| hpm_stat_t | sdmmchost_set_speed_mode (const sdmmc_host_t *host, sdmmc_speed_mode_t speed_mode) |
| Set the speed mode via the Host. More... | |
| hpm_stat_t | sdmmchost_error_recovery (sdmmc_host_t *host, sdmmchost_cmd_t *cmd) |
| Trigger the Error recovery via the Host. More... | |
| bool | sdmmchost_is_voltage_switch_supported (const sdmmc_host_t *host) |
| Check whether the host support voltage switch. More... | |
| void | sdmmchost_enable_enhanced_data_strobe (const sdmmc_host_t *host, bool enable) |
| Enable the enhanced data strboe. More... | |
| void | sdmmchost_set_data_strobe_delay (const sdmmc_host_t *host) |
| Set the Data strobe delay for Host. More... | |
| void | sdmmchost_select_voltage (sdmmc_host_t *host, hpm_sdmmc_io_volt_t io_volt) |
| Select the IO voltage. More... | |
| void | sdmmchost_set_cardclk_delay_chain (const sdmmc_host_t *host) |
| Set the Card clock delay chain for the host. More... | |
| void | sdmmchost_set_rxclk_delay_chain (sdmmc_host_t *host) |
| Set the Card Rx Clock delay chain for the host. More... | |
| void | sdmmchost_irq_handler (sdmmc_host_t *host) |
| THe Host IRQ Handler. More... | |
| void | sdmmchost_register_sdio_callback (sdmmc_host_t *host, void(*sdio_irq_callback)(void *param), void *param) |
| Registers an SDIO interrupt callback function for the SDMMC host controller. More... | |
| void | sdmmchost_enable_sdio_interrupt (sdmmc_host_t *host, bool enable) |
| Enable or disable SDIO interrupt on the SDMMC host controller. More... | |
| uint32_t | sdmmchost_get_data_pin_level (sdmmc_host_t *host) |
| Return the data pin level. More... | |
| void | hpm_sdmmc_osal_delay (void *ctx, uint32_t ms) |
| Delay in milliseconds. More... | |
| hpm_sdmmc_osal_event_t | hpm_sdmmc_osal_event_create (void *ctx) |
| Create Event. More... | |
| hpm_stat_t | hpm_sdmmc_osal_event_delete (void *ctx, hpm_sdmmc_osal_event_t event) |
| Delete an event. More... | |
| hpm_stat_t | hpm_sdmmc_osal_event_wait (void *ctx, hpm_sdmmc_osal_event_t event, uint32_t flags, uint32_t timeout) |
| Wait specified event flags. More... | |
| void | hpm_sdmmc_osal_event_set (void *ctx, hpm_sdmmc_osal_event_t event, uint32_t flags) |
| Set specified event flags. More... | |
| void | hpm_sdmmc_osal_event_clear (void *ctx, hpm_sdmmc_osal_event_t event, uint32_t flags) |
| Clear specified event flags. More... | |
| void | hpm_sdmmc_osal_enter_critical (void *ctx) |
| Enter critical section. More... | |
| void | hpm_sdmmc_osal_exit_critical (void *ctx) |
| Exit critical section. More... | |
| hpm_stat_t | sd_init (sd_card_t *card) |
| Initialize SD device. More... | |
| void | sd_deinit (const sd_card_t *card) |
| De-Initialize SD device. More... | |
| hpm_stat_t | sd_card_init (sd_card_t *card) |
| Initialize SD card. More... | |
| void | sd_card_deinit (sd_card_t *card) |
| De-Initialize SD card. More... | |
| hpm_stat_t | sd_host_init (sd_card_t *card) |
| Initialize SD Host. More... | |
| hpm_stat_t | sd_host_deinit (sd_card_t *card) |
| De-Initialize SD Host. More... | |
| bool | sd_is_card_present (const sd_card_t *card) |
| Check whether the SD card is present. More... | |
| hpm_stat_t | sd_select_card (const sd_card_t *card, bool is_selected) |
| Select/Deselect SD card. More... | |
| hpm_stat_t | sd_read_status (sd_card_t *card) |
| Read SD card status. More... | |
| hpm_stat_t | sd_read_blocks (sd_card_t *card, uint8_t *buffer, uint32_t start_block, uint32_t block_count) |
| Read data from specified SD block. More... | |
| hpm_stat_t | sd_write_blocks (sd_card_t *card, const uint8_t *buffer, uint32_t start_block, uint32_t block_count) |
| Write data to specified SD block. More... | |
| hpm_stat_t | sd_erase_blocks (sd_card_t *card, uint32_t start_block, uint32_t block_count) |
| Erase specified SD ranges. More... | |
| hpm_stat_t | sd_set_driver_strength (sd_card_t *card, sd_drive_strength_t driver_strength) |
| Set the driver strength for SD card. More... | |
| hpm_stat_t | sd_set_max_current (sd_card_t *card, sd_max_current_t max_current) |
| Set the maximum current for SD card. More... | |
| hpm_stat_t | sd_polling_card_status_busy (sd_card_t *card, uint32_t timeout_ms) |
| Polling SD card status busy. More... | |
| static uint32_t | sdio_cis_csr_addr (const uint8_t *reg_ptr) |
| Get the CIS register address from raw register value. More... | |
| hpm_stat_t | sdio_init (sdio_card_t *card) |
| Initialize SDIO device. More... | |
| void | sdio_deinit (sdio_card_t *card) |
| De-initialize SDIO device. More... | |
| hpm_stat_t | sdio_card_init (sdio_card_t *card) |
| Initialize SDIO card. More... | |
| hpm_stat_t | sdio_card_deinit (sdio_card_t *card) |
| De-Initialize SDIO card. More... | |
| hpm_stat_t | sdio_host_init (sdio_card_t *card) |
| Initialize SDIO host. More... | |
| hpm_stat_t | sdio_host_deinit (sdio_card_t *card) |
| De-initialize SDIO host. More... | |
| hpm_stat_t | sdio_io_rw_direct (sdio_card_t *card, bool write, uint32_t func_idx, uint32_t reg_addr, uint8_t *pdata, bool read_after_write) |
| Execute SDIO_IO_RW_DIRECT command (CMD52) More... | |
| hpm_stat_t | sdio_set_block_size (sdio_card_t *card, uint32_t func_idx, uint32_t block_size) |
| Set the Block size for specified Function. More... | |
| hpm_stat_t | sdio_io_rw_extend (sdio_card_t *card, bool write, uint32_t func_idx, uint32_t reg_addr, uint32_t op_code, uint8_t *pbuf, uint32_t blocks, uint32_t block_size) |
| Execute SDIO_IO_RW_EXTEND command (CMD53) More... | |
| hpm_stat_t | sdio_io_write_multi_bytes_to_fifo (sdio_card_t *card, uint32_t func_idx, uint32_t reg_addr, uint8_t *pbuf, uint32_t length) |
| Write multiple bytes to the FIFO address for specified SDIO Function. More... | |
| hpm_stat_t | sdio_io_read_multi_bytes_from_fifo (sdio_card_t *card, uint32_t func_idx, uint32_t reg_addr, uint8_t *pbuf, uint32_t length) |
| Read multiple bytes from the FIFO address for specified SDIO Function. More... | |
| hpm_stat_t | sdio_io_write_incr_multi_bytes (sdio_card_t *card, uint32_t func_idx, uint32_t reg_addr, uint8_t *pbuf, uint32_t length) |
| Write multiple bytes to the address for specified SDIO Function. More... | |
| hpm_stat_t | sdio_io_read_incr_multi_bytes (sdio_card_t *card, uint32_t func_idx, uint32_t reg_addr, uint8_t *pbuf, uint32_t length) |
| Read multiple bytes from the address for specified SDIO Function. More... | |
| hpm_stat_t | sdio_io_read_byte (sdio_card_t *card, uint32_t func_idx, uint32_t reg_addr, uint8_t *pdata) |
| Read 1 byte from the address for specified SDIO Function. More... | |
| hpm_stat_t | sdio_io_write_byte (sdio_card_t *card, uint32_t func_idx, uint32_t reg_addr, uint8_t byte_data) |
| Write 1 byte to the address for specified SDIO Function. More... | |
| const char * | sdio_get_func_if_code_str (uint8_t std_func_if_code) |
| Get the string for specified function interface code. More... | |
| hpm_stat_t | sdio_read_fbr (sdio_card_t *card, uint32_t func_idx, sdio_fbr_t *fbr) |
| Read the specified Function Basic Register. More... | |
| hpm_stat_t | sdio_read_cis (sdio_card_t *card, uint32_t cis_ptr, sdio_cis_t *cis, bool keep_tpl_raw_data) |
| Read Card Information Structure (CIS) More... | |
| hpm_stat_t | sdio_get_max_transfer_speed (sdio_card_t *card) |
| Get the maximum transfer speed. More... | |
| hpm_stat_t | sdio_init_funcs (sdio_card_t *card) |
| Initialize SDIO functions. More... | |
| hpm_stat_t | sdio_deinit_funcs (sdio_card_t *card) |
| De-Initialize SDIO functions. More... | |
| hpm_stat_t | sdio_enable_interrupt (sdio_card_t *card) |
| Enables SDIO interrupts for the specified card. More... | |
| hpm_stat_t | sdio_disable_interrupt (sdio_card_t *card) |
| Disables SDIO interrupts for the specified card. More... | |
| hpm_stat_t | sdio_register_irq_callback (sdio_card_t *card, void(*sdio_irq_callback)(void *param), void *sdio_irq_param) |
| Registers an interrupt callback function for an SDIO card. More... | |
| hpm_stat_t | board_init_sd_host_params (sdmmc_host_t *host, SDMMCHOST_Type *base) |
| Initialize board-level SD Host parameters. More... | |
| hpm_stat_t | board_init_emmc_host_params (sdmmc_host_t *host, SDMMCHOST_Type *base) |
| Initialize board-level eMMC Host parameters. More... | |
| hpm_stat_t | board_init_sdio_host_params (sdmmc_host_t *host, SDMMCHOST_Type *base) |
| Initialize board-level SDIO Host parameters. More... | |
HPM SDMMC common APIs.
HPM SDMMC portable APIs.
HPM SDIO driver APIs.
HPM SDMMC SD driver APIs.
HPM SDMMC OSAL APIs.
HPM SDMMC Host APIs.
HPM SDMMC eMMC driver APIs.
| #define CISTPL_ALTSTR (0x16) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define CISTPL_CHECKSUM (0x10) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define CISTPL_END (0xFF) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define CISTPL_FUNCE (0x22) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define CISTPL_FUNCID (0x21) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define CISTPL_MANFID (0x20) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define CISTPL_NULL (0) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
CISTPL type definitions.
| #define CISTPL_SDIO_EXT (0x92) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define CISTPL_SDIO_STD (0x91) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define CISTPL_VERS_1 (0x15) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define EMMC_EXT_CSD_INDEX_BARRIER_CTRL (31) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_BKOPS_EN (163) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_BKOPS_START (164) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_BOOT_BUS_CONDITIONS (177) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_BOOT_CONFIG_PROT (178) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_BOOT_WP (173) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_BUS_WDITH (183) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_CACHE_CTRL (33) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_CLASS_6_CTRL (59) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_CMD_SET (191) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_CMDQ_MODE_EN (15) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_ERASE_GROUP_DEF (175) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_FLUSH_CACHE (32) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_FW_CONFIG (169) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_HPI_MGMT (161) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_HS_TIMING (185) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_MODE_CONFIG (30) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_PARTITION_CONFIG (179) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_PARTITION_SETTING_COMPLETED (155) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_PARTITIONS_ATTRIBUTE (156) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_PERIODIC_WAKEUP (131) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_POWER_CLASS (187) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_POWER_OFF_NOTIFICATION (34) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_PRODUCT_STATE_AWARENESS_ENABLEMENT (17) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_PRODUCTION_STATE_AWARENESS (133) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_RSTn_FUNCTION (162) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_SANITIZE_START (165) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_SEC_BAD_BLK_MGMNT (134) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_SECURE_REMOVAL_TYPE (16) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_USE_NATIVE_SECTOR (62) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_USER_WP (171) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define EMMC_EXT_CSD_INDEX_WR_REL_SET (167) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| #define HPM_SDMMC_FREE free |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
| #define HPM_SDMMC_HOST_ADMA3_ALIGN_SIZE (8U) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_ADMA_TBL_SIZE (SDXC_AMDA3_DESC_MIN_WORDS * 2UL) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_CD_IN_IP (HPM_SDMMC_HOST_SUPPORT_CARD_DETECTION << 8) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_PWR_IN_IP (HPM_SDMMC_HOST_SUPPORT_POWER_SWITCH << 8) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_RST_IN_IP (HPM_SDMMC_HOST_SUPPORT_RESET_PIN << 8) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_SUPPORT_1V8 (1UL << 3) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_SUPPORT_3V3 (1UL << 2) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_SUPPORT_4BIT (1UL << 0) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_SUPPORT_8BIT (1UL << 1) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_SUPPORT_CARD_DETECTION (1UL << 16) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_SUPPORT_DATA_STROBE (1UL << 21) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_SUPPORT_DDR (1UL << 4) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_SUPPORT_HS200 (1UL << 7) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_SUPPORT_HS400 (1Ul << 8) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_SUPPORT_POWER_SWITCH (1UL << 18) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_SUPPORT_RESET_PIN (1UL << 20) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_SUPPORT_SDR104 (1UL << 6) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_SUPPORT_SDR50 (1UL << 5) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_SUPPORT_VOLTAGE_SWITCH (1UL << 17) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_SUPPORT_WRITE_PROTECTION (1UL << 19) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_VSEL_IN_IP (HPM_SDMMC_HOST_SUPPORT_VOLTAGE_SWITCH << 8) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_HOST_WP_IN_IP (HPM_SDMMC_HOST_SUPPORT_WRITE_PROTECTION << 8) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| #define HPM_SDMMC_MALLOC malloc |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
| #define HPM_SDMMC_OSAL_WAIT_FOREVER (0xFFFFFFFFUL) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_osal.h>
| #define MMC_CLOCK_26MHz (26000000UL) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
| #define MMC_CLOCK_52MHz (52000000UL) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
| #define MMC_CLOCK_DDR52 (52000000UL) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
| #define MMC_CLOCK_HS200 (200000000UL) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
| #define MMC_CLOCK_HS400 (200000000UL) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
| #define SD_CLOCK_100MHZ (100000000UL) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
| #define SD_CLOCK_208MHZ (208000000UL) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
| #define SD_CLOCK_25MHZ (25000000UL) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
| #define SD_CLOCK_50MHZ (50000000UL) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
| #define SDIO_CCCR_BUS_SPEED_DDR50 (SDIO_SPEED_DDR50 << 1) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_CCCR_BUS_SPEED_DEFAULT (SDIO_SPEED_DEFAULT_SPEED << 1) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_CCCR_BUS_SPEED_HIGH (SDIO_SPEED_HIGH_SPEED << 1) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_CCCR_BUS_SPEED_MASK (0x7UL << 1) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
SDIO BUS speed definitions in CCCR register.
| #define SDIO_CCCR_BUS_SPEED_SDR104 (SDIO_SPEED_SDR104 << 1) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_CCCR_BUS_SPEED_SDR12 (SDIO_CCCR_BUS_SPEED_DEFAULT) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_CCCR_BUS_SPEED_SDR25 (SDIO_CCCR_BUS_SPEED_HIGH) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_CCCR_BUS_SPEED_SDR50 (SDIO_SPEED_SDR50 << 1) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_CCCR_BUS_SPEED_SUPPORT_HIGHSPEED (1) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_CCCR_BUS_WIDTH_1BIT 0UL |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
SDIO Bus width definitions.
| #define SDIO_CCCR_BUS_WIDTH_4BIT 2UL |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_CMD53_OP_MODE_FIXED_ADDR 0 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Fixed Address in CMD53
| #define SDIO_CMD53_OP_MODE_INCR_ADDR 1 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Incremental Address in CMD53
| #define SDIO_CMD_TIMEOUT_MS (1000UL) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
SDIO Command Timeout in milliseconds
| #define SDIO_FBR_REG_BASE | ( | fbr | ) | ((fbr) * 0x100) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
FBR base address for specified function
| #define SDIO_MAX_FUNC_NUM 7 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Maximum supported functions
| #define SDIO_REG_CCCR_BUS_IF_CTRL 7 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_BUS_SPEED_SEL 0x13 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_BUS_SUSPEND 0xC |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_CARD_CAP 8 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_COM_CIS_PTR 9 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_DRV_STRENGTH 0x15 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_END SDIO_REG_CCCR_INT_EXT |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_EXEC_FLAGS 0xE |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_FN0_BLK_SIZE 0x10 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_FUNC_SEL 0xD |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_INT_ENABLE 4 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_INT_EXT 0x16 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_INT_PENDING 5 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_IO_ABORT 6 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_IO_ENABLE 2 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_IO_READY 3 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_POWER_CTRL 0x12 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_READY_FLAGS 0xF |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_SD_REV 1 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_CCCR_SDIO_REV 0 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
CCCR register address.
| #define SDIO_REG_CCCR_START SDIO_REG_CCCR_SDIO_REV |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
CCCR register range definitions.
| #define SDIO_REG_CCCR_UHS_SUPPORT 0x14 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_FBR_CIS_PTR_OFFSET 0x9 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_FBR_CSR_PTR_OFFSET 0xC |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_REG_FBR_MAX_BLK_SIZE_OFFSET 0x10 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_SPEED_DDR50 4UL |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_SPEED_DEFAULT_SPEED 0UL |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
SDIO Speed definitions.
| #define SDIO_SPEED_HIGH_SPEED 1UL |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_SPEED_SDR104 3UL |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_SPEED_SDR12 SDIO_SPEED_DEFAULT_SPEED |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_SPEED_SDR25 SDIO_SPEED_HIGH_SPEED |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDIO_SPEED_SDR50 2UL |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define SDMMC_CLOCK_400KHZ (400000UL) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
| #define STD_SDIO_FUNC_IF_CODE_ATA 8 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define STD_SDIO_FUNC_IF_CODE_BT_TYPEA 2 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define STD_SDIO_FUNC_IF_CODE_BT_TYPEA_AMP 9 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define STD_SDIO_FUNC_IF_CODE_BT_TYPEB 3 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define STD_SDIO_FUNC_IF_CODE_CAMERA 5 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define STD_SDIO_FUNC_IF_CODE_EXT_STD 0xF |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define STD_SDIO_FUNC_IF_CODE_GPS 4 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define STD_SDIO_FUNC_IF_CODE_ISDIO 0xE |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define STD_SDIO_FUNC_IF_CODE_NON_STD 0 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Standard SDIO Function Interface Code Definitions.
| #define STD_SDIO_FUNC_IF_CODE_PHS 6 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define STD_SDIO_FUNC_IF_CODE_UART 1 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| #define STD_SDIO_FUNC_IF_CODE_WLAN 7 |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| typedef struct _sdmmc_emmc emmc_card_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| typedef enum _emmc_hs_timing emmc_hs_timing_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| typedef enum _emmc_partition emmc_partition_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| typedef volatile uint32_t* hpm_sdmmc_osal_event_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_osal.h>
| typedef struct _sdmmc_sdcard sd_card_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
| typedef struct _sdmmc_sdio sdio_card_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
| typedef struct sdio_tpl_block * sdio_tpl_blk_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
TPL block structure.
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| typedef bool(* sdmmchost_card_detect_func_t) (SDMMCHOST_Type *base) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| typedef uint32_t(* sdmmchost_clock_init_func_t) (SDMMCHOST_Type *base, uint32_t clk_freq, bool need_reverse) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| typedef void(* sdmmchost_cmd_line_init_func_t) (SDMMCHOST_Type *base, bool push_pull) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| typedef sdxc_command_t sdmmchost_cmd_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| typedef sdxc_data_t sdmmchost_data_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| typedef void(* sdmmchost_io_init_func_t) (SDMMCHOST_Type *base) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| typedef void(* sdmmchost_power_switch_func_t) (SDMMCHOST_Type *base, bool on_off) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| typedef void(* sdmmchost_switch_1v8_io_func_t) (SDMMCHOST_Type *base) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| typedef SDXC_Type SDMMCHOST_Type |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| typedef sdxc_xfer_t sdmmchost_xfer_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| typedef enum vdd_current_max_def vdd_current_max_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| typedef enum vdd_current_min_def vdd_current_min_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| anonymous enum |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
| Enumerator | |
|---|---|
| sdmmc_state_idle | |
| sdmmc_state_ready | |
| sdmmc_state_identify | |
| sdmmc_state_standby | |
| sdmmc_state_transfer | |
| sdmmc_state_send_data | |
| sdmmc_state_receive_data | |
| sdmmc_state_program | |
| sdmmc_state_disconnect | |
| anonymous enum |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
| Enumerator | |
|---|---|
| status_sdmmc_card_not_support | |
| status_sdmmc_wait_card_insert_timeout | |
| status_sdmmc_no_sd_card_inserted | |
| status_sdmmc_device_init_required | |
| status_sdmmc_wait_busy_timeout | |
| anonymous enum |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
| Enumerator | |
|---|---|
| sd_switch_function_group_access_mode | |
| sd_switch_function_group_command_system | |
| sd_switch_function_group_drive_strength | |
| sd_switch_function_group_power_limit | |
| anonymous enum |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
| Enumerator | |
|---|---|
| sd_switch_function_mode_check | |
| sd_switch_function_mode_set | |
| enum emmc_boot_mode_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| Enumerator | |
|---|---|
| emmc_boot_mode_sdr_legacy | |
| emmc_boot_mode_sdr_high_speed_timing | |
| emmc_boot_mode_ddr | |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| Enumerator | |
|---|---|
| boot_partition_enable_option_not_enabled | |
| boot_partition_enable_option_boot_partition1 | |
| boot_partition_enable_option_boot_partition2 | |
| boot_partition_enable_option_user_area | |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| Enumerator | |
|---|---|
| emmc_boot_partition_mode_not_enabled | |
| emmc_boot_partition_mode_boot_partition1 | |
| emmc_boot_partition_mode_boot_partition2 | |
| emmc_boot_partition_mode_user_area | |
| enum emmc_bus_mode_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| Enumerator | |
|---|---|
| emmc_bus_mode_x1_sdr | |
| emmc_bus_mode_x4_sdr | |
| emmc_bus_mode_x8_sdr | |
| emmc_bus_mode_x4_ddr | |
| emmc_bus_mode_x8_ddr | |
| emmc_bus_mode_x8_ddr_ds | |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| enum emmc_erase_option_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| Enumerator | |
|---|---|
| emmc_erase_option_erase | eMMC Erase operation |
| emmc_erase_option_trim | eMMC Trim operation |
| emmc_erase_option_discard | eMMC Discard operation |
| enum emmc_idle_option_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| Enumerator | |
|---|---|
| emmc_idle_option_go_idle_state | |
| emmc_idle_option_go_pre_idle_state | |
| emmc_idle_option_boot_initialization | |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| Enumerator | |
|---|---|
| emmc_switch_cmd_access_mode_command_set | |
| emmc_switch_cmd_access_mode_set_bits | |
| emmc_switch_cmd_access_mode_clear_bits | |
| emmc_switch_cmd_access_mode_write_byte | |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| Enumerator | |
|---|---|
| emmc_write_protection_mode_legacy | |
| emmc_write_protection_mode_secure | |
| enum hpm_sdmmc_io_volt_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
SDMMC IO Voltage.
| Enumerator | |
|---|---|
| hpm_sdmmc_io_voltage_3v3 | IO voltage is 3.3v |
| hpm_sdmmc_io_voltage_1v8 | IO voltage is 1.8v |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
SDMMC Operation mode.
| Enumerator | |
|---|---|
| hpm_sdmmc_operation_mode_inactive | |
| hpm_sdmmc_operation_mode_identification | |
| hpm_sdmmc_operation_mode_transfer | |
| hpm_sdmmc_operation_mode_interrupt | |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
| Enumerator | |
|---|---|
| hpm_sdmmc_power_off | Power Off the SDMMC |
| hpm_sdmmc_power_up | Power up the SDMMC |
| hpm_sdmmc_power_on | Power on the SDMMC |
| enum sd_drive_strength_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
| Enumerator | |
|---|---|
| sd_drive_strength_type_b | |
| sd_drive_strength_type_a | |
| sd_drive_strength_type_c | |
| sd_drive_strength_type_d | |
| enum sd_max_current_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
| Enumerator | |
|---|---|
| sd_current_limit_200ma | |
| sd_current_limit_400ma | |
| sd_current_limit_600ma | |
| sd_current_limit_800ma | |
| enum sd_timing_mode_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
| Enumerator | |
|---|---|
| sd_timing_sdr12_default | |
| sd_timing_sdr25_highspeed | |
| sd_timing_sdr50 | |
| sd_timing_sdr104 | |
| sd_timing_ddr50 | |
| enum sdmmc_buswidth_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
SD/MMC Bus Width definitions.
| Enumerator | |
|---|---|
| sdmmc_bus_width_1bit | |
| sdmmc_bus_width_4bit | |
| sdmmc_bus_width_8bit | |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
SD/MMC Host Card Detection Modes.
| Enumerator | |
|---|---|
| sdmmc_host_card_detection_none | |
| sdmmc_host_card_detection_via_gpio | |
| sdmmc_host_card_detection_via_sdxc | |
| enum sdmmc_dev_type_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
SD/MMC Device Type definitions.
| Enumerator | |
|---|---|
| sdmmc_dev_type_emmc | |
| sdmmc_dev_type_sd | |
| sdmmc_dev_type_sdio | |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
| Enumerator | |
|---|---|
| sdmmc_operation_voltage_1v8 | |
| sdmmc_operation_voltage_3v0 | |
| sdmmc_operation_voltage_3v3 | |
| enum sdmmc_resp_type_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
| Enumerator | |
|---|---|
| sdmmc_resp_none | |
| sdmmc_resp_r1 | |
| sdmmc_resp_r1b | |
| sdmmc_resp_r2 | |
| sdmmc_resp_r3 | |
| sdmmc_resp_r4 | |
| sdmmc_resp_r5 | |
| sdmmc_resp_r5b | |
| sdmmc_resp_r6 | |
| sdmmc_resp_r7 | |
| enum sdmmc_speed_mode_t |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
SD/MMC Speed definitions.
| enum vdd_current_max_def |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| Enumerator | |
|---|---|
| vdd_current_max_1ma | |
| vdd_current_max_5ma | |
| vdd_current_max_10ma | |
| vdd_current_max_25ma | |
| vdd_current_max_35ma | |
| vdd_current_max_45ma | |
| vdd_current_max_80ma | |
| vdd_current_max_200ma | |
| enum vdd_current_min_def |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
| Enumerator | |
|---|---|
| vdd_current_min_0_5ma | |
| vdd_current_min_1ma | |
| vdd_current_min_5ma | |
| vdd_current_min_10ma | |
| vdd_current_min_25ma | |
| vdd_current_min_35ma | |
| vdd_current_min_60ma | |
| vdd_current_min_100ma | |
| hpm_stat_t board_init_emmc_host_params | ( | sdmmc_host_t * | host, |
| SDMMCHOST_Type * | base | ||
| ) |
#include <middleware/hpm_sdmmc/port/hpm_sdmmc_port.h>
Initialize board-level eMMC Host parameters.
| [in,out] | host | Host context |
| [in] | base | Host base address |
| hpm_stat_t board_init_sd_host_params | ( | sdmmc_host_t * | host, |
| SDMMCHOST_Type * | base | ||
| ) |
#include <middleware/hpm_sdmmc/port/hpm_sdmmc_port.h>
Initialize board-level SD Host parameters.
| [in,out] | host | Host context |
| [in] | base | SD Host base address |
| hpm_stat_t board_init_sdio_host_params | ( | sdmmc_host_t * | host, |
| SDMMCHOST_Type * | base | ||
| ) |
#include <middleware/hpm_sdmmc/port/hpm_sdmmc_port.h>
Initialize board-level SDIO Host parameters.
| [in,out] | host | Host context |
| [in] | base | Host base address |
| hpm_stat_t emmc_card_init | ( | emmc_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
Initialize eMMC device.
| [in,out] | card | eMMC card context |
| hpm_stat_t emmc_configure_partition | ( | const emmc_card_t * | card, |
| emmc_config_partition_option_t | option | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
Configure eMMC Partition.
| [in,out] | card | eMMC card context |
| [in] | option | Partition configuration option |
| void emmc_deinit | ( | emmc_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
De-Initialize eMMC device.
| [in,out] | card | eMMC card context |
| hpm_stat_t emmc_enable_high_density_erase_group | ( | emmc_card_t * | card, |
| bool | enable | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
Enable High Density Erase group.
| [in,out] | card | eMMC card context |
| [in] | enable | Flag for enabling the high density erase group |
| hpm_stat_t emmc_enter_sleep_mode | ( | const emmc_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
Switch eMMC device into sleep mode.
| [in,out] | card | eMMC card context |
| hpm_stat_t emmc_erase_blocks | ( | emmc_card_t * | card, |
| uint32_t | start_block, | ||
| uint32_t | block_count, | ||
| emmc_erase_option_t | option | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
Erase eMMC Blocks.
| [in,out] | card | eMMC card context |
| [in] | start_block | The start block = |
| [in] | block_count | Number of blocks to be erased |
| [in] | option | Erase option |
| hpm_stat_t emmc_exit_sleep_mode | ( | const emmc_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
Switch eMMC device into standby mode.
| [in,out] | card | eMMC card context |
| hpm_stat_t emmc_go_idle | ( | emmc_card_t * | card, |
| emmc_idle_option_t | option | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
Go to Idle mode.
| [in,out] | card | eMMC card context |
| [in] | option | eMMC idle options |
| hpm_stat_t emmc_init | ( | emmc_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
Initialize eMMC device, include both host and the device.
| [in,out] | card | eMMC card context |
| hpm_stat_t emmc_probe_device | ( | emmc_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
Probe eMMC device.
| [in,out] | card | eMMC card context |
| hpm_stat_t emmc_program_csd | ( | emmc_card_t * | card, |
| const uint32_t * | raw_csd | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
Program CSD register.
| [in,out] | card | eMMC card context |
| [in] | raw_csd | raw CSD buffer |
| hpm_stat_t emmc_read_blocks | ( | emmc_card_t * | card, |
| uint8_t * | buffer, | ||
| uint32_t | start_block, | ||
| uint32_t | block_count | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
Read eMMC blocks.
| [in,out] | card | eMMC card context |
| [out] | buffer | Data buffer |
| [in] | start_block | Start Block index |
| [in] | block_count | Number of blocks to be read |
| hpm_stat_t emmc_select_card | ( | const emmc_card_t * | card, |
| bool | is_selected | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
Select eMMC device.
| [in,out] | card | eMMC card context |
| [in] | is_selected | Select/De-select the eMMC device |
| hpm_stat_t emmc_send_cid | ( | emmc_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
Request eMMC device to send CID to Host.
| [in,out] | card | eMMC card context |
| hpm_stat_t emmc_switch_function | ( | const emmc_card_t * | card, |
| emmc_switch_cmd_arg_t | arg, | ||
| uint32_t | timeout_us | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
Switch eMMC function.
| [in,out] | card | eMMC card context |
| [in] | arg | Switch command argument |
| [in] | timeout_us | Timeout in microseconds |
| hpm_stat_t emmc_write_blocks | ( | emmc_card_t * | card, |
| const uint8_t * | buffer, | ||
| uint32_t | start_block, | ||
| uint32_t | block_count | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_emmc.h>
Write eMMC blocks.
| [in,out] | card | eMMC card context |
| [in] | buffer | Buffer to be written |
| [in] | start_block | Start block index |
| [in] | block_count | Number of blocks to be written |
| uint32_t extract_csd_field | ( | const uint32_t * | raw_csd, |
| uint8_t | end_offset, | ||
| uint8_t | start_offset | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
Extract Fields from raw CSD data.
| [in] | raw_csd | Raw CSD data array |
| [in] | end_offset | end offset of the specific field (in terms of bit) |
| [in] | start_offset | start offset of the specific field (in terms of bit) |
| void hpm_sdmmc_osal_delay | ( | void * | ctx, |
| uint32_t | ms | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_osal.h>
Delay in milliseconds.
| [in] | ctx | OSAL context |
| [in] | ms | Delay in milliseconds |
| void hpm_sdmmc_osal_enter_critical | ( | void * | ctx | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_osal.h>
Enter critical section.
| [in] | ctx | OSAL context |
| void hpm_sdmmc_osal_event_clear | ( | void * | ctx, |
| hpm_sdmmc_osal_event_t | event, | ||
| uint32_t | flags | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_osal.h>
Clear specified event flags.
| [in] | ctx | OSAL context |
| [in] | event | The event |
| [in] | flags | The flags to clear |
| hpm_sdmmc_osal_event_t hpm_sdmmc_osal_event_create | ( | void * | ctx | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_osal.h>
Create Event.
| [in] | ctx | OSAL context |
| hpm_stat_t hpm_sdmmc_osal_event_delete | ( | void * | ctx, |
| hpm_sdmmc_osal_event_t | event | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_osal.h>
Delete an event.
| [in] | ctx | OSAL context |
| [in] | event | The event to be removed |
| void hpm_sdmmc_osal_event_set | ( | void * | ctx, |
| hpm_sdmmc_osal_event_t | event, | ||
| uint32_t | flags | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_osal.h>
Set specified event flags.
| [in] | ctx | OSAL context |
| [in] | event | The event |
| [in] | flags | The flags to set |
| hpm_stat_t hpm_sdmmc_osal_event_wait | ( | void * | ctx, |
| hpm_sdmmc_osal_event_t | event, | ||
| uint32_t | flags, | ||
| uint32_t | timeout | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_osal.h>
Wait specified event flags.
| [in] | ctx | OSAL context |
| [in] | event | The event |
| [in] | flags | The flags to wait |
| [in] | timeout | Timeout in milliseconds |
| void hpm_sdmmc_osal_exit_critical | ( | void * | ctx | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_osal.h>
Exit critical section.
| [in] | ctx | OSAL context |
| void sd_card_deinit | ( | sd_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
De-Initialize SD card.
| [in,out] | card | SD card context |
| hpm_stat_t sd_card_init | ( | sd_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
Initialize SD card.
| [in,out] | card | SD card context |
Send CMD: Set power limit
| void sd_deinit | ( | const sd_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
De-Initialize SD device.
| [in,out] | card | SD card context |
| hpm_stat_t sd_erase_blocks | ( | sd_card_t * | card, |
| uint32_t | start_block, | ||
| uint32_t | block_count | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
Erase specified SD ranges.
| [in] | card | SD card context |
| [in] | start_block | start block index |
| [in] | block_count | Number of blocks to be erased |
| hpm_stat_t sd_host_deinit | ( | sd_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
De-Initialize SD Host.
| [in,out] | card | SD card context |
| hpm_stat_t sd_host_init | ( | sd_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
Initialize SD Host.
| [in,out] | card | SD card context |
| hpm_stat_t sd_init | ( | sd_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
Initialize SD device.
| [in,out] | card | SD card context |
| bool sd_is_card_present | ( | const sd_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
Check whether the SD card is present.
| [in] | card | SD card context |
| hpm_stat_t sd_polling_card_status_busy | ( | sd_card_t * | card, |
| uint32_t | timeout_ms | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
Polling SD card status busy.
| [in] | card | SD card context |
| [in] | timeout_ms | Timeout in milliseconds |
| hpm_stat_t sd_read_blocks | ( | sd_card_t * | card, |
| uint8_t * | buffer, | ||
| uint32_t | start_block, | ||
| uint32_t | block_count | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
Read data from specified SD block.
| [in] | card | SD card context |
| [out] | buffer | buffer to store data |
| [in] | start_block | start block index |
| [in] | block_count | Number of blocks to be read |
| hpm_stat_t sd_read_status | ( | sd_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
Read SD card status.
| [in] | card | SD card context |
| hpm_stat_t sd_select_card | ( | const sd_card_t * | card, |
| bool | is_selected | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
Select/Deselect SD card.
| [in] | card | SD card context |
| [in] | is_selected | true: select, false: deselect |
| hpm_stat_t sd_set_driver_strength | ( | sd_card_t * | card, |
| sd_drive_strength_t | driver_strength | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
Set the driver strength for SD card.
| [in] | card | SD card context |
| [in] | driver_strength | Driver strength |
| hpm_stat_t sd_set_max_current | ( | sd_card_t * | card, |
| sd_max_current_t | max_current | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
Set the maximum current for SD card.
| [in] | card | SD card context |
| [in] | max_current | Maximum current |
| hpm_stat_t sd_write_blocks | ( | sd_card_t * | card, |
| const uint8_t * | buffer, | ||
| uint32_t | start_block, | ||
| uint32_t | block_count | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sd.h>
Write data to specified SD block.
| [in] | card | SD card context |
| [in] | buffer | Data buffer |
| [in] | start_block | start block index |
| [in] | block_count | Number of blocks to be written |
| hpm_stat_t sdio_card_deinit | ( | sdio_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
De-Initialize SDIO card.
| [in,out] | card | SDIO card context |
| hpm_stat_t sdio_card_init | ( | sdio_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Initialize SDIO card.
| [in,out] | card | SDIO card context |
|
inlinestatic |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Get the CIS register address from raw register value.
| [in] | reg_ptr | Pointer to the register value |
| void sdio_deinit | ( | sdio_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
De-initialize SDIO device.
| [in,out] | card | SDIO card context |
| hpm_stat_t sdio_deinit_funcs | ( | sdio_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
De-Initialize SDIO functions.
| [in,out] | card | SDIO card context |
| hpm_stat_t sdio_disable_interrupt | ( | sdio_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Disables SDIO interrupts for the specified card.
This function disables the SDIO interrupts associated with the given SDIO card. It ensures that the card and its host are valid before proceeding to disable the interrupts.
| [in,out] | card | A pointer to the sdio_card_t structure representing the SDIO card. |
| hpm_stat_t sdio_enable_interrupt | ( | sdio_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Enables SDIO interrupts for the specified card.
This function activates the SDIO interrupts by utilizing the host controller. It is essential to ensure that the card and its associated host controller are properly initialized before calling this function.
| [in,out] | card | A pointer to the sdio_card_t structure representing the SDIO card. Must not be NULL and should have a valid host controller pointer. |
| const char* sdio_get_func_if_code_str | ( | uint8_t | std_func_if_code | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Get the string for specified function interface code.
| [in] | std_func_if_code | Standard function interface code |
| hpm_stat_t sdio_get_max_transfer_speed | ( | sdio_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Get the maximum transfer speed.
| [in] | card | SDIO card context |
| hpm_stat_t sdio_host_deinit | ( | sdio_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
De-initialize SDIO host.
| [in,out] | card | SDIO card context |
| hpm_stat_t sdio_host_init | ( | sdio_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Initialize SDIO host.
| [in,out] | card | SDIO card context |
| hpm_stat_t sdio_init | ( | sdio_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Initialize SDIO device.
| [in,out] | card | SDIO card context |
| hpm_stat_t sdio_init_funcs | ( | sdio_card_t * | card | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Initialize SDIO functions.
| [in,out] | card | SDIO card context |
| hpm_stat_t sdio_io_read_byte | ( | sdio_card_t * | card, |
| uint32_t | func_idx, | ||
| uint32_t | reg_addr, | ||
| uint8_t * | pdata | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Read 1 byte from the address for specified SDIO Function.
| [in,out] | card | SDIO card context |
| [in] | func_idx | SDIO function index |
| [in] | reg_addr | Register address |
| [out] | pdata | Pointer to data buffer |
| hpm_stat_t sdio_io_read_incr_multi_bytes | ( | sdio_card_t * | card, |
| uint32_t | func_idx, | ||
| uint32_t | reg_addr, | ||
| uint8_t * | pbuf, | ||
| uint32_t | length | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Read multiple bytes from the address for specified SDIO Function.
| [in,out] | card | SDIO card context |
| [in] | func_idx | SDIO function index |
| [in] | reg_addr | Register address |
| [in,out] | pbuf | Pointer to data buffer |
| [in] | length | bytes to be read |
< Incremental Address in CMD53
| hpm_stat_t sdio_io_read_multi_bytes_from_fifo | ( | sdio_card_t * | card, |
| uint32_t | func_idx, | ||
| uint32_t | reg_addr, | ||
| uint8_t * | pbuf, | ||
| uint32_t | length | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Read multiple bytes from the FIFO address for specified SDIO Function.
| [in,out] | card | SDIO card context |
| [in] | func_idx | SDIO function index |
| [in] | reg_addr | Register address |
| [out] | pbuf | Pointer to data buffer |
| [in] | length | bytes to be read |
< Fixed Address in CMD53
| hpm_stat_t sdio_io_rw_direct | ( | sdio_card_t * | card, |
| bool | write, | ||
| uint32_t | func_idx, | ||
| uint32_t | reg_addr, | ||
| uint8_t * | pdata, | ||
| bool | read_after_write | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Execute SDIO_IO_RW_DIRECT command (CMD52)
| [in,out] | card | SDIO card context |
| [in] | write | true: write, false: read |
| [in] | func_idx | SDIO function index |
| [in] | reg_addr | Register address |
| [in,out] | pdata | pass in data if write is true or read_after_write is true, output data if write is false |
| [in] | read_after_write | true: read data after write |
| hpm_stat_t sdio_io_rw_extend | ( | sdio_card_t * | card, |
| bool | write, | ||
| uint32_t | func_idx, | ||
| uint32_t | reg_addr, | ||
| uint32_t | op_code, | ||
| uint8_t * | pbuf, | ||
| uint32_t | blocks, | ||
| uint32_t | block_size | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Execute SDIO_IO_RW_EXTEND command (CMD53)
| [in,out] | card | SDIO card context |
| [in] | write | true: write, false: read |
| [in] | func_idx | SDIO function index |
| [in] | reg_addr | Register address |
| [in] | op_code | Operation code, SDIO_CMD53_OP_MODE_FIXED_ADDR or SDIO_CMD53_OP_MODE_INCR_ADDR |
| [in,out] | pbuf | Pointer to data buffer |
| [in] | blocks | Number of blocks to be transferred |
| [in] | block_size | Block size in bytes |
< SDIO Command Timeout in milliseconds
| hpm_stat_t sdio_io_write_byte | ( | sdio_card_t * | card, |
| uint32_t | func_idx, | ||
| uint32_t | reg_addr, | ||
| uint8_t | byte_data | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Write 1 byte to the address for specified SDIO Function.
| [in,out] | card | SDIO card context |
| [in] | func_idx | SDIO function index |
| [in] | reg_addr | Register address |
| [in] | byte_data | data to be written |
| hpm_stat_t sdio_io_write_incr_multi_bytes | ( | sdio_card_t * | card, |
| uint32_t | func_idx, | ||
| uint32_t | reg_addr, | ||
| uint8_t * | pbuf, | ||
| uint32_t | length | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Write multiple bytes to the address for specified SDIO Function.
| [in,out] | card | SDIO card context |
| [in] | func_idx | SDIO function index |
| [in] | reg_addr | Register address |
| [in] | pbuf | Pointer to data buffer |
| [in] | length | bytes to be written |
< Incremental Address in CMD53
| hpm_stat_t sdio_io_write_multi_bytes_to_fifo | ( | sdio_card_t * | card, |
| uint32_t | func_idx, | ||
| uint32_t | reg_addr, | ||
| uint8_t * | pbuf, | ||
| uint32_t | length | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Write multiple bytes to the FIFO address for specified SDIO Function.
| [in,out] | card | SDIO card context |
| [in] | func_idx | SDIO function index |
| [in] | reg_addr | Register address |
| [in,out] | pbuf | Pointer to data buffer |
| [in] | length | bytes to be written |
< Fixed Address in CMD53
| hpm_stat_t sdio_read_cis | ( | sdio_card_t * | card, |
| uint32_t | cis_ptr, | ||
| sdio_cis_t * | cis, | ||
| bool | keep_tpl_raw_data | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Read Card Information Structure (CIS)
| [in,out] | card | SDIO card context |
| [in] | cis_ptr | CIS pointer |
| [out] | cis | CIS buffer |
| [in] | keep_tpl_raw_data | true: keep the raw data of TPL, false: discard the raw data of TPL |
| hpm_stat_t sdio_read_fbr | ( | sdio_card_t * | card, |
| uint32_t | func_idx, | ||
| sdio_fbr_t * | fbr | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Read the specified Function Basic Register.
| [in,out] | card | SDIO card context |
| [in] | func_idx | SDIO function index |
| [out] | fbr | Pointer to FBR buffer |
< FBR base address for specified function
| hpm_stat_t sdio_register_irq_callback | ( | sdio_card_t * | card, |
| void(*)(void *param) | sdio_irq_callback, | ||
| void * | sdio_irq_param | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Registers an interrupt callback function for an SDIO card.
This function allows the user to register a callback that will be invoked when an SDIO interrupt occurs. The provided callback function should be designed to handle SDIO-specific events or data associated with the interrupt.
| [in,out] | card | A pointer to the SDIO card context structure. Must not be NULL. |
| [in] | sdio_irq_callback | A pointer to the user-defined interrupt callback function. This function will be called when an SDIO interrupt is detected. The function signature should match void (*)(void *), where the parameter is a generic pointer provided by the user. |
| [in] | sdio_irq_param | A pointer to any user-defined data that needs to be passed to the interrupt callback function. Can be NULL if no data needs to be passed. |
| hpm_stat_t sdio_set_block_size | ( | sdio_card_t * | card, |
| uint32_t | func_idx, | ||
| uint32_t | block_size | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_sdio.h>
Set the Block size for specified Function.
| [in,out] | card | SDIO card context |
| [in] | func_idx | SDIO function index |
| [in] | block_size | Block size |
< FBR base address for specified function
< FBR base address for specified function
| hpm_stat_t sdmmc_enable_auto_tuning | ( | const sdmmc_host_t * | host | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
Enable Auto Tuning mode.
| [in,out] | host | SD/MMC Host Context |
| uint32_t sdmmc_get_sys_addr | ( | const sdmmc_host_t * | host, |
| uint32_t | addr | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
Get System address.
| [in] | host | SD/MMC Host Context |
| [in] | addr | memory address |
| hpm_stat_t sdmmc_go_idle_state | ( | sdmmc_host_t * | host, |
| uint32_t | argument | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
Switch device to Idle state.
| [in,out] | host | SD/MMC Host Context |
| [in] | argument | Argument for CMD0 |
| hpm_stat_t sdmmc_go_inactive_state | ( | sdmmc_host_t * | host, |
| uint16_t | relative_addr | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
Switch device to Inactive state.
| [in,out] | host | SD/MMC Host Context |
| [in] | relative_addr | device relative address |
| hpm_stat_t sdmmc_select_card | ( | sdmmc_host_t * | host, |
| uint16_t | relative_addr, | ||
| bool | is_selected | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
Select/De-select the device.
| [in,out] | host | SD/MMC Host Context |
| [in] | relative_addr | device relative address |
| [in] | is_selected | true: select, false: de-select |
| hpm_stat_t sdmmc_send_application_command | ( | sdmmc_host_t * | host, |
| uint16_t | relative_addr | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
Send Application Command.
| [in,out] | host | SD/MMC Host Context |
| [in] | relative_addr | device related address |
| hpm_stat_t sdmmc_set_block_count | ( | sdmmc_host_t * | host, |
| uint32_t | block_count | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
Set block count.
| [in,out] | host | SD/MMC Host Context |
| [in] | block_count | SD/MMC Block count |
| hpm_stat_t sdmmc_set_block_size | ( | sdmmc_host_t * | host, |
| uint32_t | block_size | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_common.h>
Set Block size.
| [in,out] | host | SD/MMC Host Context |
| [in] | block_size | SD/MMC Block size |
| void sdmmchost_deinit | ( | sdmmc_host_t * | host | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Deinitialize the host.
| [in] | host | Host context |
| void sdmmchost_delay_ms | ( | const sdmmc_host_t * | host, |
| uint32_t | ms | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Host delay.
| [in] | host | Host context |
| [in] | ms | Delay in milliseconds |
| void sdmmchost_enable_emmc_support | ( | const sdmmc_host_t * | host, |
| bool | enable | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Enable the eMMC support on the host.
| [in] | host | Host context |
| [in] | enable | Enable or disable the eMMC support |
| void sdmmchost_enable_enhanced_data_strobe | ( | const sdmmc_host_t * | host, |
| bool | enable | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Enable the enhanced data strboe.
| [in] | host | Host context |
| [in] | enable | Enable or disable the enhanced data strobe |
| void sdmmchost_enable_sdio_interrupt | ( | sdmmc_host_t * | host, |
| bool | enable | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Enable or disable SDIO interrupt on the SDMMC host controller.
This function allows controlling the SDIO interrupt signal and status based on the provided flag. When enabled, it sets the interrupt signal and status masks to detect card interrupts. When disabled, it clears the interrupt status mask to stop interrupt generation from card interrupts.
| [in] | host | Pointer to the SDMMC host controller structure. |
| [in] | enable | Flag to enable (true) or disable (false) the SDIO interrupt. |
| hpm_stat_t sdmmchost_error_recovery | ( | sdmmc_host_t * | host, |
| sdmmchost_cmd_t * | cmd | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Trigger the Error recovery via the Host.
| [in] | host | Host context |
| [in] | cmd | abort command context |
| uint32_t sdmmchost_get_data_pin_level | ( | sdmmc_host_t * | host | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Return the data pin level.
| [in] | host | Pointer to the SDMMC host controller structure. |
| hpm_stat_t sdmmchost_init | ( | sdmmc_host_t * | host | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
SDMMC Host Initialization.
| [in] | host | Host context |
| void sdmmchost_init_io | ( | sdmmc_host_t * | host, |
| hpm_sdmmc_operation_mode_t | operation_mode | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Initialize the Host IO according to the operation mode.
| [in] | host | Host context |
| [in] | operation_mode | Operation mode |
| void sdmmchost_irq_handler | ( | sdmmc_host_t * | host | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
THe Host IRQ Handler.
| [in,out] | host | Host context |
| bool sdmmchost_is_card_detected | ( | const sdmmc_host_t * | host | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Check whether the card is detected or not.
| [in] | host | Host context |
| bool sdmmchost_is_voltage_switch_supported | ( | const sdmmc_host_t * | host | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Check whether the host support voltage switch.
| [in] | host | Host context |
| void sdmmchost_register_sdio_callback | ( | sdmmc_host_t * | host, |
| void(*)(void *param) | sdio_irq_callback, | ||
| void * | param | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Registers an SDIO interrupt callback function for the SDMMC host controller.
This function allows the user to register a callback that will be invoked upon SDIO interrupts. It is useful for handling SDIO-specific events in addition to standard SDMMC transactions.
| [in,out] | host | Pointer to the SDMMC host controller structure. |
| [in] | sdio_irq_callback | Pointer to the callback function that will be called when an SDIO interrupt occurs. The function should accept a single parameter of type void*. |
| [in] | param | A pointer to a user-defined data that will be passed to the callback function each time it is invoked. |
| void sdmmchost_reset | ( | const sdmmc_host_t * | host | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Reset the host.
| [in] | host | Host context |
| void sdmmchost_select_voltage | ( | sdmmc_host_t * | host, |
| hpm_sdmmc_io_volt_t | io_volt | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Select the IO voltage.
| [in] | host | Host context |
| [in] | io_volt | IO voltage |
| hpm_stat_t sdmmchost_send_command | ( | sdmmc_host_t * | host, |
| const sdmmchost_cmd_t * | cmd | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Send command via the host.
| [in] | host | Host context |
| [in] | cmd | Command context |
| void sdmmchost_set_card_bus_width | ( | sdmmc_host_t * | host, |
| sdmmc_buswidth_t | bus_width | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Set the card bus width.
| [in,out] | host | Host context |
| [in] | bus_width | Bus width |
| uint32_t sdmmchost_set_card_clock | ( | sdmmc_host_t * | host, |
| uint32_t | freq, | ||
| bool | clock_inverse | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Set the Card clock.
| [in,out] | host | Host context |
| [in] | freq | Frequency in Hz |
| [in] | clock_inverse | Clock Inverse flag |
| void sdmmchost_set_cardclk_delay_chain | ( | const sdmmc_host_t * | host | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Set the Card clock delay chain for the host.
| [in] | host | Host context |
| void sdmmchost_set_data_strobe_delay | ( | const sdmmc_host_t * | host | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Set the Data strobe delay for Host.
| [in] | host | Host context |
| void sdmmchost_set_rxclk_delay_chain | ( | sdmmc_host_t * | host | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Set the Card Rx Clock delay chain for the host.
| [in] | host | Host context |
| hpm_stat_t sdmmchost_set_speed_mode | ( | const sdmmc_host_t * | host, |
| sdmmc_speed_mode_t | speed_mode | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Set the speed mode via the Host.
| [in] | host | Host context |
| [in] | speed_mode | Speed mode |
| hpm_stat_t sdmmchost_switch_to_1v8 | ( | sdmmc_host_t * | host | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Switch the Host to 1.8V IO voltage.
| [in,out] | host | Host context |
| hpm_stat_t sdmmchost_transfer | ( | sdmmc_host_t * | host, |
| const sdmmchost_xfer_t * | content | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Transfer data via the host.
| [in] | host | Host context |
| [in] | content | Transfer context |
| void sdmmchost_vsel_pin_control | ( | const sdmmc_host_t * | host, |
| hpm_sdmmc_io_volt_t | io_volt | ||
| ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Control the Voltage selection pin.
| [in] | host | Host context |
| [in] | io_volt | IO voltage |
| void sdmmchost_wait_card_active | ( | const sdmmc_host_t * | host | ) |
#include <middleware/hpm_sdmmc/lib/hpm_sdmmc_host.h>
Wait until the card is active.
| [in] | host | Host context |