diff options
Diffstat (limited to 'keyboards/pearl/pearl.c')
-rw-r--r-- | keyboards/pearl/pearl.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/keyboards/pearl/pearl.c b/keyboards/pearl/pearl.c index f9ced53be..3bbadb0a7 100644 --- a/keyboards/pearl/pearl.c +++ b/keyboards/pearl/pearl.c | |||
@@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
17 | 17 | ||
18 | #include "pearl.h" | 18 | #include "pearl.h" |
19 | #include "rgblight.h" | 19 | #include "rgblight.h" |
20 | #include "backlight.h" | ||
20 | 21 | ||
21 | #include <avr/pgmspace.h> | 22 | #include <avr/pgmspace.h> |
22 | 23 | ||
@@ -39,6 +40,19 @@ void rgblight_set(void) { | |||
39 | i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); | 40 | i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); |
40 | } | 41 | } |
41 | 42 | ||
43 | void backlight_init_ports(void) { | ||
44 | DDRD |= (1<<4); | ||
45 | PORTD &= ~(1<<4); | ||
46 | } | ||
47 | |||
48 | void backlight_set(uint8_t level) { | ||
49 | if (level > 0) { | ||
50 | PORTD |= (1<<4); | ||
51 | } else { | ||
52 | PORTD &= ~(1<<4); | ||
53 | } | ||
54 | } | ||
55 | |||
42 | __attribute__ ((weak)) | 56 | __attribute__ ((weak)) |
43 | void matrix_scan_user(void) { | 57 | void matrix_scan_user(void) { |
44 | rgblight_task(); | 58 | rgblight_task(); |