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) 234 uint_fast16_t cmd,
void *arg);
270 typedef int_fast16_t (*
SD_ReadFxn) (SD_Handle handle,
void *buf,
271 int_fast32_t sector, uint_fast32_t secCount);
277 typedef int_fast16_t (*
SD_WriteFxn) (SD_Handle handle,
const void *buf,
278 int_fast32_t sector, uint_fast32_t secCount);
337 extern void SD_close(SD_Handle handle);
377 extern int_fast16_t
SD_control(SD_Handle handle, uint_fast16_t cmd,
void *arg);
479 extern int_fast16_t
SD_read(SD_Handle handle,
void *buf,
480 int_fast32_t sector, uint_fast32_t secCount);
502 extern int_fast16_t
SD_write(SD_Handle handle,
const void *buf,
503 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.
SD_ControlFxn controlFxn
Definition: SD.h:289
struct SD_Config_ * SD_Handle
A handle that is returned from a SD_open() call.
Definition: SD.h:207
int_fast16_t(* SD_InitializeFxn)(SD_Handle handle)
A function pointer to a driver specific implementation of SD_initializeFxn().
Definition: SD.h:258
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_Handle(* SD_OpenFxn)(SD_Handle handle, SD_Params *params)
A function pointer to a driver specific implementation of SD_OpenFxn().
Definition: SD.h:264
uint_fast32_t SD_getNumSectors(SD_Handle handle)
A function pointer to a driver specific implementation of SD_getNumSectors(). Note: Total Card capaci...
SD_CloseFxn closeFxn
Definition: SD.h:287
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:246
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:233
SD_WriteFxn writeFxn
Definition: SD.h:303
SD_InitFxn initFxn
Definition: SD.h:295
int_fast16_t SD_write(SD_Handle handle, const void *buf, int_fast32_t sector, uint_fast32_t secCount)
A function pointer to a driver specific implementation of SD_write().
int_fast16_t SD_read(SD_Handle handle, void *buf, int_fast32_t sector, uint_fast32_t secCount)
A function pointer to a driver specific implementation of SD_read().
void SD_close(SD_Handle handle)
Function to close a SD peripheral specified by the SD handle.
SD_getSectorSizeFxn getSectorSizeFxn
Definition: SD.h:293
struct SD_Config_ SD_Config
SD Global configuration.
SD_ReadFxn readFxn
Definition: SD.h:301
void(* SD_InitFxn)(SD_Handle handle)
A function pointer to a driver specific implementation of SD_InitFxn().
Definition: SD.h:252
SD_CardType_
SD Card type inserted.
Definition: SD.h:197
void * custom
Definition: SD.h:220
SD_InitializeFxn initializeFxn
Definition: SD.h:297
struct SD_Params_ SD_Params
SD Parameters.
uint_fast32_t(* SD_getNumSectorsFxn)(SD_Handle handle)
A function pointer to a driver specific implementation of SD_getNumSectorsFxn().
Definition: SD.h:240
SD_getNumSectorsFxn getNumSectorsFxn
Definition: SD.h:291
The definition of a SD function table that contains the required set of functions to control a specif...
Definition: SD.h:285
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:270
struct SD_FxnTable_ SD_FxnTable
The definition of a SD function table that contains the required set of functions to control a specif...
void const * hwAttrs
Definition: SD.h:325
enum SD_CardType_ SD_CardType
SD Card type inserted.
SD_FxnTable const * fxnTablePtr
Definition: SD.h:319
void SD_Params_init(SD_Params *params)
Function to initialize the SD_Params struct to its defaults.
SD_OpenFxn openFxn
Definition: SD.h:299
SD_Handle SD_open(uint_least8_t index, SD_Params *params)
A function pointer to a driver specific implementation of SD_open().
SD Parameters.
Definition: SD.h:219
void(* SD_CloseFxn)(SD_Handle handle)
A function pointer to a driver specific implementation of SD_CloseFxn().
Definition: SD.h:227
void * object
Definition: SD.h:322
int_fast16_t SD_initialize(SD_Handle handle)
A function pointer to a driver specific implementation of SD_initialize().