renamed diode voltage read

This commit is contained in:
Inamr 2024-03-20 15:53:26 +01:00
parent b862266362
commit 980e6b7c5a
2 changed files with 15 additions and 14 deletions

View File

@ -27,13 +27,14 @@ uint16_t ADC0_read(void) {
return ADC0.RES; return ADC0.RES;
} }
uint16_t diode_voltage_read(void){ uint16_t diode_voltage_read() {
/* Gets value for the diode */ /* Gets value for the diode */
uint8_t adcVal = ADC0_read(); uint8_t adcVal = ADC0_read();
return adcVal; return adcVal;
} }
uint16_t internal_voltage_read(void) {
uint16_t internal_voltage_read() {
/* Gets value for the internal voltage reffreance*/ /* Gets value for the internal voltage reffreance*/
VREF.ADC0REF = VREF_REFSEL_VDD_gc; VREF.ADC0REF = VREF_REFSEL_VDD_gc;

View File

@ -53,8 +53,8 @@ void ADC0_init(void);
//Start ADC conversion //Start ADC conversion
uint16_t ADC0_read(void); uint16_t ADC0_read(void);
// Gets the value from sensor and internal voltage // Gets the value from sensor and internal voltage
uint16_t internal_voltage_read(void); uint16_t internal_voltage_read();
uint16_t diode_voltage_read(void) uint16_t diode_voltage_read();
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */