aboutsummaryrefslogtreecommitdiff
path: root/keyboards/clueboard/66/rev3/rev3.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/clueboard/66/rev3/rev3.c')
-rw-r--r--keyboards/clueboard/66/rev3/rev3.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/keyboards/clueboard/66/rev3/rev3.c b/keyboards/clueboard/66/rev3/rev3.c
new file mode 100644
index 000000000..7ec8dcb68
--- /dev/null
+++ b/keyboards/clueboard/66/rev3/rev3.c
@@ -0,0 +1,29 @@
1#include "rev3.h"
2#include "print.h"
3
4void backlight_init_ports(void) {
5 print("init_backlight_pin()\n");
6 // Set our LED pins as output
7 DDRD |= (1<<6); // Esc
8 DDRB |= (1<<7); // Page Up
9 DDRD |= (1<<4); // Arrows
10
11 // Set our LED pins low
12 PORTD &= ~(1<<6); // Esc
13 PORTB &= ~(1<<7); // Page Up
14 PORTD &= ~(1<<4); // Arrows
15}
16
17void backlight_set(uint8_t level) {
18 if ( level == 0 ) {
19 // Turn off light
20 PORTD |= (1<<6); // Esc
21 PORTB |= (1<<7); // Page Up
22 PORTD |= (1<<4); // Arrows
23 } else {
24 // Turn on light
25 PORTD &= ~(1<<6); // Esc
26 PORTB &= ~(1<<7); // Page Up
27 PORTD &= ~(1<<4); // Arrows
28 }
29}