summaryrefslogtreecommitdiff
path: root/keyboards/atom47/atom47.c
diff options
context:
space:
mode:
authorLEdiodes <mkerfoot@users.noreply.github.com>2018-01-28 14:58:42 -0600
committerJack Humbert <jack.humb@gmail.com>2018-01-28 15:58:42 -0500
commitb0805e38b9389ff79e4ba9b4e35ec08b18f7a728 (patch)
treeeea78e228def2e0ff43d097e7ff8f6910b9236cf /keyboards/atom47/atom47.c
parent2480e5d69a11fd0774d16e57384b69c1e92cbfc8 (diff)
added ATOM47 (Vortex Core QMK powered PCB) & DZ60 Custom config(LEdiodes) (#2310)
* added ATOM47 (Vortex Core QMK powered PCB) * fixed broken\unfinished comment block * moved Layer template to default template. * moved Layer template to default template and removed template from the keymap.c file. * Added LEdiodes config * created readme.md contains an image of 60% board(LEdiodes). * updated readme.md with images added images of the PCB and some feature details from https://geekhack.org/index.php?topic=93447.msg2545221#msg2545221 * removed excess words. * followed the readme template to a T. * formatting fix : added a return.
Diffstat (limited to 'keyboards/atom47/atom47.c')
-rw-r--r--keyboards/atom47/atom47.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/keyboards/atom47/atom47.c b/keyboards/atom47/atom47.c
new file mode 100644
index 0000000000..7b839e7967
--- /dev/null
+++ b/keyboards/atom47/atom47.c
@@ -0,0 +1,31 @@
+#include "atom47.h"
+#include "led.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
+ DDRB &= ~(1<<5);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
+ // Turn capslock on
+ PORTF |= (1<<5);
+ } else {
+ // Turn capslock off
+ PORTF &= ~(1<<5);
+ }
+ led_set_user(usb_led);
+}