106 #ifndef ti_drivers_SD__include 107 #define ti_drivers_SD__include 131 #define SD_CMD_RESERVED (32) 145 #define SD_STATUS_RESERVED (-32) 160 #define SD_STATUS_SUCCESS (0) 168 #define SD_STATUS_ERROR (-1) 177 #define SD_STATUS_UNDEFINEDCMD (-2) 235 typedef int_fast16_t (*
SD_ControlFxn)(SD_Handle handle, uint_fast16_t cmd,
void *arg);
271 typedef int_fast16_t (*
SD_ReadFxn)(SD_Handle handle,
void *buf, int_fast32_t sector, uint_fast32_t secCount);
277 typedef int_fast16_t (*
SD_WriteFxn)(SD_Handle handle,
const void *buf, int_fast32_t sector, uint_fast32_t secCount);
338 extern void SD_close(SD_Handle handle);
378 extern int_fast16_t
SD_control(SD_Handle handle, uint_fast16_t cmd,
void *arg);
480 extern int_fast16_t
SD_read(SD_Handle handle,
void *buf, int_fast32_t sector, uint_fast32_t secCount);
504 extern int_fast16_t
SD_write(SD_Handle handle,
const void *buf, int_fast32_t sector, uint_fast32_t secCount);
int_fast16_t SD_control(SD_Handle handle, uint_fast16_t cmd, void *arg)
Function performs implementation specific features on a given SD_Handle.
struct SD_Config_ * SD_Handle
A handle that is returned from a SD_open() call.
Definition: SD.h:208
int_fast16_t(* SD_InitializeFxn)(SD_Handle handle)
A function pointer to a driver specific implementation of SD_initializeFxn().
Definition: SD.h:259
void * custom
Definition: SD.h:222
SD_getSectorSizeFxn getSectorSizeFxn
Definition: SD.h:293
ADC_Params params
Definition: Driver_Init.h:11
SD Global configuration.
Definition: SD.h:317
uint_fast32_t SD_getSectorSize(SD_Handle handle)
Function to obtain the sector size used to access the SD card.
SD_InitFxn initFxn
Definition: SD.h:295
SD_InitializeFxn initializeFxn
Definition: SD.h:297
SD Parameters.
Definition: SD.h:220
SD_Handle(* SD_OpenFxn)(SD_Handle handle, SD_Params *params)
A function pointer to a driver specific implementation of SD_OpenFxn().
Definition: SD.h:265
uint_fast32_t SD_getNumSectors(SD_Handle handle)
Function to obtain the total number of sectors on the SD card. Note: Total Card capacity is the (Numb...
int_fast16_t(* SD_WriteFxn)(SD_Handle handle, const void *buf, int_fast32_t sector, uint_fast32_t secCount)
A function pointer to a driver specific implementation of SD_writeFxn().
Definition: SD.h:277
void SD_init(void)
This function initializes the SD driver.
uint_fast32_t(* SD_getSectorSizeFxn)(SD_Handle handle)
A function pointer to a driver specific implementation of SD_getSectorSizeFxn().
Definition: SD.h:247
int_fast16_t(* SD_ControlFxn)(SD_Handle handle, uint_fast16_t cmd, void *arg)
A function pointer to a driver specific implementation of SD_controlFxn().
Definition: SD.h:235
SD_OpenFxn openFxn
Definition: SD.h:299
The definition of a SD function table that contains the required set of functions to control a specif...
Definition: SD.h:284
int_fast16_t SD_write(SD_Handle handle, const void *buf, int_fast32_t sector, uint_fast32_t secCount)
Function that writes data to the specified sectors of the SD card. The source is specified by buf...
int_fast16_t SD_read(SD_Handle handle, void *buf, int_fast32_t sector, uint_fast32_t secCount)
Function that reads the specified sectors from the SD card. The destination is specified by buf...
void SD_close(SD_Handle handle)
Function to close a SD peripheral specified by the SD handle.
SD_ReadFxn readFxn
Definition: SD.h:301
SD_ControlFxn controlFxn
Definition: SD.h:289
struct SD_Config_ SD_Config
SD Global configuration.
void(* SD_InitFxn)(SD_Handle handle)
A function pointer to a driver specific implementation of SD_InitFxn().
Definition: SD.h:253
SD_WriteFxn writeFxn
Definition: SD.h:303
SD_getNumSectorsFxn getNumSectorsFxn
Definition: SD.h:291
uint_fast32_t(* SD_getNumSectorsFxn)(SD_Handle handle)
A function pointer to a driver specific implementation of SD_getNumSectorsFxn().
Definition: SD.h:241
SD_CardType
SD Card type inserted.
Definition: SD.h:197
int_fast16_t(* SD_ReadFxn)(SD_Handle handle, void *buf, int_fast32_t sector, uint_fast32_t secCount)
A function pointer to a driver specific implementation of SD_readFxn().
Definition: SD.h:271
SD_CloseFxn closeFxn
Definition: SD.h:287
void const * hwAttrs
Definition: SD.h:326
SD_FxnTable const * fxnTablePtr
Definition: SD.h:320
void SD_Params_init(SD_Params *params)
Function to initialize the SD_Params struct to its defaults.
SD_Handle SD_open(uint_least8_t index, SD_Params *params)
Function to open the SD peripheral with the index and parameters specified.
void(* SD_CloseFxn)(SD_Handle handle)
A function pointer to a driver specific implementation of SD_CloseFxn().
Definition: SD.h:229
void * object
Definition: SD.h:323
int_fast16_t SD_initialize(SD_Handle handle)
Function to initialize the SD card.