further optimize ntc math
This commit is contained in:
parent
1abe7bfed6
commit
e5dd0e0012
@ -20,6 +20,7 @@
|
|||||||
// With R_T/R_0 and R_0 = R_T@25C
|
// With R_T/R_0 and R_0 = R_T@25C
|
||||||
// R_T/R_0 = 1 / V_REF / ADC - 1
|
// R_T/R_0 = 1 / V_REF / ADC - 1
|
||||||
|
|
||||||
|
[[gnu::optimize("fast-math")]]
|
||||||
static inline uint16_t ntc_adc_to_celsius(int16_t adc_codes) {
|
static inline uint16_t ntc_adc_to_celsius(int16_t adc_codes) {
|
||||||
// Calculate voltage from ADC
|
// Calculate voltage from ADC
|
||||||
int16_t adc_mV = mV_from_ADBMS6830(adc_codes);
|
int16_t adc_mV = mV_from_ADBMS6830(adc_codes);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user