27#ifndef LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX78002_SDHC_H_
28#define LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX78002_SDHC_H_
31#include "mxc_device.h"
45#define MXC_SDHC_Bus_Voltage_1_8 5
46#define MXC_SDHC_Bus_Voltage_3_0 6
47#define MXC_SDHC_Bus_Voltage_3_3 7
49#define MXC_SDHC_DIRECTION_CFG 0
50#define MXC_SDHC_DIRECTION_READ 1
51#define MXC_SDHC_DIRECTION_WRITE 2
unsigned int block_gap
Definition: sdhc.h:59
unsigned int dma
Definition: sdhc.h:89
uint32_t sdma
Definition: sdhc.h:81
uint32_t block_count
Definition: sdhc.h:85
unsigned int bus_voltage
Definition: sdhc.h:58
mxc_sdhc_callback_fn callback
Definition: sdhc.h:97
uint32_t block_size
Definition: sdhc.h:83
unsigned int clk_div
Definition: sdhc.h:60
uint32_t arg_1
Definition: sdhc.h:87
unsigned int direction
Definition: sdhc.h:91
uint32_t host_control_1
Definition: sdhc.h:95
uint32_t command
Definition: sdhc.h:93
void MXC_SDHC_Set_Clock_Config(unsigned int clk_div)
Set clock divider.
void(* mxc_sdhc_callback_fn)(int error_code)
Callback function type used in asynchromous SDHC communications requests.
Definition: sdhc.h:73
int MXC_SDHC_Shutdown(void)
Shutdown SDHC module.
unsigned MXC_SDHC_GetFlags(void)
Get interrupt flags.
void MXC_SDHC_PowerDown(void)
Disable SDHC Bus Power.
int MXC_SDHC_SendCommand(mxc_sdhc_cmd_cfg_t *sd_cmd_cfg)
Send Command, blocking.
void MXC_SDHC_Reset_CMD_DAT(void)
Abort any command or data transaction in progress on controller.
int MXC_SDHC_Init(const mxc_sdhc_cfg_t *cfg)
Initialize and enable SDHC module.
void MXC_SDHC_Reset(void)
Resets SDHC back to default settings.
void MXC_SDHC_ClearFlags(uint32_t mask)
Clear interrupt flags.
int MXC_SDHC_SendCommandAsync(mxc_sdhc_cmd_cfg_t *sd_cmd_cfg)
Send SDHC command Async.
int MXC_SDHC_Card_Busy(void)
Check if Card is busy.
unsigned int MXC_SDHC_Get_Clock_Config(void)
Get clock divider.
void MXC_SDHC_PowerUp(void)
Enable SDHC Bus Power.
void MXC_SDHC_Get_Response128(unsigned char *response)
Read a 128-bit command response.
unsigned int MXC_SDHC_Get_Host_Cn_1(void)
Retrieve host control 1 register.
uint32_t MXC_SDHC_Get_Response32(void)
Read a 32-bit command response.
uint32_t MXC_SDHC_Get_Response32_Auto(void)
Read a 32-bit command response for Auto commands.
void MXC_SDHC_Handler(void)
SDHC interrupt handler.
int MXC_SDHC_Card_Inserted(void)
See if card is inserted.
unsigned int MXC_SDHC_Get_Input_Clock_Freq(void)
Get the input clock frequency for the SDHC peripheral.
Used to configure voltage and clock for sdhc interface.
Definition: sdhc.h:57
Used to configure sdhc interface.
Definition: sdhc.h:79
Registers, Bit Masks and Bit Positions for the SDHC Peripheral Module.