Ensure ADC conversion is complete before reading (#11370)
Co-Authored-By: gloomyandy <andy-git@gloomy-place.com>
This commit is contained in:
parent
b5ed4a1a8c
commit
56fbe3361b
3 changed files with 125 additions and 104 deletions
|
|
@ -327,7 +327,8 @@ inline void HAL_adc_init(void) {
|
|||
#define HAL_START_ADC(pin) ADCSRB = 0; SET_ADMUX_ADCSRA(pin)
|
||||
#endif
|
||||
|
||||
#define HAL_READ_ADC ADC
|
||||
#define HAL_READ_ADC() ADC
|
||||
#define HAL_ADC_READY() !TEST(ADCSRA, ADSC)
|
||||
|
||||
#define GET_PIN_MAP_PIN(index) index
|
||||
#define GET_PIN_MAP_INDEX(pin) pin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue