diff options
author | Ryan <fauxpark@gmail.com> | 2020-07-02 13:12:34 +1000 |
---|---|---|
committer | Drashna Jael're <drashna@live.com> | 2020-09-30 02:59:20 -0700 |
commit | 8c38482ebd1594988a3c3797b73cc534dca9a447 (patch) | |
tree | 364ca61a68c6dd7441592edf73cf703ee4db3bb2 /tmk_core/protocol/lufa | |
parent | 0f599bb7ef45ceed77590ac8a0d4c5f7a9b57d51 (diff) |
Change analogRead calls to analogReadPin (#9023)
* Change analogRead calls to analogReadPin
* Add ChangeLog
* Update docs, remove mention of `analogRead()`
* Retarget changelog for next round
Diffstat (limited to 'tmk_core/protocol/lufa')
-rw-r--r-- | tmk_core/protocol/lufa/adafruit_ble.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tmk_core/protocol/lufa/adafruit_ble.cpp b/tmk_core/protocol/lufa/adafruit_ble.cpp index a9cfc18558..07c3feb66e 100644 --- a/tmk_core/protocol/lufa/adafruit_ble.cpp +++ b/tmk_core/protocol/lufa/adafruit_ble.cpp @@ -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 } |