65 #define MCSPI_MAX_NUM_INSTANCES (SPI_MAX_CONFIG_CNT) 70 #define MCSPI_MAX_NUM_CHANNELS (4U) 92 typedef struct MCSPI_Params_s {
153 typedef struct MCSPI_FxnTable_s {
185 typedef struct MCSPI_Config_s {
int32_t(* MCSPI_ControlFxn)(MCSPI_Handle handle, uint32_t cmd, const void *arg)
A function pointer to a driver specific implementation of MCSPI_control().
Definition: MCSPI.h:118
void MCSPI_Params_init(MCSPI_Params *params)
Function to initialize the MCSPI_Params struct to its defaults.
The definition of a MCSPI function table that contains the required set of functions to control a spe...
Definition: MCSPI.h:153
SPI_Mode
Definitions for various SPI modes of operation.
Definition: SPI.h:180
SPI_FrameFormat
Definitions for various SPI data frame formats.
Definition: SPI.h:189
MCSPI_InitFxn mcspiInitFxn
Definition: MCSPI.h:161
MCSPI Global configuration.
Definition: MCSPI.h:185
MCSPI_OpenFxn openFxn
Definition: MCSPI.h:164
uint32_t transferTimeout
Definition: MCSPI.h:94
struct SPI_Config_s * SPI_Handle
A handle that is returned from a SPI_open() call.
Definition: SPI.h:132
MCSPI_CallbackFxn transferCallbackFxn
Definition: MCSPI.h:97
uint32_t dataSize
Definition: MCSPI.h:101
MCSPI_Handle(* MCSPI_OpenFxn)(MCSPI_Handle handle, const MCSPI_Params *params)
A function pointer to a driver specific implementation of MCSPI_open().
Definition: MCSPI.h:132
bool MCSPI_transfer(MCSPI_Handle handle, SPI_Transaction *spiTrans)
Function to perform SPI transactions on a channel of a SPI peripheral specified by the MCSPI handle.
uint32_t bitRate
Definition: MCSPI.h:100
SPI_Mode mode
Definition: MCSPI.h:98
SPI_Handle handle
Definition: MCSPI.h:190
MCSPI_TransferFxn transferFxn
Definition: MCSPI.h:167
int32_t MCSPI_control(MCSPI_Handle handle, uint32_t cmd, void *arg)
Function performs implementation specific features on a channel of a SPI peripheral specified by the ...
#define MCSPI_MAX_NUM_CHANNELS
Max number of channels of a MCSPI peripheral instance.
Definition: MCSPI.h:70
void * custom
Definition: MCSPI.h:103
MCSPI_Handle MCSPI_open(uint32_t idx, uint32_t channel, MCSPI_Params *params)
This function opens a given channel of a given MCSPI peripheral.
void(* MCSPI_InitFxn)(MCSPI_Handle handle)
A function pointer to a driver specific implementation of MCSPI_init().
Definition: MCSPI.h:126
MCSPI_CloseFxn closeFxn
Definition: MCSPI.h:155
MCSPI Parameters.
Definition: MCSPI.h:92
SPI_TransferMode
SPI transfer mode determines the whether the SPI controller operates synchronously or asynchronously....
Definition: SPI.h:208
#define MCSPI_MAX_NUM_INSTANCES
Max number of MCSPI peripheral instances.
Definition: MCSPI.h:65
void MCSPI_transferCancel(MCSPI_Handle handle)
Function to cancel SPI transactions on channel of a SPI peripheral specified by the MCSPI handle.
void MCSPI_init(void)
This function initializes the MCSPI module.
MCSPI_ControlFxn controlFxn
Definition: MCSPI.h:158
void(* MCSPI_CloseFxn)(MCSPI_Handle handle)
A function pointer to a driver specific implementation of MCSPI_close().
Definition: MCSPI.h:112
SPI_TransferMode transferMode
Definition: MCSPI.h:93
MCSPI_FxnTable const * fxnTablePtr
Definition: MCSPI.h:187
void(* MCSPI_TransferCancelFxn)(MCSPI_Handle handle)
A function pointer to a driver specific implementation of MCSPI_transferCancel().
Definition: MCSPI.h:146
bool(* MCSPI_TransferFxn)(MCSPI_Handle handle, SPI_Transaction *transaction)
A function pointer to a driver specific implementation of MCSPI_transfer().
Definition: MCSPI.h:139
void(* MCSPI_CallbackFxn)(MCSPI_Handle handle, SPI_Transaction *transaction)
The definition of a callback function used by the MCSPI driver when used in SPI_MODE_CALLBACK.
Definition: MCSPI.h:81
SPI_FrameFormat frameFormat
Definition: MCSPI.h:102
MCSPI_Config MCSPI_config_list[MCSPI_MAX_NUM_INSTANCES][MCSPI_MAX_NUM_CHANNELS]
Definition: MCSPI.h:197
MCSPI_TransferCancelFxn transferCancelFxn
Definition: MCSPI.h:170
uint32_t chnNum
Definition: MCSPI.h:193
A SPI_Transaction data structure is used with SPI_transfer(). It indicates how many SPI_FrameFormat f...
Definition: SPI.h:154
struct MCSPI_Config_s * MCSPI_Handle
A handle that is returned from a MCSPI_open() call.
Definition: MCSPI.h:75
void MCSPI_close(MCSPI_Handle handle)
Function to close a channel of a SPI peripheral specified by the MCSPI handle.