]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/satan/backlight.c
Renames keyboard folder to keyboards, adds couple of tmk's fixes (#432)
[qmk_firmware.git] / keyboards / satan / backlight.c
1
2 #include <avr/io.h>
3 #include "backlight.h"
4 #include "print.h"
5
6 void init_backlight_pin(void) {
7     print("init_backlight_pin()\n");
8     // Set our LED pins as output
9     DDRB |= (1<<6);
10
11     // Set our LED pins low
12     PORTB &= ~(1<<6);
13 }
14
15 void backlight_set(uint8_t level) {
16     if ( level == 0 ) {
17         // Turn off light
18         PORTB |= (1<<6);
19     } else {
20         // Turn on light
21         PORTB &= ~(1<<6);
22     }
23 }
24