1 #include "clueboard2.h"
3 void matrix_init_kb(void) {
4 // put your keyboard start-up code here
5 // runs once when the firmware starts up
9 // JTAG disable for PORT F. write JTD bit twice within four cycles.
14 void led_init_ports() {
15 // * Set our LED pins as output
19 void led_set_kb(uint8_t usb_led) {
20 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
29 /* Clueboard 2.0 LED locations:
31 * Capslock: B4, pull high to turn on
32 * LCtrl: Shared with Capslock, DO NOT INSTALL LED'S IN BOTH
33 * Page Up: B7, pull high to turn on
34 * Escape: D6, pull high to turn on
35 * Arrows: D4, pull high to turn on
38 void backlight_init_ports(void) {
39 print("init_backlight_pin()\n");
40 // Set our LED pins as output
41 DDRD |= (1<<6); // Esc
42 DDRB |= (1<<7); // Page Up
43 DDRD |= (1<<4); // Arrows
45 // Set our LED pins low
46 PORTD &= ~(1<<6); // Esc
47 PORTB &= ~(1<<7); // Page Up
48 PORTD &= ~(1<<4); // Arrows
51 void backlight_set(uint8_t level) {
54 PORTD |= (1<<6); // Esc
55 PORTB |= (1<<7); // Page Up
56 PORTD |= (1<<4); // Arrows
59 PORTD &= ~(1<<6); // Esc
60 PORTB &= ~(1<<7); // Page Up
61 PORTD &= ~(1<<4); // Arrows