Skip to content

Commit 8c38482

Browse files
fauxparkdrashna
authored andcommitted
Change analogRead calls to analogReadPin (qmk#9023)
* Change analogRead calls to analogReadPin * Add ChangeLog * Update docs, remove mention of `analogRead()` * Retarget changelog for next round
1 parent 0f599bb commit 8c38482

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tmk_core/protocol/lufa/adafruit_ble.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@
3737
#define ConnectionUpdateInterval 1000 /* milliseconds */
3838

3939
#ifdef SAMPLE_BATTERY
40-
#ifndef BATTERY_LEVEL_PIN
41-
# define BATTERY_LEVEL_PIN 7
42-
#endif
40+
41+
# ifndef BATTERY_LEVEL_PIN
42+
# define BATTERY_LEVEL_PIN B5
43+
# endif
4344
#endif
4445

4546
static struct {
@@ -556,7 +557,7 @@ void adafruit_ble_task(void) {
556557
if (timer_elapsed(state.last_battery_update) > BatteryUpdateInterval && resp_buf.empty()) {
557558
state.last_battery_update = timer_read();
558559

559-
state.vbat = analogRead(BATTERY_LEVEL_PIN);
560+
state.vbat = analogReadPin(BATTERY_LEVEL_PIN);
560561
}
561562
#endif
562563
}

0 commit comments

Comments
 (0)