X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=keyboards%2Fpearl%2Fpearl.c;h=3bbadb0a7fc92ecdc048592539153870d2206d54;hb=fdd0f915271f79b104aa5d216566bcc3fd134e85;hp=f9ced53bea8843f498ed97352bb885e330f654ce;hpb=f2c32b3ea452827fe1378d870f519bfa6b7875e3;p=qmk_firmware.git 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 . #include "pearl.h" #include "rgblight.h" +#include "backlight.h" #include @@ -39,6 +40,19 @@ void rgblight_set(void) { i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); } +void backlight_init_ports(void) { + DDRD |= (1<<4); + PORTD &= ~(1<<4); +} + +void backlight_set(uint8_t level) { + if (level > 0) { + PORTD |= (1<<4); + } else { + PORTD &= ~(1<<4); + } +} + __attribute__ ((weak)) void matrix_scan_user(void) { rgblight_task();