Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
cascoda_spi_secure.c File Reference
#include <arm_cmse.h>
#include <assert.h>
#include <stdio.h>
#include "M2351.h"
#include "cascoda-bm/cascoda_interface.h"
#include "cascoda-bm/cascoda_spi.h"
#include "cascoda-bm/cascoda_types.h"
#include "cascoda_chili.h"
#include "cascoda_secure.h"
Include dependency graph for cascoda_spi_secure.c:

Macros

#define MAX(x, y)   ((x) > (y) ? (x) : (y))
 
#define MIN(x, y)   ((x) < (y) ? (x) : (y))
 

Enumerations

enum  SPIDMA_NextState { SPIDMA_END , SPIDMA_RX , SPIDMA_TX }
 

Functions

void CHILI_SPIDMAIRQHandler ()
 Interrupt Handler for SPI DMA. More...
 
__NONSECURE_ENTRY void BSP_SPIExchange (uint8_t *RxBuf, const uint8_t *TxBuf, uint8_t RxLen, uint8_t TxLen)
 
__NONSECURE_ENTRY void CHILI_RegisterSPIComplete (void(*callback)(void))
 Register the SPIComplete callback on trustzone (Compiles to nothing on non-tz) More...
 

Macro Definition Documentation

◆ MAX

#define MAX (   x,
 
)    ((x) > (y) ? (x) : (y))

◆ MIN

#define MIN (   x,
 
)    ((x) < (y) ? (x) : (y))

Enumeration Type Documentation

◆ SPIDMA_NextState

Enumerator
SPIDMA_END 
SPIDMA_RX 
SPIDMA_TX 

Function Documentation

◆ BSP_SPIExchange()

__NONSECURE_ENTRY void BSP_SPIExchange ( uint8_t *  RxBuf,
const uint8_t *  TxBuf,
uint8_t  RxLen,
uint8_t  TxLen 
)

◆ CHILI_RegisterSPIComplete()

__NONSECURE_ENTRY void CHILI_RegisterSPIComplete ( void(*)(void)  callback)

Register the SPIComplete callback on trustzone (Compiles to nothing on non-tz)

◆ CHILI_SPIDMAIRQHandler()

void CHILI_SPIDMAIRQHandler ( void  )

Interrupt Handler for SPI DMA.