qmk_firmware/tmk_core/protocol
bwhelm fa71c4c91e Fix battery level code in adafruit_ble.cpp (#6648)
* Fix battery level code in adafruit_ble.cpp

The code in tsk_core/protocol/lufa/adafluit_ble.cpp that polls the
battery level for the Adafruit feather BLE controller reads the
regulated voltage, not the raw voltage coming from the battery. To do
that, the Adafruit Feather docs say you should read from pin A9:
https://learn.adafruit.com/adafruit-feather-32u4-basic-proto/power-management#measuring-battery-4-9.
(See also
https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/pinouts#logic-pins-2-9.)

I'm not sure why, but analogRead(9); doesn't read the correct pin.
Checking all available analog pins experimentally, it turns out that
analogRead(7); returns the correct value. So the code above should read:

    state.vbat = analogRead(7);

* Update tmk_core/protocol/lufa/adafruit_ble.cpp

Co-Authored-By: Drashna Jaelre <drashna@live.com>

* Remove old comment

* Fix linking error

* Remove `#ifdef` around `#include analog.h`.

* Really fix linking error
2019-09-04 04:29:23 +10:00
..
arm_atsam clang-format changes 2019-08-30 15:01:52 -07:00
bluefruit clang-format changes 2019-08-30 15:01:52 -07:00
chibios clang-format changes 2019-08-30 15:01:52 -07:00
iwrap clang-format changes 2019-08-30 15:01:52 -07:00
lufa Fix battery level code in adafruit_ble.cpp (#6648) 2019-09-04 04:29:23 +10:00
mbed clang-format changes 2019-08-30 15:01:52 -07:00
midi clang-format changes 2019-08-30 15:01:52 -07:00
pjrc clang-format changes 2019-08-30 15:01:52 -07:00
usb_hid Added OLED Display autoscroll during periods of OLED data inactivity (#6546) 2019-08-25 12:37:55 -07:00
vusb clang-format changes 2019-08-30 15:01:52 -07:00
adb.c clang-format changes 2019-08-30 15:01:52 -07:00
adb.h clang-format changes 2019-08-30 15:01:52 -07:00
arm_atsam.mk RGB Matrix support for Massdrop CTRL/ALT (#5328) 2019-04-03 18:30:47 -07:00
bluefruit.mk
chibios.mk Add a custom USB driver for ARM (#2750) 2018-04-15 20:42:53 -04:00
ibm4704.c clang-format changes 2019-08-30 15:01:52 -07:00
ibm4704.h clang-format changes 2019-08-30 15:01:52 -07:00
iwrap.mk
lufa.mk Fix battery level code in adafruit_ble.cpp (#6648) 2019-09-04 04:29:23 +10:00
m0110.c clang-format changes 2019-08-30 15:01:52 -07:00
m0110.h clang-format changes 2019-08-30 15:01:52 -07:00
midi.mk
news.c clang-format changes 2019-08-30 15:01:52 -07:00
news.h clang-format changes 2019-08-30 15:01:52 -07:00
next_kbd.c clang-format changes 2019-08-30 15:01:52 -07:00
next_kbd.h clang-format changes 2019-08-30 15:01:52 -07:00
pjrc.mk
ps2.h clang-format changes 2019-08-30 15:01:52 -07:00
ps2_busywait.c clang-format changes 2019-08-30 15:01:52 -07:00
ps2_interrupt.c clang-format changes 2019-08-30 15:01:52 -07:00
ps2_io.h clang-format changes 2019-08-30 15:01:52 -07:00
ps2_io_avr.c clang-format changes 2019-08-30 15:01:52 -07:00
ps2_io_mbed.c clang-format changes 2019-08-30 15:01:52 -07:00
ps2_mouse.c clang-format changes 2019-08-30 15:01:52 -07:00
ps2_mouse.h clang-format changes 2019-08-30 15:01:52 -07:00
ps2_usart.c clang-format changes 2019-08-30 15:01:52 -07:00
serial.h clang-format changes 2019-08-30 15:01:52 -07:00
serial_mouse.h clang-format changes 2019-08-30 15:01:52 -07:00
serial_mouse_microsoft.c clang-format changes 2019-08-30 15:01:52 -07:00
serial_mouse_mousesystems.c clang-format changes 2019-08-30 15:01:52 -07:00
serial_soft.c clang-format changes 2019-08-30 15:01:52 -07:00
serial_uart.c clang-format changes 2019-08-30 15:01:52 -07:00
usb_descriptor.c clang-format changes 2019-08-30 15:01:52 -07:00
usb_descriptor.h clang-format changes 2019-08-30 15:01:52 -07:00
usb_hid.mk
vusb.mk
xt.h clang-format changes 2019-08-30 15:01:52 -07:00
xt_interrupt.c clang-format changes 2019-08-30 15:01:52 -07:00