diff options
author | Keith Packard <keithp@keithp.com> | 2012-04-07 20:31:58 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-04-07 20:31:58 -0700 |
commit | 0bce68e6a0abc19f49c573331164d13643c9bee5 (patch) | |
tree | 2cbe7d0de8f9519c839a356eaae51a4b7ac4bdd2 /src/stm/stm32l.h | |
parent | a41628c97e90770890cce1d6f580e92c1cad1a7f (diff) |
altos: Add STM temperature sensor calibration data
Each stm32l has two-point factory temperature calibration data.
Provide access to that for displaying temperature data.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/stm32l.h')
-rw-r--r-- | src/stm/stm32l.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/stm/stm32l.h b/src/stm/stm32l.h index b9f45513..338bc471 100644 --- a/src/stm/stm32l.h +++ b/src/stm/stm32l.h @@ -1152,4 +1152,16 @@ extern struct stm_adc stm_adc; #define STM_ADC_CCR_ADCPRE_HSI_4 2 #define STM_ADC_CCR_ADCPRE_MASK 3 +struct stm_temp_cal { + uint16_t vref; + uint16_t ts_cal_cold; + uint16_t reserved; + uint16_t ts_cal_hot; +}; + +extern struct stm_temp_cal stm_temp_cal; + +#define stm_temp_cal_cold 25 +#define stm_temp_cal_hot 110 + #endif /* _STM32L_H_ */ |