summaryrefslogtreecommitdiff
path: root/keyboards/maartenwut/wonderland/wonderland.c
diff options
context:
space:
mode:
authorYan-Fa Li <yanfali@gmail.com>2019-08-24 23:44:20 -0700
committernoroadsleft <18669334+noroadsleft@users.noreply.github.com>2019-08-24 23:44:20 -0700
commitf6da00b85d32f5bc451f5c89e26845434ae62bed (patch)
treec057e5e4cea14de4b7652feb93c499af89567702 /keyboards/maartenwut/wonderland/wonderland.c
parent43b03099702265ef514cb84236d9031e04047837 (diff)
[Keyboard] Maartenwut Wonderland PCB (#6492)
* Initial Commit * ID * Use current manu name * Fix define DEBOUNCE Co-Authored-By: fauxpark <fauxpark@gmail.com> * Fix NUM Lock LED detection Co-Authored-By: fauxpark <fauxpark@gmail.com> * Fix CAPs LED detection Co-Authored-By: fauxpark <fauxpark@gmail.com> * Fix Scroll Lock LED detection Co-Authored-By: fauxpark <fauxpark@gmail.com> * Use correct convention for setting pins * Move folder to maartenwut - enable velocikey * Fix columns size * Sync with homerowco * Add Keebs keymap * Best practices * Latest keymap changes from homerowco
Diffstat (limited to 'keyboards/maartenwut/wonderland/wonderland.c')
-rwxr-xr-xkeyboards/maartenwut/wonderland/wonderland.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/keyboards/maartenwut/wonderland/wonderland.c b/keyboards/maartenwut/wonderland/wonderland.c
new file mode 100755
index 0000000000..9f3233e0f1
--- /dev/null
+++ b/keyboards/maartenwut/wonderland/wonderland.c
@@ -0,0 +1,42 @@
+#include "wonderland.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+ matrix_init_user();
+ led_init_ports();
+};
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+ matrix_scan_user();
+};
+
+void led_init_ports(void) {
+ // * Set our LED pins as output
+ setPinOutput(B1);
+ setPinOutput(B2);
+ setPinOutput(B3);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
+ writePinLow(B1);
+ } else {
+ writePinHigh(B1);
+ }
+
+ if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
+ writePinLow(B2);
+ } else {
+ writePinHigh(B2);
+ }
+
+ if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
+ writePinLow(B3);
+ } else {
+ writePinHigh(B3);
+ }
+ led_set_user(usb_led);
+}