mirror of
https://github.com/semerad/gt3b.git
synced 2026-03-25 11:26:59 +01:00
some ADC hack, after erasing EEPROM from STVP, only steering ADC was working
This commit is contained in:
3
input.c
3
input.c
@@ -375,6 +375,9 @@ static void check_inactivity(void) {
|
||||
adc_buffer ## id ## [1] = adc_buffer ## id ## [2] = \
|
||||
adc_buffer ## id ## [3] = adc_buffer ## id ## [0];
|
||||
void input_read_first_values(void) {
|
||||
// set end channel to 3 again, sometimes after erasing EEPROM from STVP,
|
||||
// calibrate is called, but only steering ADC is changing
|
||||
ADC_CSR = 0b00000011; // end channel 3, no interrupts
|
||||
// read initial ADC values
|
||||
BSET(ADC_CR1, 0); // start conversion
|
||||
while (!BCHK(ADC_CSR, 7)); // wait for end of conversion
|
||||
|
||||
Reference in New Issue
Block a user