Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
cascoda_sensorif_m2351.c File Reference
#include <stdio.h>
#include "M2351.h"
#include "i2c.h"
#include "spi.h"
#include "sys.h"
#include "uart.h"
#include "cascoda-bm/cascoda_evbme.h"
#include "cascoda-bm/cascoda_interface.h"
#include "cascoda-bm/cascoda_sensorif.h"
#include "cascoda-bm/cascoda_spi.h"
#include "cascoda-bm/cascoda_types.h"
#include "cascoda-util/cascoda_time.h"
#include "ca821x_api.h"
#include "cascoda_chili.h"
#include "cascoda_chili_config.h"
Include dependency graph for cascoda_sensorif_m2351.c:

Macros

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

Functions

u8_t SENSORIF_SPI_Chip_Select ()
 
void SENSORIF_I2C_Config (u32_t portnum)
 Set I2C Configuration. More...
 
void SENSORIF_SPI_Config (u32_t portnum)
 Set SPI Configuration. More...
 
void SENSORIF_UART_Config (u32_t portnum)
 Set UART Configuration. More...
 
enum sensorif_i2c_status SENSORIF_I2C_Write (u8_t slaveaddr, u8_t *pdata, u32_t *plen)
 Writes bytes to I2C slave. More...
 
enum sensorif_i2c_status SENSORIF_I2C_Read (u8_t slaveaddr, u8_t *pdata, u32_t *plen)
 Reads bytes from I2C slave. More...
 
ca_error SENSORIF_SPI_Write (u8_t out_data)
 Writes bytes to SPI slave. More...
 
void SENSORIF_SPI_FULL_DUPLEX_RXONLY (u8_t *RxBuf, u8_t RxLen)
 Read data in the RX while sending IDLE data to TX. More...
 
void SENSORIF_SPI_WRITE_THEN_READ (u8_t *RxBuf, u8_t *TxBuf, u8_t RxLen, u8_t TxLen)
 Exchange bytes between SPI slave and master. More...
 
u32_t SENSORIF_UART_Write (u8_t *out_data, u32_t writebytes)
 Writes bytes to UART slave. More...
 
u32_t SENSORIF_UART_Read (u8_t *in_data, u32_t readbytes)
 Read bytes to UART slave. More...
 

Macro Definition Documentation

◆ MAX

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

Function Documentation

◆ SENSORIF_SPI_Chip_Select()

u8_t SENSORIF_SPI_Chip_Select ( )