Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
cascoda_chili.h File Reference
Include dependency graph for cascoda_chili.h:

Go to the source code of this file.

Classes

struct  device_link
 

Macros

#define MAX_CLOCK_SWITCH_DELAY   100000
 
#define FCLK_SPI   2000000
 
#define USE_WATCHDOG_POWEROFF   0
 
#define NUM_DEVICES   (1)
 

Functions

u32_t CHILI_ADCConversion (u32_t channel, u32_t reference)
 Perform ADC Conversion. More...
 
void CHILI_GPIOInit (void)
 Initialise Essential GPIOs for various Functions. More...
 
void CHILI_GPIOEnableInterrupts (void)
 Enable GPIO Interrupts. More...
 
ca_error CHILI_ClockInit (void)
 Select System Clocks depending on Power Source. More...
 
void CHILI_CompleteClockInit (void)
 Completes Clock (Re-)Initialisation. More...
 
void CHILI_EnableIntOscCal (void)
 Enable Internal Oscillator Calibration. More...
 
void CHILI_DisableIntOscCal (void)
 Disable Internal Oscillator Calibration. More...
 
void CHILI_GPIOPowerDown (u8_t useGPIOforWakeup)
 Re-program GPIOs for PowerDown. More...
 
void CHILI_GPIOPowerUp (void)
 Re-program GPIOs for active Mode after PowerDown. More...
 
void CHILI_TimersInit (void)
 (Re-)Initialise System Timers More...
 
void CHILI_SystemReInit (void)
 System Re-Initialisation. More...
 
void CHILI_FlashInit (void)
 
void CHILI_1msTick (void)
 1 ms Tick for TMR0_IRQHandler ISR More...
 
void CHILI_FastForward (u32_t ticks)
 FastForward time by the given amount. More...
 

Variables

volatile u8_t WDTimeout
 
volatile u8_t USBPresent
 
volatile u8_t UseExternalClock
 
struct device_link device_list [NUM_DEVICES]
 

Macro Definition Documentation

◆ FCLK_SPI

#define FCLK_SPI   2000000

◆ MAX_CLOCK_SWITCH_DELAY

#define MAX_CLOCK_SWITCH_DELAY   100000

◆ NUM_DEVICES

#define NUM_DEVICES   (1)

◆ USE_WATCHDOG_POWEROFF

#define USE_WATCHDOG_POWEROFF   0

Function Documentation

◆ CHILI_1msTick()

void CHILI_1msTick ( void  )

1 ms Tick for TMR0_IRQHandler ISR

◆ CHILI_ADCConversion()

u32_t CHILI_ADCConversion ( u32_t  channel,
u32_t  reference 
)

Perform ADC Conversion.

◆ CHILI_ClockInit()

ca_error CHILI_ClockInit ( void  )

Select System Clocks depending on Power Source.

◆ CHILI_CompleteClockInit()

void CHILI_CompleteClockInit ( void  )

Completes Clock (Re-)Initialisation.

◆ CHILI_DisableIntOscCal()

void CHILI_DisableIntOscCal ( void  )

Disable Internal Oscillator Calibration.

◆ CHILI_EnableIntOscCal()

void CHILI_EnableIntOscCal ( void  )

Enable Internal Oscillator Calibration.

◆ CHILI_FastForward()

void CHILI_FastForward ( u32_t  ticks)

FastForward time by the given amount.

Parameters
ticks- Time in Ticks (1ms/100ms)

◆ CHILI_FlashInit()

void CHILI_FlashInit ( void  )

◆ CHILI_GPIOEnableInterrupts()

void CHILI_GPIOEnableInterrupts ( void  )

Enable GPIO Interrupts.

◆ CHILI_GPIOInit()

void CHILI_GPIOInit ( void  )

Initialise Essential GPIOs for various Functions.

◆ CHILI_GPIOPowerDown()

void CHILI_GPIOPowerDown ( u8_t  useGPIOforWakeup)

Re-program GPIOs for PowerDown.

Parameters
useGPIOforWakeup- bool: GPIOs for wakeup

◆ CHILI_GPIOPowerUp()

void CHILI_GPIOPowerUp ( void  )

Re-program GPIOs for active Mode after PowerDown.

◆ CHILI_SystemReInit()

void CHILI_SystemReInit ( void  )

System Re-Initialisation.

◆ CHILI_TimersInit()

void CHILI_TimersInit ( void  )

(Re-)Initialise System Timers

Variable Documentation

◆ device_list

struct device_link device_list[NUM_DEVICES]
extern

◆ USBPresent

volatile u8_t USBPresent
extern

◆ UseExternalClock

volatile u8_t UseExternalClock
extern

◆ WDTimeout

volatile u8_t WDTimeout
extern