aboutsummaryrefslogtreecommitdiff
path: root/keyboards/tada68
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/tada68')
-rwxr-xr-xkeyboards/tada68/config.h3
-rwxr-xr-xkeyboards/tada68/tada68.c30
2 files changed, 3 insertions, 30 deletions
diff --git a/keyboards/tada68/config.h b/keyboards/tada68/config.h
index 41618e9d2..8c36a78bf 100755
--- a/keyboards/tada68/config.h
+++ b/keyboards/tada68/config.h
@@ -51,6 +51,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
51/* Locking resynchronize hack */ 51/* Locking resynchronize hack */
52#define LOCKING_RESYNC_ENABLE 52#define LOCKING_RESYNC_ENABLE
53 53
54#define LED_CAPS_LOCK_PIN B2
55#define LED_PIN_ON_STATE 0
56
54/* Backlight configuration */ 57/* Backlight configuration */
55#define BACKLIGHT_PIN B6 58#define BACKLIGHT_PIN B6
56#define BACKLIGHT_BREATHING 59#define BACKLIGHT_BREATHING
diff --git a/keyboards/tada68/tada68.c b/keyboards/tada68/tada68.c
index e4fab9810..34534de74 100755
--- a/keyboards/tada68/tada68.c
+++ b/keyboards/tada68/tada68.c
@@ -1,31 +1 @@
1#include "tada68.h" #include "tada68.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<<2);
20}
21
22void led_set_kb(uint8_t usb_led) {
23 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
24 // Turn capslock on
25 PORTB &= ~(1<<2);
26 } else {
27 // Turn capslock off
28 PORTB |= (1<<2);
29 }
30 led_set_user(usb_led);
31}