summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tmk_core/protocol/lufa/adafruit_ble.cpp9
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
}