aboutsummaryrefslogtreecommitdiff
path: root/keyboards/durgod/k320/k320.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/durgod/k320/k320.c')
-rw-r--r--keyboards/durgod/k320/k320.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/keyboards/durgod/k320/k320.c b/keyboards/durgod/k320/k320.c
new file mode 100644
index 000000000..f5500ea83
--- /dev/null
+++ b/keyboards/durgod/k320/k320.c
@@ -0,0 +1,42 @@
1/* Copyright 2021 kuenhlee and Don Kjer
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "k320.h"
18
19/* Private Functions */
20void off_all_leds(void) {
21 writePinHigh(LED_CAPS_LOCK_PIN);
22 writePinHigh(LED_SCROLL_LOCK_PIN);
23 writePinHigh(LED_WIN_LOCK_PIN);
24 writePinHigh(LED_MR_LOCK_PIN);
25}
26
27void on_all_leds(void) {
28 writePinLow(LED_CAPS_LOCK_PIN);
29 writePinLow(LED_SCROLL_LOCK_PIN);
30 writePinLow(LED_WIN_LOCK_PIN);
31 writePinLow(LED_MR_LOCK_PIN);
32}
33
34/* WinLock and MR LEDs are non-standard. Need to override led init */
35void led_init_ports(void) {
36 setPinOutput(LED_CAPS_LOCK_PIN);
37 setPinOutput(LED_SCROLL_LOCK_PIN);
38 setPinOutput(LED_WIN_LOCK_PIN);
39 setPinOutput(LED_MR_LOCK_PIN);
40 off_all_leds();
41}
42