Fixed header, comments and Muxpos
This commit is contained in:
parent
7f3c1fa7c1
commit
ca28e23b70
@ -35,14 +35,14 @@ uint16_t ADC0_read(void) {
|
||||
|
||||
uint16_t thermistor_voltage_read() {
|
||||
/* Gets value for the diode */
|
||||
ADC0.MUXPOS = 0x03;
|
||||
ADC0.MUXPOS = 0x03; // Read PD3
|
||||
uint16_t adc_val = ADC0_read();
|
||||
|
||||
return adc_val;
|
||||
}
|
||||
|
||||
// Gets the value over thermistor
|
||||
uint16_t external_voltage_read(){
|
||||
ADC0.MUXPOS = 0x02;
|
||||
ADC0.MUXPOS = 0x06; // Read PD6
|
||||
uint16_t adc_val = ADC0_read();
|
||||
|
||||
return adc_val;
|
||||
|
||||
@ -54,7 +54,13 @@ extern "C" {
|
||||
uint16_t ADC0_read(void);
|
||||
// Gets the value from sensor and internal voltage
|
||||
uint16_t internal_voltage_read();
|
||||
// Gets the value over thermistor
|
||||
uint16_t thermistor_voltage_read();
|
||||
// Gets internal voltage
|
||||
uint16_t external_voltage_read();
|
||||
// Converts value to voltage
|
||||
uint16_t convert_to_voltage(uint16_t adc_val);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user