From 989cdfbe8de38833c68b3f268b3e105a4c248287 Mon Sep 17 00:00:00 2001 From: fpazos <30479687+fpazos@users.noreply.github.com> Date: Wed, 27 Jun 2018 18:10:13 +0200 Subject: [PATCH] Starting leds --- .../handwired/stm32/boards/GENERIC_STM32_F103/board.h | 4 ++-- keyboards/handwired/stm32/keymaps/spanish/keymap.c | 2 +- keyboards/handwired/stm32/rules.mk | 2 ++ keyboards/handwired/stm32/stm70/led.c | 7 ++++++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/keyboards/handwired/stm32/boards/GENERIC_STM32_F103/board.h b/keyboards/handwired/stm32/boards/GENERIC_STM32_F103/board.h index 979de8973a0..848a7036707 100644 --- a/keyboards/handwired/stm32/boards/GENERIC_STM32_F103/board.h +++ b/keyboards/handwired/stm32/boards/GENERIC_STM32_F103/board.h @@ -49,8 +49,8 @@ #define GPIOD_OSC_OUT 1 /* Backlighting */ -/* -#define GPIOB_BACKLIGHT_PIN 1*/ + +#define GPIOC_BACKLIGHT_PIN 12 /* In case your board has a "USB enable" hardware controlled by a pin, define it here. (It could be just diff --git a/keyboards/handwired/stm32/keymaps/spanish/keymap.c b/keyboards/handwired/stm32/keymaps/spanish/keymap.c index 438b7f80114..a6151dfbe5c 100644 --- a/keyboards/handwired/stm32/keymaps/spanish/keymap.c +++ b/keyboards/handwired/stm32/keymaps/spanish/keymap.c @@ -61,4 +61,4 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } break; } -} \ No newline at end of file +} diff --git a/keyboards/handwired/stm32/rules.mk b/keyboards/handwired/stm32/rules.mk index d9091c3af8d..f0df507e64d 100644 --- a/keyboards/handwired/stm32/rules.mk +++ b/keyboards/handwired/stm32/rules.mk @@ -5,6 +5,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = yes # Custom matrix file +#Added backlight +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MOUSEKEY_ENABLE = no DEFAULT_FOLDER = handwired/stm32/stm70 \ No newline at end of file diff --git a/keyboards/handwired/stm32/stm70/led.c b/keyboards/handwired/stm32/stm70/led.c index 9b35f693cf5..b515a77b95a 100644 --- a/keyboards/handwired/stm32/stm70/led.c +++ b/keyboards/handwired/stm32/stm70/led.c @@ -55,4 +55,9 @@ void led_set(uint8_t usb_led) break; } return state; -}*/ \ No newline at end of file +}*/ + + +// inline void gh60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } + +// inline void gh60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } \ No newline at end of file