aboutsummaryrefslogtreecommitdiff
path: root/keyboards/handwired/ortho60/led.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/handwired/ortho60/led.c')
-rw-r--r--keyboards/handwired/ortho60/led.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/keyboards/handwired/ortho60/led.c b/keyboards/handwired/ortho60/led.c
deleted file mode 100644
index f15baed16..000000000
--- a/keyboards/handwired/ortho60/led.c
+++ /dev/null
@@ -1,51 +0,0 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include "hal.h"
19#include "backlight.h"
20#include "led.h"
21#include "printf.h"
22
23void backlight_init_ports(void) {
24 printf("backlight_init_ports()\n");
25 #ifdef BACKLIGHT_ENABLE
26 palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL);
27 palSetPad(GPIOA, 8);
28 #endif
29}
30
31void backlight_set(uint8_t level) {
32 printf("backlight_set(%d)\n", level);
33 #ifdef BACKLIGHT_ENABLE
34 if (level == 0) {
35 // Turn backlight off
36 palSetPad(GPIOA, 8);
37 } else {
38 // Turn backlight on
39 palClearPad(GPIOA, 8);
40 }
41 #endif
42}
43
44void led_set(uint8_t usb_led)
45{
46 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
47 palClearPad(GPIOC, 13);
48 } else {
49 palSetPad(GPIOC, 13);
50 }
51}