aboutsummaryrefslogtreecommitdiff
path: root/keyboards/evyd13/atom47/rev2/rev2.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/evyd13/atom47/rev2/rev2.c')
-rw-r--r--keyboards/evyd13/atom47/rev2/rev2.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/keyboards/evyd13/atom47/rev2/rev2.c b/keyboards/evyd13/atom47/rev2/rev2.c
new file mode 100644
index 000000000..06fce06da
--- /dev/null
+++ b/keyboards/evyd13/atom47/rev2/rev2.c
@@ -0,0 +1,34 @@
1#include "rev2.h"
2#include "led.h"
3
4void matrix_init_kb(void) {
5 // put your keyboard start-up code here
6 // runs once when the firmware starts up
7 matrix_init_user();
8 led_init_ports();
9};
10
11void matrix_scan_kb(void) {
12 // put your looping keyboard code here
13 // runs every cycle (a lot)
14 matrix_scan_user();
15};
16
17void led_init_ports(void) {
18 // * Set our LED pins as output
19 DDRB &= ~(1<<5);
20
21 //Set output high, so the capslock led is off
22 PORTB |= (1 << 5);
23}
24
25void led_set_kb(uint8_t usb_led) {
26 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
27 // Turn capslock on
28 PORTF |= (1<<5);
29 } else {
30 // Turn capslock off
31 PORTF &= ~(1<<5);
32 }
33 led_set_user(usb_led);
34}