I understand it to be an indication of the ADC.
But with my Teensy 4.1 I get the message that:
'ADC0_RA' was not declared in this scope; did you mean 'ADC1_R6'.
I want to use pin A8.
Where does the result for A8 come from in this function?
Could someone please explain this function to me?
But with my Teensy 4.1 I get the message that:
'ADC0_RA' was not declared in this scope; did you mean 'ADC1_R6'.
I want to use pin A8.
Where does the result for A8 come from in this function?
Could someone please explain this function to me?
Code:
/* the function uint16_t analogReadFastADC0(uint8_t pin)
* is from ADC.cpp and ADC_Module.cpp, here specialised for ADC0
* for more speed; this one takes 2,2 us with f_CPU = 96 MHz
*/
uint16_t analogReadFastADC0(uint8_t pin){
uint16_t result;
adc->adc0->startReadFast(pin); // start single read (with adc->adc0->singleMode(); in setup() )
while(adc->adc0->isConverting()) {} // wait for the ADC to finish
// __disable_irq();
result = (uint16_t)[B]ADC0_RA;[/B]
// __enable_irq();
return result;
}