Files | Data Structures | Typedefs | Enumerations | Functions
Extension port SPI

This Module contains necessary implementation in order to enable user to develop his application using the Extension port SPI communication interface. This module can be used a reference design for interfacing user device via SPI of extension port. More...

+ Collaboration diagram for Extension port SPI:

Files

file  ExtensionPortSpi.h
 

Data Structures

struct  ExtensionPortSpi_Config_S
 Structure to represent the configurations of the extension port SPI. More...
 

Typedefs

typedef enum
ExtensionPortSpi_BitOrder_E 
ExtensionPortSpi_BitOrder_T
 Typedef to represent the bit order for the data sent via the extension port SPI. More...
 
typedef enum
ExtensionPortSpi_ClockMode_E 
ExtensionPortSpi_ClockMode_T
 Typedef to represent the clock mode of the extension port SPI. More...
 
typedef struct
ExtensionPortSpi_Config_S 
ExtensionPortSpi_Config_T
 Structure to represent the configuration of the extension port SPI. More...
 

Enumerations

enum  ExtensionPortSpi_BitOrder_E
 Enum to represent the bit order for the data sent via the extension port SPI. More...
 
enum  ExtensionPortSpi_ClockMode_E
 Enum to represent the clock mode of the extension port SPI. More...
 

Functions

Retcode_T ExtensionPortSpi_DeInitialize (void)
 This API Deinitialize the SPI interface driver. More...
 
Retcode_T ExtensionPortSpi_Initialize (ExtensionPortSpi_Config_T *config)
 This API initialize the SPI Interface Driver. More...
 
Retcode_T ExtensionPortSpi_Read (uint8_t *readVal, uint32_t readLength, uint32_t timeout)
 This API will Read the value from the SPI interface driver. More...
 
Retcode_T ExtensionPortSpi_Write (uint8_t *writeVal, uint32_t writeLength, uint32_t timeout)
 This API will Write the Value to the SPI interface driver. More...
 

Detailed Description


Data Structure Documentation

struct ExtensionPortSpi_Config_S

Data Fields

uint32_t BaudRate
 
ExtensionPortSpi_BitOrder_T BitOrder
 
ExtensionPortSpi_ClockMode_T ClockMode
 

Field Documentation

uint32_t BaudRate

Typedef Documentation

Enumeration Type Documentation

Enumerator
EXTENSION_PORT_SPI_BIT_ORDER_MSB_FIRST 
EXTENSION_PORT_SPI_BIT_ORDER_LSB_FIRST 
Enumerator
EXTENSION_PORT_SPI_CLOCK_MODE_0 
EXTENSION_PORT_SPI_CLOCK_MODE_1 
EXTENSION_PORT_SPI_CLOCK_MODE_2 
EXTENSION_PORT_SPI_CLOCK_MODE_3 

Function Documentation

Retcode_T ExtensionPortSpi_DeInitialize ( void  )
Return values
RETCODE_OKin case of Spi De-Initialization Success.
RETCODE_UNINITIALIZEDin case of spi not initialized.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).

Refer interface header for description

+ Here is the caller graph for this function:

Retcode_T ExtensionPortSpi_Initialize ( ExtensionPortSpi_Config_T config)
Return values
RETCODE_OKin case of Spi Initialization Success.
RETCODE_OUT_OF_RESOURCESin case of Failed to create Semaphore to handle the interrupt or Failed to Set the Spi Configurations or While enabling the SPI.
RETCODE_NULL_POINTERin case of SPI Handle NULL.
Returns
In case of other failures refer #BSP_ExtensionPort_Connect API's.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T ExtensionPortSpi_Read ( uint8_t *  readVal,
uint32_t  readLength,
uint32_t  timeout 
)
Parameters
[in]readValBuffer to hold the data received over SPI
[in]readLengthNo of bytes to be read over the SPI bus
Return values
RETCODE_OKin case of Spi Read Register Success.
RETCODE_TIMEOUTin case of interrupt not triggered.
RETCODE_NULL_POINTERin case of SPI Handle NULL.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).

Refer interface header for description

+ Here is the caller graph for this function:

Retcode_T ExtensionPortSpi_Write ( uint8_t *  writeVal,
uint32_t  writeLength,
uint32_t  timeout 
)
Parameters
[in]writeValBuffer to hold the data to be transmitted over SPI
[in]writeLengthNo of bytes to be transmitted over the SPI bus
Return values
RETCODE_OKin case of Spi Write value on passing Register Success.
RETCODE_TIMEOUTin case of interrupt not triggered.
RETCODE_NULL_POINTERin case of SPI Handle NULL.
Note
The return value consist of (First 1 MSByte represents Package ID, Next byte represents Severity and Last 2 LSBytes represents error code).

Refer interface header for description

+ Here is the caller graph for this function:


This documentation file has been automatically generated on Wed May 6 2020 20:45:20 by doxygen 1.8.8