SDXC driver APIs. More...
Data Structures | |
| struct | sdxc_capabilities_t |
| SDXC Capacities. More... | |
| struct | sdxc_xfer_callback_t |
| struct | sdxc_handle_t |
| struct | sdxc_host_t |
Typedefs | |
| typedef enum _sdxc_software_reset | sdxc_sw_reset_type_t |
| Software reset flag definitions. More... | |
| typedef enum _sdxc_bus_voltage_option | sdxc_bus_voltage_option_t |
| SDXC Bus voltage options. More... | |
| typedef enum _sdxc_wakeup_event | sdxc_wakeup_event_t |
| SDXC wakeup events. More... | |
| typedef enum _sdxc_dma_type | sdxc_dma_type_t |
| SDXC DMA types. More... | |
| typedef enum _sdxc_bus_width | sdxc_bus_width_t |
| SDXC Bus width options. More... | |
| typedef enum _sdxc_speed_mode | sdxc_speed_mode_t |
| SDXC Speed mode options. More... | |
| typedef enum _sdxc_auto_cmd_sel | sdxc_auto_cmd_sel_t |
| SDXC auto command types. More... | |
| typedef enum _sdxc_xfer_direction | sdxc_xfer_direction_t |
| SDXC transfer direction options. More... | |
| typedef enum _sdxc_command_type | sdxc_command_type_t |
| SDXC Command types. More... | |
| typedef enum _sdxc_boot_mode | sdxc_boot_mode_t |
| SDXC boot mode types. More... | |
| typedef enum _sdxc_response_type | sdxc_response_type_t |
| SDXC response types. More... | |
| typedef enum _sdxc_dev_resp_type | sdxc_dev_resp_type_t |
| SDXC Device response type. More... | |
| typedef struct _sdxc_command | sdxc_command_t |
| SDXC command structure. More... | |
| typedef struct _sdxc_data_list | sdxc_data_list_t |
| SDXC data list. More... | |
| typedef struct _sdxc_data | sdxc_data_t |
| SDXC data structure. More... | |
| typedef struct _sdxc_xfer | sdxc_xfer_t |
| SDXC transfer context. More... | |
| typedef struct _sdxc_adma_config | sdxc_adma_config_t |
| SDXC ADMA configuration. More... | |
| typedef struct _sdxc_config | sdxc_config_t |
| SDXC configuration. More... | |
| typedef struct _sdxc_adma2_descriptor | sdxc_adma2_descriptor_t |
| SDXC ADMA2 descriptor. More... | |
| typedef struct _sdxc_adma3_cmd_sd_desc | sdxc_adma3_cmd_sd_desc_t |
| ADMA3 command descriptor. More... | |
| typedef struct _sdxc_adma3_integrated_desc | sdxc_adma3_integrated_desc_t |
| SDXC ADMA3 Integrated Descriptor. More... | |
| typedef struct _sdxc_adma3_xfer_list | sdxc_adma3_xfer_list |
| typedef struct _sdxc_boot_config | sdxc_boot_config_t |
| SDXC Boot configuration. More... | |
| typedef hpm_stat_t(* | sdxc_xfer_func_t) (SDXC_Type *base, sdxc_xfer_t *content) |
Enumerations | |
| enum | { status_sdxc_busy = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 0 )) , status_sdxc_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 1 )) , status_sdxc_send_cmd_failed = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 2 )) , status_sdxc_cmd_timeout_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 3 )) , status_sdxc_cmd_crc_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 4 )) , status_sdxc_cmd_end_bit_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 5 )) , status_sdxc_cmd_index_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 6 )) , status_sdxc_data_timeout_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 7 )) , status_sdxc_data_crc_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 8 )) , status_sdxc_data_end_bit_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 9 )) , status_sdxc_auto_cmd_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 10 )) , status_sdxc_adma_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 11 )) , status_sdxc_tuning_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 12 )) , status_sdxc_response_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 13 )) , status_sdxc_boot_ack_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 14 )) , status_sdxc_retuning_request = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 15 )) , status_sdxc_autocmd_cmd12_not_exec = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 16 )) , status_sdxc_autocmd_cmd_timeout_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 17 )) , status_sdxc_autocmd_cmd_crc_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 18 )) , status_sdxc_autocmd_end_bit_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 19 )) , status_sdxc_autocmd_cmd_index_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 20 )) , status_sdxc_autocmd_cmd_response_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 21 )) , status_sdxc_autocmd_cmd_not_issued_auto_cmd12 = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 22 )) , status_sdxc_unsupported = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 23 )) , status_sdxc_transfer_data_completed = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 24 )) , status_sdxc_send_cmd_successful = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 25 )) , status_sdxc_transfer_dma_completed = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 26 )) , status_sdxc_transfer_data_failed = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 27 )) , status_sdxc_dma_addr_or_len_unaligned = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 28 )) , status_sdxc_tuning_failed = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 29 )) , status_sdxc_card_removed = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 30 )) , status_sdxc_non_recoverable_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 31 )) , status_sdxc_recoverable_error = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 32 )) , status_sdxc_adma_table_not_enough = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 33 )) , status_sdxc_xfer_size_exceeds_max_limit = ((uint32_t)( status_group_sdxc )*1000U + (uint32_t)( 34 )) } |
| SDXC error codes. More... | |
| enum | { sdxc_xfer_data_normal = 0U , sdxc_xfer_data_boot = 1U , sdxc_xfer_data_boot_continuous = 2U } |
| SDXC transfer data type. More... | |
| enum | { sdxc_adma_desc_single_flag = 0U , sdxc_adma_desc_multi_flag = 1U } |
Functions | |
| static uint32_t | sdxc_get_interrupt_status (SDXC_Type *base) |
| Get the SDXC interrupt status. More... | |
| static bool | sdxc_is_card_inserted (const SDXC_Type *base) |
| Check whether SD card is inserted. More... | |
| static bool | sdxc_is_write_protected (const SDXC_Type *base) |
| Check whether SD card is Write Protected. More... | |
| static void | sdxc_clear_interrupt_status (SDXC_Type *base, uint32_t status_mask) |
| Clear SDXC interrupt status. More... | |
| static void | sdxc_enable_interrupt_status (SDXC_Type *base, uint32_t mask, bool enable) |
| Enable SDXC interrupt status. More... | |
| static void | sdxc_enable_interrupt_signal (SDXC_Type *base, uint32_t mask, bool enable) |
| Enable SDXC interrupt signal. More... | |
| static uint32_t | sdxc_get_interrupt_signal (SDXC_Type *base) |
| Get the SDXC interrupt Signal Enable Register. More... | |
| hpm_stat_t | sdxc_get_capabilities (const SDXC_Type *base, sdxc_capabilities_t *capabilities) |
| Get SDXC capabilities. More... | |
| static uint8_t | sdxc_get_adma_error_status (const SDXC_Type *base) |
| Get SDXC ADMA error status. More... | |
| static void | sdxc_configure_data_timeout (SDXC_Type *base, uint8_t timeout) |
| Configure SDXC data timeout internal. More... | |
| static void | sdxc_interrupt_at_block_gap (SDXC_Type *base, bool enable) |
| Configure SDXC interrupt at block gap. More... | |
| static void | sdxc_read_wait_control (SDXC_Type *base, bool enable) |
| Enable or Disable SDXC Read Wait. More... | |
| static void | sdxc_continue_request (SDXC_Type *base, bool enable) |
| Configure SDXC continue request. More... | |
| static void | sdxc_stop_at_block_gap_request (SDXC_Type *base, bool enable) |
| Configure SDXC StopAtBlockGap request. More... | |
| static void | sdxc_enable_high_speed (SDXC_Type *base, bool enable) |
| Control the SDXC high-speed support. More... | |
| static void | sdxc_enable_power (SDXC_Type *base, bool enable) |
| Control the SDXC power pin. More... | |
| static void | sdxc_enable_async_interrupt (SDXC_Type *base, bool enable) |
| Enable SDXC asynchronous interrupt support. More... | |
| static void | sdxc_enable_preset (SDXC_Type *base, bool enable) |
| Enable SDXC Preset support. More... | |
| static void | sdxc_enable_host_version4 (SDXC_Type *base, bool enable) |
| Enable SD Host version 4. More... | |
| static void | sdxc_execute_tuning (SDXC_Type *base) |
| Start SDXC tuning process. More... | |
| static void | sdxc_enable_software_tuning (SDXC_Type *base, bool enable) |
| Enable SDXC software tuning process. More... | |
| static void | sdxc_reset_tuning_engine (SDXC_Type *base) |
| Reset SDXC tuning engine. More... | |
| static void | sdxc_switch_to_1v8_signal (SDXC_Type *base, bool enable) |
| Switch SDXC to 1.8V signaling mode. More... | |
| static void | sdxc_enable_internal_clock (SDXC_Type *base, bool enable) |
| Enable/Disable SDXC internal clock. More... | |
| static uint32_t | sdxc_get_present_status (const SDXC_Type *base) |
| Get Present status register value. More... | |
| static bool | sdxc_is_data_buf_writable (const SDXC_Type *base) |
| Check whether the Data Buffer is writable or not. More... | |
| static bool | sdxc_is_data_buf_readable (const SDXC_Type *base) |
| Check whether the data buffer is readable. More... | |
| static uint32_t | sdxc_read_data (SDXC_Type *base) |
| Read data from SDXC using non-DMA mode. More... | |
| static void | sdxc_write_data (SDXC_Type *base, uint32_t data) |
| Write data to SDXC using non-DMA mode. More... | |
| static uint32_t | sdxc_get_data3_0_level (const SDXC_Type *base) |
| Get SDXC DATA3-DATA0 IO level. More... | |
| static uint32_t | sdxc_get_data7_4_level (const SDXC_Type *base) |
| Get SDXC DATA7-DATA4 IO level. More... | |
| static void | sdxc_enable_auto_tuning (SDXC_Type *base, bool enable) |
| Enable SDXC auto tuning. More... | |
| static void | sdxc_stop_clock_during_phase_code_change (SDXC_Type *base, bool enable) |
| Stop Clock During Phase Code Change. More... | |
| static void | sdxc_set_post_change_delay (SDXC_Type *base, uint8_t delay_cnt) |
| Set The delay cycles during phase switching and stable clock out. More... | |
| static void | sdxc_enable_emmc_support (SDXC_Type *base, bool enable) |
| Enable EMMC support. More... | |
| static void | sdxc_enable_mmc_boot (SDXC_Type *base, bool enable) |
| Enable/Disable SDXC MMC boot. More... | |
| static void | sdxc_force_event (SDXC_Type *base, uint32_t mask) |
| Set SDXC force event. More... | |
| static void | sdxc_enable_sd_clock (SDXC_Type *base, bool enable) |
| Enable/disable SDXC SD clock output. More... | |
| static void | sdxc_set_center_phase_code (SDXC_Type *base, uint32_t value) |
| Set SDXC center phase code. More... | |
| static void | sdxc_enable_enhanced_strobe (SDXC_Type *base, bool enable) |
| Enable SDXC enhanced strobe. More... | |
| static void | sdxc_select_dma_type (SDXC_Type *base, sdxc_dma_type_t dma_type) |
| Select DMA type. More... | |
| bool | sdxc_is_bus_idle (const SDXC_Type *base) |
| Check whether SDXC Bus is idle. More... | |
| void | sdxc_set_mmc_boot_config (SDXC_Type *base, const sdxc_boot_config_t *config) |
| Set MMC boot configuration. More... | |
| hpm_stat_t | sdxc_send_command (SDXC_Type *base, const sdxc_command_t *cmd) |
| Send Command via SDXC. More... | |
| hpm_stat_t | sdxc_receive_cmd_response (const SDXC_Type *base, sdxc_command_t *cmd) |
| Receive command response. More... | |
| hpm_stat_t | sdxc_parse_interrupt_status (SDXC_Type *base) |
| Parse the SDXC interrupt status to HPM encoded status. More... | |
| hpm_stat_t | sdxc_wait_cmd_done (SDXC_Type *base, sdxc_command_t *cmd, bool polling_cmd_done) |
| Wait until SDXC command completes. More... | |
| void | sdxc_set_data_config (SDXC_Type *base, sdxc_xfer_direction_t data_dir, uint32_t block_cnt, uint32_t block_size) |
| Set Data transfer configuration. More... | |
| hpm_stat_t | sdxc_set_adma_table_config (SDXC_Type *base, sdxc_adma_config_t *dma_cfg, sdxc_data_t *data_cfg, sdxc_command_t *cmd) |
| Set ADMA table configuration. More... | |
| hpm_stat_t | sdxc_set_adma2_desc (sdxc_adma_config_t *dma_config, const sdxc_data_t *xfer_data, uint32_t *num_entries) |
| Set ADMA2 descriptor. More... | |
| hpm_stat_t | sdxc_set_adma3_desc (sdxc_adma_config_t *dma_config, sdxc_adma3_xfer_list *adma3_xfer_list) |
| Set ADMA3 descriptor. More... | |
| hpm_stat_t | sdxc_set_dma_config (SDXC_Type *base, const sdxc_adma_config_t *dma_cfg, const uint32_t *data_addr) |
| Set DMA configuration. More... | |
| void | sdxc_init (SDXC_Type *base, const sdxc_config_t *config) |
| Initialize SDXC controller. More... | |
| void | sdxc_set_data_timeout (SDXC_Type *base, uint32_t timeout_in_ms, uint32_t *actual_timeout_ms) |
| Set the Data Timeout Counter value for an SD/eMMC device. More... | |
| void | sdxc_set_speed_mode (SDXC_Type *base, sdxc_speed_mode_t mode) |
| Set SDXC speed mode. More... | |
| void | sdxc_set_data_bus_width (SDXC_Type *base, sdxc_bus_width_t width) |
| Set SDXC Data bus width. More... | |
| uint32_t | sdxc_get_data_bus_width (const SDXC_Type *base) |
| Get SDXC Data bus width. More... | |
| void | sdxc_select_voltage (SDXC_Type *base, sdxc_bus_voltage_option_t option) |
| Set SDXC IO voltage. More... | |
| bool | sdxc_reset (SDXC_Type *base, sdxc_sw_reset_type_t reset_type, uint32_t timeout) |
| Reset SDXC. More... | |
| void | sdxc_enable_wakeup_event (SDXC_Type *base, sdxc_wakeup_event_t evt, bool enable) |
| Enable SDXC wakeup interrupt. More... | |
| hpm_stat_t | sdxc_transfer_blocking (SDXC_Type *base, sdxc_adma_config_t *dma_config, const sdxc_xfer_t *xfer) |
| Start SDXC transfer in blocking way. More... | |
| hpm_stat_t | sdxc_adma3_transfer_nonblocking (SDXC_Type *base, sdxc_adma_config_t *dma_config, sdxc_adma3_xfer_list *adma3_xfer_list) |
| SDXC ADMA3 nonblocking transfer. More... | |
| hpm_stat_t | sdxc_transfer_nonblocking (SDXC_Type *base, sdxc_adma_config_t *dma_config, const sdxc_xfer_t *xfer) |
| Start SDXC transfer in nonblocking way. More... | |
| hpm_stat_t | sdxc_error_recovery (SDXC_Type *base, sdxc_command_t *cmd) |
| SDXC Error recovery. More... | |
| hpm_stat_t | sdxc_perform_tuning_flow_sequence (SDXC_Type *base, uint8_t tuning_cmd) |
| Perform SDXC tuning flow sequence. More... | |
| hpm_stat_t | sdxc_perform_software_tuning (SDXC_Type *base, uint8_t tuning_cmd) |
| Perform SDXC software tuning. More... | |
| hpm_stat_t | sdxc_perform_auto_tuning (SDXC_Type *base, uint8_t tuning_cmd) |
| Perform SDXC auto-tuning. More... | |
SDXC driver APIs.
| #define SDXC_ADMA2_ADDR_LEN (4U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA2_DESC_ACT0_FLAG (1UL << 3) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA2_DESC_ACT1_FLAG (1UL << 4) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA2_DESC_ACT2_FLAG (1UL << 5) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA2_DESC_END_FLAG (1UL << 1) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA2_DESC_INTERRUPT_FLAG (1UL << 2) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA2_DESC_TYPE_LINK (6U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA2_DESC_TYPE_NOP (0U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA2_DESC_TYPE_TRANS (4U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA2_DESC_VALID_FLAG (1UL << 0) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA2_DESC_WORDS (sizeof(sdxc_adma2_descriptor_t) / sizeof(uint32_t)) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA2_LEN_ALIGN (4U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA3_CMD_DESC_ATTR_END (1UL << 1) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA3_CMD_DESC_IDX_32BIT_BLK_CNT (0U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA3_CMD_DESC_IDX_ARG (2U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA3_CMD_DESC_IDX_BLK_SIZE (1U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA3_CMD_DESC_IDX_CMD_XFER (3U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA3_CMD_DESC_WORDS (sizeof(sdxc_adma3_cmd_sd_desc_t) / sizeof(uint32_t)) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA3_CMD_FOR_SD_DESC_ATTR (0x09U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA3_DESC_TYPE_FOR_SD_MODE (0x1U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA3_INTEGRATED_ATTR_END (1UL << 1) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA3_INTEGRATED_ATTR_INT (1UL << 2) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA3_INTEGRATED_ATTR_VALID (1UL << 0) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA3_INTEGRATED_DESC_ATTR (0x39U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_ADMA3_INTEGRATED_DESC_WORDS (sizeof(sdxc_adma3_integrated_desc_t) / sizeof(uint32_t)) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_AMDA3_DESC_MIN_WORDS |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_AMDA3_DESC_TYPE_INTEGRATED_LINKER (7U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_CMD_CRC_CHK_DIS (0U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_CMD_CRC_CHK_EN (SDXC_CMD_XFER_CMD_CRC_CHK_ENABLE_MASK) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_CMD_IDX_CHK_DIS (0U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_CMD_IDX_CHK_EN (SDXC_CMD_XFER_CMD_IDX_CHK_ENABLE_MASK) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_CMD_IS_MAIN_CMD (0U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_CMD_IS_SUB_CMD (SDXC_CMD_XFER_SUB_CMD_FLAG_MASK) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_CMD_TYPE_ABORT (3U << SDXC_CMD_XFER_CMD_TYPE_SHIFT) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_CMD_TYPE_NORMAL (0U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_CMD_TYPE_RESUME (2U << SDXC_CMD_XFER_CMD_TYPE_SHIFT) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_CMD_TYPE_SUSPEND (1UL << SDXC_CMD_XFER_CMD_TYPE_SHIFT) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_DATA_NO_PRESENT (0U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_DATA_PRESENT (SDXC_CMD_XFER_DATA_PRESENT_SEL_MASK) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_RESP_LEN_136 (1UL << SDXC_CMD_XFER_RESP_TYPE_SELECT_SHIFT) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_RESP_LEN_48 (2UL << SDXC_CMD_XFER_RESP_TYPE_SELECT_SHIFT) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_RESP_LEN_48B (3UL << SDXC_CMD_XFER_RESP_TYPE_SELECT_SHIFT) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_RESP_NO_RESPONSE (0UL << SDXC_CMD_XFER_RESP_TYPE_SELECT_SHIFT) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_RESP_TYPE_NO_RESP (0U) |
| #define SDXC_CMD_RESP_TYPE_RESP_LEN_136 (1U) |
#include <drivers/inc/hpm_sdxc_drv.h>
Response Length 136
| #define SDXC_CMD_RESP_TYPE_RESP_LEN_48 (2U) |
#include <drivers/inc/hpm_sdxc_drv.h>
Response Length 48
| #define SDXC_CMD_RESP_TYPE_RESP_LEN_48B (3U) |
#include <drivers/inc/hpm_sdxc_drv.h>
Response Length 48; Check busy after response
| #define SDXC_CMD_TYPE_ABORT (3UL << SDXC_CMD_XFER_CMD_TYPE_SHIFT) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_TYPE_NORMAL (0UL << SDXC_CMD_XFER_CMD_TYPE_SHIFT) |
#include <drivers/inc/hpm_sdxc_drv.h>
Command Type.
| #define SDXC_CMD_TYPE_RESUME (2UL << SDXC_CMD_XFER_CMD_TYPE_SHIFT) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_CMD_TYPE_SUSPEND (1UL << SDXC_CMD_XFER_CMD_TYPE_SHIFT) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_HOST_CD_IN_IP (SDXC_HOST_SUPPORT_CD << 8) |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC Pin is native or from GPIO.
Card detection is controlled by IP
| #define SDXC_HOST_CD_PIN_POLARITY (SDXC_HOST_VSEL_IN_IP << 16) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_HOST_PWR_IN_IP (SDXC_HOST_SUPPORT_PWR << 8) |
#include <drivers/inc/hpm_sdxc_drv.h>
Power switch is controlled by IP
| #define SDXC_HOST_PWR_PIN_POLARITY (SDXC_HOST_SUPPORT_PWR << 16) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_HOST_RST_IN_IP (SDXC_HOST_SUPPORT_RST << 8) |
#include <drivers/inc/hpm_sdxc_drv.h>
Reset Pin is controlled by IP
| #define SDXC_HOST_RST_IN_POLARITY (SDXC_HOST_SUPPORT_DS << 16) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_HOST_SUPPORT_1V8 (1UL << 0) |
#include <drivers/inc/hpm_sdxc_drv.h>
Generic Definitions.
| #define SDXC_HOST_SUPPORT_4BIT (1UL << 1) |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC Host support 4bit
| #define SDXC_HOST_SUPPORT_8BIT (1UL << 2) |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC Host support 8bit
| #define SDXC_HOST_SUPPORT_CD (1UL << 16) |
| #define SDXC_HOST_SUPPORT_DS (1UL << 21) |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC Host support Data Strobe
| #define SDXC_HOST_SUPPORT_EMMC (1UL << 3) |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC Host support EMMC
| #define SDXC_HOST_SUPPORT_PWR (1UL << 18) |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC Host support Power Switch
| #define SDXC_HOST_SUPPORT_RST (1UL << 20) |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC Host support Reset Pin
| #define SDXC_HOST_SUPPORT_VSEL (1UL << 17) |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC Host support Voltage Selection
| #define SDXC_HOST_SUPPORT_WP (1UL << 19) |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC Host support Write Protection
| #define SDXC_HOST_VSEL_IN_IP (SDXC_HOST_SUPPORT_VSEL << 8) |
#include <drivers/inc/hpm_sdxc_drv.h>
Voltage selection is controlled by IP
| #define SDXC_HOST_VSEL_PIN_POLARITY (SDXC_HOST_SUPPORT_CD << 16) |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC GPIO pin polarity If polarity is 0, it means: GPIO level 0 means disabled, 1 means enabled If polarity is 1, it meansL: GPIO level 0 means enabled, 1 means disabled.
| #define SDXC_HOST_WP_IN_IP (SDXC_HOST_SUPPORT_WP << 8) |
#include <drivers/inc/hpm_sdxc_drv.h>
Write protection is controlled by IP
| #define SDXC_HOST_WP_PIN_POLARITY (SDXC_HOST_SUPPORT_WP << 16) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_IS_DMA_ALIGNED | ( | value | ) | (((uint32_t)(value) % 4UL) == 0U) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_STS_ALL_FLAGS |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_STS_CARD_ERR (SDXC_INT_STAT_CARD_REMOVAL_MASK) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_STS_CMD_ERR |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_STS_CMD_FLAGS (SDXC_STS_CMD_ERR | SDXC_INT_STAT_CMD_COMPLETE_MASK) |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_STS_DATA_ERR |
#include <drivers/inc/hpm_sdxc_drv.h>
| #define SDXC_STS_ERROR (SDXC_INT_STAT_ERR_INTERRUPT_MASK | SDXC_STS_CMD_ERR | SDXC_STS_DATA_ERR | SDXC_STS_CARD_ERR) |
#include <drivers/inc/hpm_sdxc_drv.h>
| typedef struct _sdxc_adma2_descriptor sdxc_adma2_descriptor_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC ADMA2 descriptor.
| typedef struct _sdxc_adma3_cmd_sd_desc sdxc_adma3_cmd_sd_desc_t |
#include <drivers/inc/hpm_sdxc_drv.h>
ADMA3 command descriptor.
| typedef struct _sdxc_adma3_integrated_desc sdxc_adma3_integrated_desc_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC ADMA3 Integrated Descriptor.
| typedef struct _sdxc_adma3_xfer_list sdxc_adma3_xfer_list |
#include <drivers/inc/hpm_sdxc_drv.h>
| typedef struct _sdxc_adma_config sdxc_adma_config_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC ADMA configuration.
| typedef enum _sdxc_auto_cmd_sel sdxc_auto_cmd_sel_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC auto command types.
| typedef struct _sdxc_boot_config sdxc_boot_config_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC Boot configuration.
| typedef enum _sdxc_boot_mode sdxc_boot_mode_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC boot mode types.
| typedef enum _sdxc_bus_voltage_option sdxc_bus_voltage_option_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC Bus voltage options.
| typedef enum _sdxc_bus_width sdxc_bus_width_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC Bus width options.
| typedef struct _sdxc_command sdxc_command_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC command structure.
| typedef enum _sdxc_command_type sdxc_command_type_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC Command types.
| typedef struct _sdxc_config sdxc_config_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC configuration.
| typedef struct _sdxc_data_list sdxc_data_list_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC data list.
| typedef struct _sdxc_data sdxc_data_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC data structure.
| typedef enum _sdxc_dev_resp_type sdxc_dev_resp_type_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC Device response type.
| typedef enum _sdxc_dma_type sdxc_dma_type_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC DMA types.
| typedef enum _sdxc_response_type sdxc_response_type_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC response types.
| typedef enum _sdxc_speed_mode sdxc_speed_mode_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC Speed mode options.
| typedef enum _sdxc_software_reset sdxc_sw_reset_type_t |
#include <drivers/inc/hpm_sdxc_drv.h>
Software reset flag definitions.
| typedef enum _sdxc_wakeup_event sdxc_wakeup_event_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC wakeup events.
| typedef enum _sdxc_xfer_direction sdxc_xfer_direction_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC transfer direction options.
| typedef hpm_stat_t(* sdxc_xfer_func_t) (SDXC_Type *base, sdxc_xfer_t *content) |
#include <drivers/inc/hpm_sdxc_drv.h>
| typedef struct _sdxc_xfer sdxc_xfer_t |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC transfer context.
| anonymous enum |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC error codes.
| anonymous enum |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC transfer data type.
| Enumerator | |
|---|---|
| sdxc_xfer_data_normal | Transfer normal read/write data |
| sdxc_xfer_data_boot | Transfer boot data |
| sdxc_xfer_data_boot_continuous | Transfer boot data continuously |
| anonymous enum |
#include <drivers/inc/hpm_sdxc_drv.h>
| Enumerator | |
|---|---|
| sdxc_adma_desc_single_flag | |
| sdxc_adma_desc_multi_flag | |
| hpm_stat_t sdxc_adma3_transfer_nonblocking | ( | SDXC_Type * | base, |
| sdxc_adma_config_t * | dma_config, | ||
| sdxc_adma3_xfer_list * | adma3_xfer_list | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC ADMA3 nonblocking transfer.
| [in] | base | SDXC base address |
| [in,out] | dma_config | SDXC DMA configuration |
| [in] | adma3_xfer_list | ADMA3 transfer list |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Clear SDXC interrupt status.
| [in] | base | SDXC base address |
| [in] | status_mask | the status mask to be cleared |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Configure SDXC data timeout internal.
| [in] | base | SDXC base address |
| [in] | timeout | SDXC data timeout option |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Configure SDXC continue request.
| [in] | base | SDXC base address |
| [in] | enable | Flag to enable/disable SDXC continue request |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Enable SDXC asynchronous interrupt support.
| [in] | base | SDXC base address |
| [in] | enable | Flag to enable/disable SDXC asynchronous interrupt support |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Enable SDXC auto tuning.
| [in] | base | SDXC base address |
| [in] | enable | Flag to enable/disable SDXC auto tuning |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Enable EMMC support.
| [in] | base | SDXC base address |
| [in] | enable | Flag to enable/disable EMMC support |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Enable SDXC enhanced strobe.
| [in] | base | SDXC base address |
| [in] | enable | flag to enable/disable SDXC enhanced strobe |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Control the SDXC high-speed support.
| [in] | base | SDXC base address |
| [in] | enable | flag to Enable/disable SDXC high-speed support |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Enable SD Host version 4.
| [in] | base | SDXC base address |
| [in] | enable | flag to enable/disable SD Host version 4 support |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Enable/Disable SDXC internal clock.
| [in] | base | SDXC base address |
| [in] | enable | Flag to enable/disable SDXC internal clock |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Enable SDXC interrupt signal.
| [in] | base | SDXC base address |
| [in] | mask | SDXC interrupt signal mask |
| [in] | enable | Interrupt signal enable flag |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Enable SDXC interrupt status.
| [in] | base | SDXC base address |
| [in] | mask | SDXC interrupt status mask |
| [in] | enable | Interrupt status enable flag |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Enable/Disable SDXC MMC boot.
| [in] | base | SDXC base address |
| [in] | enable | FLag to enable/disable SDXC MMC boot |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Control the SDXC power pin.
| [in] | base | SDXC base address |
| [in] | enable | Flag to control the SDXC power pin |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Enable SDXC Preset support.
| [in] | base | SDXC base address |
| [in] | enable | flag to enable/disable SDXC Preset support |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Enable/disable SDXC SD clock output.
| [in] | base | SDXC base address |
| [in] | enable | Flag to enable/disable SDXC SD clock output |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Enable SDXC software tuning process.
| [in] | base | SDXC base address |
| [in] | enable | flag to enable/disable SDXC software tuning |
| void sdxc_enable_wakeup_event | ( | SDXC_Type * | base, |
| sdxc_wakeup_event_t | evt, | ||
| bool | enable | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Enable SDXC wakeup interrupt.
| [in] | base | SDXC base address |
| [in] | evt | SDXC wakeup interrupt |
| [in] | enable | Flag to control whether to enable SDXC wakeup event |
| hpm_stat_t sdxc_error_recovery | ( | SDXC_Type * | base, |
| sdxc_command_t * | cmd | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
SDXC Error recovery.
| [in] | base | SDXC base address |
| [in] | cmd | SDXC command context |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Start SDXC tuning process.
| [in] | base | SDXC base address |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Set SDXC force event.
| [in] | base | SDXC base address |
| [in] | mask | SDXC event mask |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Get SDXC ADMA error status.
| [in] | base | SDXC base address |
| AMDA | error status register value |
| hpm_stat_t sdxc_get_capabilities | ( | const SDXC_Type * | base, |
| sdxc_capabilities_t * | capabilities | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Get SDXC capabilities.
| [in] | base | SDXC base address |
| [out] | capabilities | buffer |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Get SDXC DATA3-DATA0 IO level.
| [in] | base | SDXC base address |
| SDXC | data3-data0 IO level |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Get SDXC DATA7-DATA4 IO level.
| [in] | base | SDXC base address |
| SDXC | data7-data4 IO level |
| uint32_t sdxc_get_data_bus_width | ( | const SDXC_Type * | base | ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Get SDXC Data bus width.
| [in] | base | SDXC base address |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Get the SDXC interrupt Signal Enable Register.
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Get the SDXC interrupt status.
| [in] | base | SDXC base address |
| SDXC | interrupt status |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Get Present status register value.
| [in] | base | SDXC base address |
| SDXC | PRESENT register value |
| void sdxc_init | ( | SDXC_Type * | base, |
| const sdxc_config_t * | config | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Initialize SDXC controller.
| [in] | base | SDXC base address |
| [in] | config | SDXC configuration |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Configure SDXC interrupt at block gap.
| [in] | base | SDXC base address |
| [in] | enable | Enable Interrupt_at_Block_Gap flag |
| bool sdxc_is_bus_idle | ( | const SDXC_Type * | base | ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Check whether SDXC Bus is idle.
| [in] | base | SDXC base address |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Check whether SD card is inserted.
| SD | Card insertion status
|
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Check whether the data buffer is readable.
| [in] | base | SDXC base address |
| true | There are data available in data buffer |
| false | there is no data available in data buffer, read is disabled |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Check whether the Data Buffer is writable or not.
| [in] | base | SDXC base address |
| true | Data buffer is writeable |
| false | Data buffer write is disabled |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Check whether SD card is Write Protected.
| SD | Card Write Protection status
|
| hpm_stat_t sdxc_parse_interrupt_status | ( | SDXC_Type * | base | ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Parse the SDXC interrupt status to HPM encoded status.
| [in] | base | SDXC base status |
| hpm_stat_t sdxc_perform_auto_tuning | ( | SDXC_Type * | base, |
| uint8_t | tuning_cmd | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Perform SDXC auto-tuning.
| [in] | base | SDXC base address |
| [in] | tuning_cmd | tuning command |
| Tuning | status |
| hpm_stat_t sdxc_perform_software_tuning | ( | SDXC_Type * | base, |
| uint8_t | tuning_cmd | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Perform SDXC software tuning.
| [in] | base | SDXC base address |
| [in] | tuning_cmd | Tuning command |
| Tuning | status |
| hpm_stat_t sdxc_perform_tuning_flow_sequence | ( | SDXC_Type * | base, |
| uint8_t | tuning_cmd | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Perform SDXC tuning flow sequence.
| [in] | base | SDXC base address |
| [in] | tuning_cmd | Tuning command |
| Tuning | status |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Read data from SDXC using non-DMA mode.
| [in] | base | SDXC base address |
| Data | read from SDXC |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Enable or Disable SDXC Read Wait.
| [in] | base | SDXC base address |
| [in] | enable | Enable SDXC Read Wait flag |
| hpm_stat_t sdxc_receive_cmd_response | ( | const SDXC_Type * | base, |
| sdxc_command_t * | cmd | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Receive command response.
| [in] | base | SDXC base address |
| [in,out] | cmd | Command |
| bool sdxc_reset | ( | SDXC_Type * | base, |
| sdxc_sw_reset_type_t | reset_type, | ||
| uint32_t | timeout | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Reset SDXC.
| [in] | base | SDXC base address |
| [in] | reset_type | SDXC reset type |
| [in] | timeout | timeout ticks |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Reset SDXC tuning engine.
| [in] | base | SDXC base address |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Select DMA type.
| [in] | base | SDXC base address |
| [in] | dma_type | SDXC DMA type |
| void sdxc_select_voltage | ( | SDXC_Type * | base, |
| sdxc_bus_voltage_option_t | option | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Set SDXC IO voltage.
| [in] | base | SDXC base address |
| [in] | option | SDXC voltage option |
| hpm_stat_t sdxc_send_command | ( | SDXC_Type * | base, |
| const sdxc_command_t * | cmd | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Send Command via SDXC.
| [in] | base | SDXC base address |
| [in] | cmd | Command |
| status_timeout | Sending command timed out |
| status_success | Command was sent out successfully |
| hpm_stat_t sdxc_set_adma2_desc | ( | sdxc_adma_config_t * | dma_config, |
| const sdxc_data_t * | xfer_data, | ||
| uint32_t * | num_entries | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Set ADMA2 descriptor.
| [in] | dma_config | DMA configuration context |
| [in] | xfer_data | pointer to the Data to be transferred |
| [in] | data_bytes | Data size for transfer |
| [out] | num_entries | Number of ADMA2 Table entries |
| hpm_stat_t sdxc_set_adma3_desc | ( | sdxc_adma_config_t * | dma_config, |
| sdxc_adma3_xfer_list * | adma3_xfer_list | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Set ADMA3 descriptor.
| [in] | dma_config | DMA configuration context |
| [in] | xfer_data | pointer to the Data to be transferred |
| [in] | cmd | Command context @Note adma_tbl layout is: Command descriptor ADMA2 descriptor ADMA3 integrated descriptor (address pointer to command descriptor) |
| API | execution status |
| hpm_stat_t sdxc_set_adma_table_config | ( | SDXC_Type * | base, |
| sdxc_adma_config_t * | dma_cfg, | ||
| sdxc_data_t * | data_cfg, | ||
| sdxc_command_t * | cmd | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Set ADMA table configuration.
| [in] | base | SDXC base address |
| [in] | dma_cfg | DMA configuration |
| [in] | data_cfg | Data configuration |
| [in] | cmd | SDXC command context |
| API | execution status |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Set SDXC center phase code.
| [in] | base | SDXC base address |
| [in] | value | SDXC center phase value |
| void sdxc_set_data_bus_width | ( | SDXC_Type * | base, |
| sdxc_bus_width_t | width | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Set SDXC Data bus width.
| [in] | base | SDXC base address |
| [in] | width | SDXC bus width option |
| void sdxc_set_data_config | ( | SDXC_Type * | base, |
| sdxc_xfer_direction_t | data_dir, | ||
| uint32_t | block_cnt, | ||
| uint32_t | block_size | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Set Data transfer configuration.
| [in] | base | SDXC base address |
| [in] | data_dir | Data transfer direction |
| [in] | block_cnt | Block count for data transfer |
| [in] | block_size | Block size for data transfer |
| void sdxc_set_data_timeout | ( | SDXC_Type * | base, |
| uint32_t | timeout_in_ms, | ||
| uint32_t * | actual_timeout_ms | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Set the Data Timeout Counter value for an SD/eMMC device.
| [in] | base | SDXC base address |
| [in] | timeout_in_ms | Required timeout value in milliseconds, maximum value is 131,072ms |
| [out] | actual_timeout_ms | Actual timeout in milliseconds, reported by this API |
| hpm_stat_t sdxc_set_dma_config | ( | SDXC_Type * | base, |
| const sdxc_adma_config_t * | dma_cfg, | ||
| const uint32_t * | data_addr | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Set DMA configuration.
| [in] | base | SDXC base address |
| [in] | dma_cfg | DMA configuration data structure |
| [in] | data_addr | Buffer holds incoming/outgoing data |
| API | execution status |
| void sdxc_set_mmc_boot_config | ( | SDXC_Type * | base, |
| const sdxc_boot_config_t * | config | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Set MMC boot configuration.
| [in] | base | SDXC base address |
| [in] | config | MMC boot configuration |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Set The delay cycles during phase switching and stable clock out.
| [in] | base | SDXC base address |
| [in] | delay_cnt | Delay cycles |
| void sdxc_set_speed_mode | ( | SDXC_Type * | base, |
| sdxc_speed_mode_t | mode | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Set SDXC speed mode.
| [in] | base | SDXC base address |
| [in] | mode | SDXC speed mode option |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Configure SDXC StopAtBlockGap request.
| [in] | base | SDXC base address |
| [in] | enable | Flag to enable/disable StopAtBlockGap request |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Stop Clock During Phase Code Change.
| [in] | base | SDXC base address |
| [in] | enable | Flag to determine whether stopping clock during phase code change |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Switch SDXC to 1.8V signaling mode.
| [in] | base | SDXC base address |
| [in] | enable | Flag to switch to 1.8v signaling mode/stay at 3.0v signaling mode |
| hpm_stat_t sdxc_transfer_blocking | ( | SDXC_Type * | base, |
| sdxc_adma_config_t * | dma_config, | ||
| const sdxc_xfer_t * | xfer | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Start SDXC transfer in blocking way.
| [in] | base | SDXC base address |
| [in,out] | dma_config | SDXC DMA configuration |
| [in] | xfer | SDXC transfer context |
| hpm_stat_t sdxc_transfer_nonblocking | ( | SDXC_Type * | base, |
| sdxc_adma_config_t * | dma_config, | ||
| const sdxc_xfer_t * | xfer | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Start SDXC transfer in nonblocking way.
| [in] | base | SDXC base address |
| [in,out] | dma_config | SDXC DMA configuration |
| [in] | xfer | SDXC transfer context |
| hpm_stat_t sdxc_wait_cmd_done | ( | SDXC_Type * | base, |
| sdxc_command_t * | cmd, | ||
| bool | polling_cmd_done | ||
| ) |
#include <drivers/inc/hpm_sdxc_drv.h>
Wait until SDXC command completes.
| [in] | base | SDXC base address |
| [in] | cmd | Command |
| [out] | polling_cmd_done | flag to determine whether to use blocking wait |
| SDXC | command execution status |
|
inlinestatic |
#include <drivers/inc/hpm_sdxc_drv.h>
Write data to SDXC using non-DMA mode.
| [in] | base | SDXC base address |
| [in] | data | Data to be written to SDXC |