Change analogRead calls to analogReadPin (#9023)

* Change analogRead calls to analogReadPin

* Add ChangeLog

* Update docs, remove mention of `analogRead()`

* Retarget changelog for next round
This commit is contained in:
Ryan
2020-07-02 13:12:34 +10:00
committed by Drashna Jael're
parent 0f599bb7ef
commit 8c38482ebd
+5 -4
View File
@@ -37,9 +37,10 @@
#define ConnectionUpdateInterval 1000 /* milliseconds */
#ifdef SAMPLE_BATTERY
#ifndef BATTERY_LEVEL_PIN
# define BATTERY_LEVEL_PIN 7
#endif
# ifndef BATTERY_LEVEL_PIN
# define BATTERY_LEVEL_PIN B5
# endif
#endif
static struct {
@@ -556,7 +557,7 @@ void adafruit_ble_task(void) {
if (timer_elapsed(state.last_battery_update) > BatteryUpdateInterval && resp_buf.empty()) {
state.last_battery_update = timer_read();
state.vbat = analogRead(BATTERY_LEVEL_PIN);
state.vbat = analogReadPin(BATTERY_LEVEL_PIN);
}
#endif
}