- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Data Structures | Defines | Typedefs | Enumerations | Functions | Variables
csl_spi.h File Reference

SPI functional layer API header file. More...

`#include "soc.h"`
`#include "csl_error.h"`
`#include "csl_types.h"`
`#include "csl_general.h"`

Go to the source code of this file.

## Data Structures
struct | CSL_SpiObj
| Object structure. More...
struct | SPI_Config
| Configuration structure. More...
## Defines
#define | CSL_SPI_SPICR1_FIRQ_DISABLE (Uint16)0
#define | CSL_SPI_SPICR1_FIRQ_ENABLE (Uint16)1
#define | SPI_READ_CMD (Uint16)1
#define | SPI_WRITE_CMD (Uint16)2
#define | SPI_DISABLE (0)
#define | SPI_ENABLE (1)
#define | SPI_ACTIVE (0)
## Typedefs
typedef enum SPI_Command | SPI_Command
| SPI Command.
typedef CSL_SpiObj * | CSL_SpiHandle
| Object Handler.
## Enumerations
enum | SPI_HwMode { SPI_CS_NUM_0, SPI_CS_NUM_1, SPI_CS_NUM_2, SPI_CS_NUM_3, SPI_CS_NUM_INVALID }
| SPI chip select. More...
enum | SPI_WordLen { SPI_WORD_LENGTH_1 = 0, SPI_WORD_LENGTH_2, SPI_WORD_LENGTH_3, SPI_WORD_LENGTH_4, SPI_WORD_LENGTH_5, SPI_WORD_LENGTH_6, SPI_WORD_LENGTH_7, SPI_WORD_LENGTH_8, SPI_WORD_LENGTH_9, SPI_WORD_LENGTH_10, SPI_WORD_LENGTH_11, SPI_WORD_LENGTH_12, SPI_WORD_LENGTH_13, SPI_WORD_LENGTH_14, SPI_WORD_LENGTH_15, SPI_WORD_LENGTH_16, SPI_WORD_LENGTH_17, SPI_WORD_LENGTH_18, SPI_WORD_LENGTH_19, SPI_WORD_LENGTH_20, SPI_WORD_LENGTH_21, SPI_WORD_LENGTH_22, SPI_WORD_LENGTH_23, SPI_WORD_LENGTH_24, SPI_WORD_LENGTH_25, SPI_WORD_LENGTH_26, SPI_WORD_LENGTH_27, SPI_WORD_LENGTH_28, SPI_WORD_LENGTH_29, SPI_WORD_LENGTH_30, SPI_WORD_LENGTH_31, SPI_WORD_LENGTH_32, SPI_MAX_WORD_LEN }
| SPI word length. More...
enum | SPI_WordCntEnb { SPI_WORD_IRQ_DISABLE, SPI_WORD_IRQ_ENABLE }
| SPI word intrupt. More...
enum | SPI_FrameCntEnb { SPI_FRAME_IRQ_DISABLE, SPI_FRAME_IRQ_ENABLE }
| SPI frame intrupt. More...
enum | SPI_Command { SPI_RSVD_CMD = 0, SPI_READ, SPI_WRITE, SPI_RSVD1_CMD }
| SPI Command. More...
enum | SPI_DataDly { SPI_DATA_DLY_0 = 0, SPI_DATA_DLY_1, SPI_DATA_DLY_2, SPI_DATA_DLY_3, SPI_DATA_DLY_UNKNOWN }
| SPI data delay. More...
enum | SPI_ClkPolarity { SPI_CLKP_LOW_AT_IDLE = 0, SPI_CLKP_HIGH_AT_IDLE }
| SPI clock polarity. More...
enum | SPI_ChipSelPol { SPI_CSP_ACTIVE_LOW = 0, SPI_CSP_ACTIVE_HIGH }
| SPI chip select polarity. More...
enum | SPI_ClkPh { SPI_CLK_PH_FALL_EDGE = 0, SPI_CLK_PH_RISE_EDGE }
| SPI clock phase. More...
enum | SPI_OperMode { SPI_POLLING_MODE, SPI_INTERRUPT_MODE }
| SPI Operation mode. More...
## Functions
CSL_Status | SPI_init (void)
CSL_Status | SPI_deInit (void)
CSL_SpiHandle | SPI_open (SPI_HwMode csNum, SPI_OperMode opMode)
CSL_Status | SPI_close (CSL_SpiHandle hSpi)
CSL_Status | SPI_config (CSL_SpiHandle hSpi, SPI_Config *spiHwConfig)
CSL_Status | SPI_read (CSL_SpiHandle hSpi, Uint16 *readBuffer, Uint16 bufLen)
CSL_Status | SPI_write (CSL_SpiHandle hSpi, Uint16 *writeBuffer, Uint16 bufLen)
CSL_Status | SPI_dataTransaction (CSL_SpiHandle hSpi, Uint16 *rwBuffer, Uint16 rwBufLen, SPI_Command readOrWrite)
## Variables
static CSL_SpiObj | SPI_Instance

## Detailed Description

SPI functional layer API header file.

Path: \(CSLPATH)/inc