Macros | Functions
XdkExtensionPortSpi

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 XdkExtensionPortSpi:

Macros

#define BCDS_MODULE_ID   XDK_APP_MODULE_ID_EXTENSION_PORT_SPI_CTRL
 
#define EXT_PORT_SPI_CS_PIN_ID   BSP_EXTENSIONPORT_GPIO_PD8
 
#define EXT_PORT_SPI_READ_BIT   UINT8_C(0x80)
 
#define EXT_PORT_SPI_REG1_ADDR   UINT8_C(0x22)
 
#define EXT_PORT_SPI_REG1_ADDR_VAL   UINT8_C(0x08)
 
#define EXT_PORT_SPI_REG2_ADDR   UINT8_C(0x00)
 
#define EXT_PORT_SPI_REG2_ADDR_VAL   UINT8_C(0x03)
 
#define EXT_PORT_SPI_SLAVE_ADDR   UINT8_C(0x68)
 
#define SPI_DATA_TRANSFER_BAUDRATE   UINT32_C(2000000)
 
#define SPI_DATA_TRANSFER_TIMEOUT_MILLISEC   UINT32_C(1000)
 

Functions

Retcode_T ExtensionSpiExample_DeInitialize (void)
 This API Deinitialize the SPI interface driver Once this called, from there-on user needs to call ExtensionSpiExample_Initialize for using the SPI communication again. More...
 
Retcode_T ExtensionSpiExample_Initialize (CmdProcessor_T *handle)
 This API initialize the SPI Interface Driver. More...
 
Retcode_T ExtensionSpiExample_ReadRegister (uint8_t regAddr, uint8_t *readVal, uint8_t readLength)
 This API Read the value from the SPI interface driver. More...
 
Retcode_T ExtensionSpiExample_ValidateChip (void)
 This API is used to demonstrate read and write on the extension port SPI interface. More...
 
Retcode_T ExtensionSpiExample_WriteRegister (uint8_t regAddr, uint8_t *writeVal, uint8_t writeLength)
 This API Write the Value to the SPI interface driver. More...
 
static Retcode_T SpiCSPinDeInit (void)
 function to De-Initialize the Extension Port SPI CS pin. More...
 
static Retcode_T SpiCSPinInit (void)
 function to Initialize the Extension Port SPI CS pin with the configurations. More...
 
static Retcode_T SpiSetCSHigh (void)
 function to Put the Extension board SPI CS pin High More...
 
static Retcode_T SpiSetCSLow (void)
 function to Put the Extension board SPI CS pin Low More...
 

Detailed Description

Macro Definition Documentation

#define BCDS_MODULE_ID   XDK_APP_MODULE_ID_EXTENSION_PORT_SPI_CTRL
#define EXT_PORT_SPI_CS_PIN_ID   BSP_EXTENSIONPORT_GPIO_PD8
#define EXT_PORT_SPI_READ_BIT   UINT8_C(0x80)
#define EXT_PORT_SPI_REG1_ADDR   UINT8_C(0x22)
#define EXT_PORT_SPI_REG1_ADDR_VAL   UINT8_C(0x08)
#define EXT_PORT_SPI_REG2_ADDR   UINT8_C(0x00)
#define EXT_PORT_SPI_REG2_ADDR_VAL   UINT8_C(0x03)
#define EXT_PORT_SPI_SLAVE_ADDR   UINT8_C(0x68)
#define SPI_DATA_TRANSFER_BAUDRATE   UINT32_C(2000000)

Macro used to define the SPI Baudrate

#define SPI_DATA_TRANSFER_TIMEOUT_MILLISEC   UINT32_C(1000)

Macro used to define the data transfer timeout

Function Documentation

Retcode_T ExtensionSpiExample_DeInitialize ( void  )

Refer interface header for description

+ Here is the call graph for this function:

Retcode_T ExtensionSpiExample_Initialize ( CmdProcessor_T handle)

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T ExtensionSpiExample_ReadRegister ( uint8_t  regAddr,
uint8_t *  readVal,
uint8_t  readLength 
)

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T ExtensionSpiExample_ValidateChip ( void  )

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Retcode_T ExtensionSpiExample_WriteRegister ( uint8_t  regAddr,
uint8_t *  writeVal,
uint8_t  writeLength 
)

Refer interface header for description

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Retcode_T SpiCSPinDeInit ( void  )
static

+ Here is the caller graph for this function:

static Retcode_T SpiCSPinInit ( void  )
static

+ Here is the caller graph for this function:

static Retcode_T SpiSetCSHigh ( void  )
inlinestatic

+ Here is the caller graph for this function:

static Retcode_T SpiSetCSLow ( void  )
inlinestatic

+ Here is the caller graph for this function:


This documentation file has been automatically generated on Fri Oct 4 2019 03:47:45 by doxygen 1.8.8