PDK API Guide for J721E
MCSPI.h File Reference

Introduction

Multi-Channel SPI driver interface.

============================================================================

The MCSPI header file should be included in an application as follows:


Go to the source code of this file.

Data Structures

struct  MCSPI_Params
 MCSPI Parameters. More...
 
struct  MCSPI_FxnTable
 The definition of a MCSPI function table that contains the required set of functions to control a specific MCSPI driver implementation. More...
 
struct  MCSPI_Config
 MCSPI Global configuration. More...
 

Macros

#define MCSPI_MAX_NUM_INSTANCES   (SPI_MAX_CONFIG_CNT)
 Max number of MCSPI peripheral instances. More...
 
#define MCSPI_MAX_NUM_CHANNELS   (4U)
 Max number of channels of a MCSPI peripheral instance. More...
 

Typedefs

typedef struct MCSPI_Config_s * MCSPI_Handle
 A handle that is returned from a MCSPI_open() call. More...
 
typedef 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. More...
 
typedef void(* MCSPI_CloseFxn) (MCSPI_Handle handle)
 A function pointer to a driver specific implementation of MCSPI_close(). More...
 
typedef int32_t(* MCSPI_ControlFxn) (MCSPI_Handle handle, uint32_t cmd, const void *arg)
 A function pointer to a driver specific implementation of MCSPI_control(). More...
 
typedef void(* MCSPI_InitFxn) (MCSPI_Handle handle)
 A function pointer to a driver specific implementation of MCSPI_init(). More...
 
typedef MCSPI_Handle(* MCSPI_OpenFxn) (MCSPI_Handle handle, const MCSPI_Params *params)
 A function pointer to a driver specific implementation of MCSPI_open(). More...
 
typedef bool(* MCSPI_TransferFxn) (MCSPI_Handle handle, SPI_Transaction *transaction)
 A function pointer to a driver specific implementation of MCSPI_transfer(). More...
 
typedef void(* MCSPI_TransferCancelFxn) (MCSPI_Handle handle)
 A function pointer to a driver specific implementation of MCSPI_transferCancel(). More...
 
typedef MCSPI_Config MCSPI_config_list[MCSPI_MAX_NUM_INSTANCES][MCSPI_MAX_NUM_CHANNELS]
 

Functions

void MCSPI_close (MCSPI_Handle handle)
 Function to close a channel of a SPI peripheral specified by the MCSPI handle. More...
 
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 MCSPI handle. More...
 
void MCSPI_init (void)
 This function initializes the MCSPI module. More...
 
MCSPI_Handle MCSPI_open (uint32_t idx, uint32_t channel, MCSPI_Params *params)
 This function opens a given channel of a given MCSPI peripheral. More...
 
void MCSPI_Params_init (MCSPI_Params *params)
 Function to initialize the MCSPI_Params struct to its defaults. More...
 
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. More...
 
void MCSPI_transferCancel (MCSPI_Handle handle)
 Function to cancel SPI transactions on channel of a SPI peripheral specified by the MCSPI handle. More...