summaryrefslogtreecommitdiff
path: root/keyboard/satan/backlight.c
diff options
context:
space:
mode:
authorChristopher Browne <cbbrowne@ca.afilias.info>2016-06-15 11:13:29 -0400
committerChristopher Browne <cbbrowne@ca.afilias.info>2016-06-15 11:13:29 -0400
commite32b0960af07b4aea501cdc72ff31f6727506b19 (patch)
tree126dbcbae3c6fc6cbe272c135b23da6d15877c3b /keyboard/satan/backlight.c
parentc5a034f98462b46ca9d694022c9f3f6a550d25ee (diff)
parent1d1ced53c7cec5da2ce21bdd405d1e20bd474321 (diff)
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
Diffstat (limited to 'keyboard/satan/backlight.c')
-rw-r--r--keyboard/satan/backlight.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/keyboard/satan/backlight.c b/keyboard/satan/backlight.c
new file mode 100644
index 0000000000..4240b09164
--- /dev/null
+++ b/keyboard/satan/backlight.c
@@ -0,0 +1,24 @@
+
+#include <avr/io.h>
+#include "backlight.h"
+#include "print.h"
+
+void init_backlight_pin(void) {
+ print("init_backlight_pin()\n");
+ // Set our LED pins as output
+ DDRB |= (1<<6);
+
+ // Set our LED pins low
+ PORTB &= ~(1<<6);
+}
+
+void backlight_set(uint8_t level) {
+ if ( level == 0 ) {
+ // Turn off light
+ PORTB |= (1<<6);
+ } else {
+ // Turn on light
+ PORTB &= ~(1<<6);
+ }
+}
+