Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
tempsense_app.c File Reference

Chili temperature sensing app functions for device and coordinator. More...

#include <inttypes.h>
#include <stdio.h>
#include <string.h>
#include "cascoda-bm/cascoda_evbme.h"
#include "cascoda-bm/cascoda_interface.h"
#include "cascoda-bm/cascoda_serial.h"
#include "cascoda-bm/cascoda_spi.h"
#include "cascoda-bm/cascoda_types.h"
#include "cascoda-util/cascoda_time.h"
#include "ca821x_api.h"
#include "tempsense_app.h"
#include "tempsense_evbme.h"
Include dependency graph for tempsense_app.c:

Functions

void TEMPSENSE_APP_Handler (struct ca821x_dev *pDeviceRef)
 TEMPSENSE Application Handler. More...
 
void TEMPSENSE_APP_Initialise (struct ca821x_dev *pDeviceRef)
 TEMPSENSE Application Initialisation of MAC etc. More...
 
int TEMPSENSE_APP_UpStreamDispatch (struct SerialBuffer *SerialRxBuffer, struct ca821x_dev *pDeviceRef)
 TEMPSENSE Dispatch Branch (UpStream, Serial) More...
 
void TEMPSENSE_APP_SwitchMode (u8_t mode)
 TEMPSENSE Switch Mode. More...
 
void TEMPSENSE_APP_InitPIB (struct ca821x_dev *pDeviceRef)
 TEMPSENSE Application Initialisation of MAC PIB. More...
 
u8_t TEMPSENSE_APP_GetTempVal (void)
 TEMPSENSE App. More...
 
u16_t TEMPSENSE_APP_GetVoltsVal (void)
 TEMPSENSE App. More...
 
u32_t TEMPSENSE_APP_GetScanChannels (void)
 TEMPSENSE App. More...
 
void TEMPSENSE_APP_PrintScanChannels (void)
 TEMPSENSE App. More...
 
void TEMPSENSE_APP_PrintSeconds (void)
 Prints AboluteTime in Seconds. More...
 
void TEMPSENSE_APP_LED_Handler (void)
 module LEDs signalling More...
 

Variables

u8_t APP_STATE = APP_ST_NORMAL
 module state More...
 
u8_t APP_STATE_new = APP_ST_NORMAL
 module state set in interrupts More...
 
u8_t APP_INITIALISE = 0
 flag for re-initialising application More...
 
u8_t APP_CONNECTED = 0
 sensor module is connected to coordinator More...
 
u16_t APP_PANId
 
u16_t APP_ShortAddress
 
u8_t APP_LongAddress [8]
 
u8_t APP_Channel = 18
 

Detailed Description

Chili temperature sensing app functions for device and coordinator.

Function Documentation

◆ TEMPSENSE_APP_GetScanChannels()

u32_t TEMPSENSE_APP_GetScanChannels ( void  )

TEMPSENSE App.

Get ScanChannels from MAC_CHANNELLIST

Returns
ScanChannels Parameter for Scan Requests

◆ TEMPSENSE_APP_GetTempVal()

u8_t TEMPSENSE_APP_GetTempVal ( void  )

TEMPSENSE App.

Get Temperature Reading

Returns
Temperature, 8 bit signed (1s complement)

◆ TEMPSENSE_APP_GetVoltsVal()

u16_t TEMPSENSE_APP_GetVoltsVal ( void  )

TEMPSENSE App.

Get Battery Voltage Reading

Returns
8-Bit VBat, full range = 5.5V

◆ TEMPSENSE_APP_Handler()

void TEMPSENSE_APP_Handler ( struct ca821x_dev pDeviceRef)

TEMPSENSE Application Handler.

◆ TEMPSENSE_APP_Initialise()

void TEMPSENSE_APP_Initialise ( struct ca821x_dev pDeviceRef)

TEMPSENSE Application Initialisation of MAC etc.

◆ TEMPSENSE_APP_InitPIB()

void TEMPSENSE_APP_InitPIB ( struct ca821x_dev pDeviceRef)

TEMPSENSE Application Initialisation of MAC PIB.

◆ TEMPSENSE_APP_LED_Handler()

void TEMPSENSE_APP_LED_Handler ( void  )

module LEDs signalling

◆ TEMPSENSE_APP_PrintScanChannels()

void TEMPSENSE_APP_PrintScanChannels ( void  )

TEMPSENSE App.

Print MAC_CHANNELLIST

◆ TEMPSENSE_APP_PrintSeconds()

void TEMPSENSE_APP_PrintSeconds ( void  )

Prints AboluteTime in Seconds.

◆ TEMPSENSE_APP_SwitchMode()

void TEMPSENSE_APP_SwitchMode ( u8_t  mode)

TEMPSENSE Switch Mode.

◆ TEMPSENSE_APP_UpStreamDispatch()

int TEMPSENSE_APP_UpStreamDispatch ( struct SerialBuffer SerialRxBuffer,
struct ca821x_dev pDeviceRef 
)

TEMPSENSE Dispatch Branch (UpStream, Serial)

Variable Documentation

◆ APP_Channel

u8_t APP_Channel = 18

◆ APP_CONNECTED

u8_t APP_CONNECTED = 0

sensor module is connected to coordinator

◆ APP_INITIALISE

u8_t APP_INITIALISE = 0

flag for re-initialising application

◆ APP_LongAddress

u8_t APP_LongAddress[8]

◆ APP_PANId

u16_t APP_PANId

◆ APP_ShortAddress

u16_t APP_ShortAddress

◆ APP_STATE

u8_t APP_STATE = APP_ST_NORMAL

module state

◆ APP_STATE_new

u8_t APP_STATE_new = APP_ST_NORMAL

module state set in interrupts