Master Thesis
V1.0
Research and Design of Sensor Node for NMSD Treatment
|
Read battery voltage. More...
Go to the source code of this file.
Functions | |
void | initADC (void) |
Initialisation of the ADC. More... | |
void | ADC0_IRQHandler (void) |
Interrupt handler for ADC. More... | |
void | ADC_Batt_Read (void) |
Do single ADC conversion (read) More... | |
void | ADC_Batt_print (void) |
Print battery in millivolts using dbprint. More... | |
void | ADC_get_batt (uint8_t *percent) |
Get battery in percentage. More... | |
void ADC0_IRQHandler | ( | void | ) |
Interrupt handler for ADC.
Conversion from ADC read (0-4096) to millivolts
Definition at line 73 of file adc.c.
References millivolts, and sample.
void ADC_Batt_print | ( | void | ) |
Print battery in millivolts using dbprint.
Definition at line 113 of file adc.c.
References dbprint(), dbprintInt(), and millivolts.
void ADC_Batt_Read | ( | void | ) |
Do single ADC conversion (read)
Definition at line 100 of file adc.c.
Referenced by ADC_get_batt().
void ADC_get_batt | ( | uint8_t * | percent | ) |
Get battery in percentage.
20 - 40 - 60 - 80 - 100 percent
[out] | percent | Percentage of the remaining battery capacity |
Definition at line 132 of file adc.c.
References ADC_Batt_Read(), and millivolts.
Referenced by CheckIMUidle().