]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboard/sixkeyboard/sixkeyboard.c
adds backlight levels to the satan keyboard (#431)
[qmk_firmware.git] / keyboard / sixkeyboard / sixkeyboard.c
1 #include "sixkeyboard.h"
2
3 __attribute__ ((weak))
4 void matrix_init_user(void) {
5     // leave this function blank - it can be defined in a keymap file
6 };
7
8 __attribute__ ((weak))
9 void matrix_scan_user(void) {
10     // leave this function blank - it can be defined in a keymap file
11 };
12
13 __attribute__ ((weak))
14 void led_set_user(uint8_t usb_led) {
15     // leave this function blank - it can be defined in a keymap file
16 };
17
18 void matrix_init_kb(void) {
19     // put your keyboard start-up code here
20     // runs once when the firmware starts up
21
22     DDRC |= (1<<4);
23     PORTC &= ~(1<<4);
24
25
26     DDRC |= (1<<6);
27     PORTC &= ~(1<<6);
28
29     DDRB |= (1<<6);
30     PORTB &= ~(1<<6);
31
32     DDRB |= (1<<4);
33     PORTB &= ~(1<<4);
34
35     DDRD |= (1<<5);
36     PORTD &= ~(1<<5);
37
38     DDRD |= (1<<2);
39     PORTD &= ~(1<<2);
40
41     DDRD |= (1<<3);
42     PORTD &= ~(1<<3);
43
44     matrix_init_user();
45 };
46
47 void matrix_scan_kb(void) {
48     // put your looping keyboard code here
49     // runs every cycle (a lot)
50
51     matrix_scan_user();
52 };