💾File: sys_adc.h
📦Library: lib2_sys
🔟Const: ADC_CH_0 ADC0
🔟Const: ADC_CH_1 ADC1
🔟Const: ADC_CH_2 ADC2
🔟Const: ADC_CH_V VSYS Voltage
🔟Const: ADC_CH_T Internal Temp. Sensor
🔟Const: ADC_VREF ADC Reference Voltage (3.3V)
void sys_adc_init(uint8_t ch)
▶️ Param: ch ADC channel
uint16_t sys_adc_raw(uint8_t ch)
▶️ Param: ch ADC channel- ✅Return: ADC raw value 0..4095 (0..VREF)
static inline double sys_adc_scale(uint8_t ch, double low, double high)
▶️ Param: ch ADC channel▶️ Param: low Low value for 0▶️ Param: high High value for 4095 (3.3V or VREF)- ✅Return: Value between low and high
static inline double sys_adc_volt(uint8_t ch)
▶️ Param: ch ADC channel- ✅Return: ADC voltage value 0..3.3V (VREF)
static inline double sys_adc_vsys()
- ✅Return: VSYS voltage value ~5V
static inline double sys_adc_temp_c()
- ✅Return: Temp. value in celsius
static inline double sys_adc_temp_f()
- ✅Return: Temp. value in fahrenheit