142 #ifndef ti_drivers_SPI__include
143 #define ti_drivers_SPI__include
170 #define SPI_CMD_RESERVED 32
184 #define SPI_STATUS_RESERVED -32
199 #define SPI_STATUS_SUCCESS 0
207 #define SPI_STATUS_ERROR -1
216 #define SPI_STATUS_UNDEFINEDCMD -2
236 #define SPI_WAIT_FOREVER ~(0)
456 extern void SPI_close(SPI_Handle handle);
495 extern int SPI_control(SPI_Handle handle,
unsigned int cmd,
void *arg);
void SPI_init(void)
This function initializes the SPI module.
SPI_ServiceISRFxn serviceISRFxn
Definition: SPI.h:422
uint32_t bitRate
Definition: SPI.h:344
struct SPI_Params SPI_Params
SPI Parameters.
int(* SPI_ControlFxn)(SPI_Handle handle, unsigned int cmd, void *arg)
A function pointer to a driver specific implementation of SPI_control().
Definition: SPI.h:361
struct SPI_Transaction SPI_Transaction
A SPI_Transaction data structure is used with SPI_transfer(). It indicates how many SPI_FrameFormat f...
size_t count
Definition: SPI.h:264
void(* SPI_CallbackFxn)(SPI_Handle handle, SPI_Transaction *transaction)
The definition of a callback function used by the SPI driver when used in SPI_MODE_CALLBACK.
Definition: SPI.h:282
SPI_FrameFormat frameFormat
Definition: SPI.h:346
void SPI_transferCancel(SPI_Handle handle)
Function to cancel SPI transactions.
uint32_t transferTimeout
Definition: SPI.h:339
SPI_TransferMode
SPI transfer mode determines the whether the SPI controller operates synchronously or asynchronously...
Definition: SPI.h:316
SPI_TransferMode transferMode
Definition: SPI.h:338
void SPI_Params_init(SPI_Params *params)
Function to initialize the SPI_Params struct to its defaults.
SPI_CloseFxn closeFxn
Definition: SPI.h:404
struct SPI_Config SPI_Config
SPI Global configuration.
SPI_TransferCancelFxn transferCancelFxn
Definition: SPI.h:419
SPI Parameters.
Definition: SPI.h:337
SPI_Status
Status codes that are set by the SPI driver.
Definition: SPI.h:246
SPI Global configuration.
Definition: SPI.h:436
bool(* SPI_TransferFxn)(SPI_Handle handle, SPI_Transaction *transaction)
A function pointer to a driver specific implementation of SPI_transfer().
Definition: SPI.h:388
void * arg
Definition: SPI.h:267
SPI_ControlFxn controlFxn
Definition: SPI.h:407
void(* SPI_TransferCancelFxn)(SPI_Handle handle)
A function pointer to a driver specific implementation of SPI_transferCancel().
Definition: SPI.h:395
void(* SPI_ServiceISRFxn)(SPI_Handle handle)
A function pointer to a driver specific implementation of SPI_serviceISR().
Definition: SPI.h:382
void * txBuf
Definition: SPI.h:265
The definition of a SPI function table that contains the required set of functions to control a speci...
Definition: SPI.h:402
void(* SPI_CloseFxn)(SPI_Handle handle)
A function pointer to a driver specific implementation of SPI_close().
Definition: SPI.h:355
uint32_t dataSize
Definition: SPI.h:345
uintptr_t custom
Definition: SPI.h:347
SPI_FxnTable const * fxnTablePtr
Definition: SPI.h:438
A SPI_Transaction data structure is used with SPI_transfer(). It indicates how many SPI_FrameFormat f...
Definition: SPI.h:262
SPI_OpenFxn openFxn
Definition: SPI.h:413
bool SPI_transfer(SPI_Handle handle, SPI_Transaction *transaction)
Function to perform SPI transactions.
SPI_Mode
Definitions for various SPI modes of operation.
Definition: SPI.h:288
struct SPI_FxnTable SPI_FxnTable
The definition of a SPI function table that contains the required set of functions to control a speci...
void * rxBuf
Definition: SPI.h:266
void SPI_close(SPI_Handle handle)
Function to close a SPI peripheral specified by the SPI handle.
void SPI_serviceISR(SPI_Handle handle)
Function to service the SPI module's interrupt service routine.
int SPI_control(SPI_Handle handle, unsigned int cmd, void *arg)
Function performs implementation specific features on a given SPI_Handle.
struct SPI_Config * SPI_Handle
A handle that is returned from a SPI_open() call.
Definition: SPI.h:241
void(* SPI_InitFxn)(SPI_Handle handle)
A function pointer to a driver specific implementation of SPI_init().
Definition: SPI.h:369
SPI_TransferFxn transferFxn
Definition: SPI.h:416
SPI_Handle SPI_open(unsigned int index, SPI_Params *params)
This function opens a given SPI peripheral.
SPI_Handle(* SPI_OpenFxn)(SPI_Handle handle, SPI_Params *params)
A function pointer to a driver specific implementation of SPI_open().
Definition: SPI.h:375
SPI_CallbackFxn transferCallbackFxn
Definition: SPI.h:342
SPI_Status status
Definition: SPI.h:270
void const * hwAttrs
Definition: SPI.h:444
SPI_FrameFormat
Definitions for various SPI data frame formats.
Definition: SPI.h:297
SPI_Mode mode
Definition: SPI.h:343
void * object
Definition: SPI.h:441
SPI_InitFxn initFxn
Definition: SPI.h:410