Kinetis SDK v.1.2 Demo Applications User's Guide  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
adc_low_power.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  lowPowerAdcBoundaries_t
 Boundaries struct. More...
 

Functions

void LowPowerTimerIRQHandler (void)
 Low Power Timer Interrupt handler. Clear LPT Compare flag. More...
 
void ADC1IRQHandler (void)
 ADC Interrupt handler. Get current ADC value and set conversionCompleted flag. More...
 
void InitLowPowerTmr (void)
 Initialize Low Power Timer. Use 1 kHz LPO with no preescaler and enable LPT interrupt. More...
 
int32_t GetCurrentTempValue (void)
 Calculate current temperature. More...
 
lowPowerAdcBoundaries_t TempSensorCalibration (uint32_t updateBoundariesCounter, int32_t *tempArray)
 Calculate current temperature. More...
 
void ADC_TEST_InstallCallback (uint32_t instance, uint32_t chnGroup, void(*callbackFunc)(void))
 User-defined function to install callback. More...
 
uint16_t ADC_TEST_GetConvValueRAWInt (uint32_t instance, uint32_t chnGroup)
 User-defined function to read conversion value in ADC ISR. More...
 

Data Structure Documentation

struct lowPowerAdcBoundaries_t
Data Fields
int32_t lowerBoundary
int32_t upperBoundary

Function Documentation

void ADC1IRQHandler ( void  )
uint16_t ADC_TEST_GetConvValueRAWInt ( uint32_t  instance,
uint32_t  chnGroup 
)
void ADC_TEST_InstallCallback ( uint32_t  instance,
uint32_t  chnGroup,
void(*)(void)  callbackFunc 
)
int32_t GetCurrentTempValue ( void  )
Returns
uint32_t Returns current temperature.

Calculate current temperature.

void InitLowPowerTmr ( void  )
void LowPowerTimerIRQHandler ( void  )
lowPowerAdcBoundaries_t TempSensorCalibration ( uint32_t  updateBoundariesCounter,
int32_t *  tempArray 
)
Parameters
updateBoundariesCounterIndicate number of values into tempArray.
tempArrayStore temperature value.
Returns
lowPowerAdcBoundaries_t Returns upper and lower temperature boundaries.

Calculate current temperature.