Macros | Functions
ExtensionSpiExample.c File Reference
#include "XdkAppInfo.h"
#include "AppController.h"
#include "ExtensionSpiExample.h"
#include "ExtensionPortSpi.h"
#include "BSP_ExtensionPort.h"
+ Include dependency graph for ExtensionSpiExample.c:

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...
 

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