mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-19 09:42:11 +03:00
analogRead(..) resolution reverted to 10 bits, waiting for an API extension to be decided
This commit is contained in:
@ -91,7 +91,7 @@ uint32_t analogRead(uint32_t ulPin)
|
|||||||
;
|
;
|
||||||
|
|
||||||
// Read the value
|
// Read the value
|
||||||
ulValue = adc12b_get_latest_value(ADC12B);
|
ulValue = adc12b_get_latest_value(ADC12B) >> 2;
|
||||||
|
|
||||||
// Stop the ADC12B
|
// Stop the ADC12B
|
||||||
// adc12_stop( ADC12B ) ; // never do adc12_stop() else we have to reconfigure the ADC12B each time
|
// adc12_stop( ADC12B ) ; // never do adc12_stop() else we have to reconfigure the ADC12B each time
|
||||||
@ -135,7 +135,7 @@ uint32_t analogRead(uint32_t ulPin)
|
|||||||
;
|
;
|
||||||
|
|
||||||
// Read the value
|
// Read the value
|
||||||
ulValue = adc_get_latest_value(ADC);
|
ulValue = adc_get_latest_value(ADC) >> 2;
|
||||||
|
|
||||||
// Disable the corresponding channel
|
// Disable the corresponding channel
|
||||||
adc_disable_channel(ADC, ulChannel);
|
adc_disable_channel(ADC, ulChannel);
|
||||||
|
Reference in New Issue
Block a user