83 #define SPI_CMD_RESERVED (32U) 97 #define SPI_STATUS_RESERVED (-((int32_t)32)) 105 #define SPI_STATUS_SUCCESS (int32_t)(0) 113 #define SPI_STATUS_ERROR (-((int32_t)1)) 122 #define SPI_STATUS_UNDEFINEDCMD (-((int32_t)2)) 127 #define SPI_WAIT_FOREVER (~(0U)) 137 typedef enum SPI_Status_s {
154 typedef struct SPI_Transaction_s {
180 typedef enum SPI_Mode_s {
189 typedef enum SPI_FrameFormat_s {
208 typedef enum SPI_TransferMode_s {
229 typedef struct SPI_Params_s {
294 typedef struct SPI_FxnTable_s {
328 typedef struct SPI_Config_s {
339 #define SPI_MAX_CONFIG_CNT (8U) void(* SPI_TransferCancelFxn)(SPI_Handle handle)
A function pointer to a driver specific implementation of SPI_transferCancel().
Definition: SPI.h:287
bool(* SPI_TransferFxn)(SPI_Handle handle, SPI_Transaction *transaction)
A function pointer to a driver specific implementation of SPI_transfer().
Definition: SPI.h:280
The definition of a SPI function table that contains the required set of functions to control a speci...
Definition: SPI.h:294
SPI_FxnTable const * fxnTablePtr
Definition: SPI.h:330
uint32_t dataSize
Definition: SPI.h:237
void SPI_init(void)
This function initializes the SPI module.
uint32_t transferTimeout
Definition: SPI.h:231
SPI_Mode
Definitions for various SPI modes of operation.
Definition: SPI.h:180
SPI_CallbackFxn transferCallbackFxn
Definition: SPI.h:234
SPI_FrameFormat frameFormat
Definition: SPI.h:238
SPI_FrameFormat
Definitions for various SPI data frame formats.
Definition: SPI.h:189
void SPI_Params_init(SPI_Params *params)
Function to initialize the SPI_Params struct to its defaults.
SPI_Status status
Definition: SPI.h:162
SPI Parameters.
Definition: SPI.h:229
SPI_Handle(* SPI_OpenFxn)(SPI_Handle handle, const SPI_Params *params)
A function pointer to a driver specific implementation of SPI_open().
Definition: SPI.h:267
struct SPI_Config_s * SPI_Handle
A handle that is returned from a SPI_open() call.
Definition: SPI.h:132
void(* SPI_CloseFxn)(SPI_Handle handle)
A function pointer to a driver specific implementation of SPI_close().
Definition: SPI.h:247
SPI_CloseFxn closeFxn
Definition: SPI.h:296
SPI_TransferMode transferMode
Definition: SPI.h:230
SPI_TransferFxn transferFxn
Definition: SPI.h:308
#define SPI_MAX_CONFIG_CNT
Definition: SPI.h:339
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:174
uint32_t bitRate
Definition: SPI.h:236
void(* SPI_InitFxn)(SPI_Handle handle)
A function pointer to a driver specific implementation of SPI_init().
Definition: SPI.h:261
SPI_Handle SPI_open(uint32_t idx, SPI_Params *params)
This function opens a given SPI peripheral.
void SPI_close(SPI_Handle handle)
Function to close a SPI peripheral specified by the SPI handle.
void * arg
Definition: SPI.h:159
void * rxBuf
Definition: SPI.h:158
SPI_TransferCancelFxn transferCancelFxn
Definition: SPI.h:311
SPI_ControlFxn controlFxn
Definition: SPI.h:299
SPI_OpenFxn openFxn
Definition: SPI.h:305
void * object
Definition: SPI.h:333
SPI_ServiceISRFxn serviceISRFxn
Definition: SPI.h:314
void SPI_transferCancel(SPI_Handle handle)
Function to cancel SPI transactions.
SPI_TransferMode
SPI transfer mode determines the whether the SPI controller operates synchronously or asynchronously....
Definition: SPI.h:208
SPI_InitFxn spiInitFxn
Definition: SPI.h:302
void * custom
Definition: SPI.h:239
SPI_Status
Status codes that are set by the SPI driver.
Definition: SPI.h:137
SPI_Mode mode
Definition: SPI.h:235
bool SPI_transfer(SPI_Handle handle, SPI_Transaction *spiTrans)
Function to perform SPI transactions.
void SPI_serviceISR(SPI_Handle handle)
Function to service the SPI module's interrupt service routine.
int32_t(* SPI_ControlFxn)(SPI_Handle handle, uint32_t cmd, const void *arg)
A function pointer to a driver specific implementation of SPI_control().
Definition: SPI.h:253
SPI_Config SPI_config_list[SPI_MAX_CONFIG_CNT]
Definition: SPI.h:340
void(* SPI_ServiceISRFxn)(SPI_Handle handle)
A function pointer to a driver specific implementation of SPI_serviceISR().
Definition: SPI.h:274
size_t count
Definition: SPI.h:156
void const * hwAttrs
Definition: SPI.h:336
void * txBuf
Definition: SPI.h:157
A SPI_Transaction data structure is used with SPI_transfer(). It indicates how many SPI_FrameFormat f...
Definition: SPI.h:154
SPI Global configuration.
Definition: SPI.h:328
int32_t SPI_control(SPI_Handle handle, uint32_t cmd, void *arg)
Function performs implementation specific features on a given SPI_Handle.