From 15635817b5ae6068c5c79a9b67a0d97839893a7e Mon Sep 17 00:00:00 2001 From: jpetermans Date: Wed, 12 Apr 2017 23:32:38 -0700 Subject: Updated lock led init --- keyboards/infinity60/led.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'keyboards/infinity60/led.c') diff --git a/keyboards/infinity60/led.c b/keyboards/infinity60/led.c index d2f554549..c78e2d119 100644 --- a/keyboards/infinity60/led.c +++ b/keyboards/infinity60/led.c @@ -16,6 +16,7 @@ along with this program. If not, see . */ #include "hal.h" +#include "print.h" #include "led.h" @@ -26,6 +27,7 @@ along with this program. If not, see . * In particular, I2C functions (interrupt-driven) should NOT be called from here. */ void led_set(uint8_t usb_led) { + msg_t msg; /* // PTA5: LED (1:on/0:off) GPIOA->PDDR |= (1<<1); @@ -36,18 +38,32 @@ void led_set(uint8_t usb_led) { GPIOA->PCOR |= (1<<5); } */ -//TODO: How does this test if led is set -//usb_led --> led_set(usb_led) <-- chibios/host_keyboard_leds <-- keyboard_leds from usbSetupTransfer -//keyboard_leds is enum'd in chibios/main.c + if (usb_led & (1<