Move tmk_core/common/backlight to quantum/backlight (#6710)
* Move tmk_core/common/backlight to quantum/backlight * Add guards to backlight inclusion * Add guards to backlight inclusion * Update backlight guards on clueboard/60 * Use full paths to avoid vpath issues
This commit is contained in:
parent
e3a21348c3
commit
abfd6ed961
13 changed files with 230 additions and 212 deletions
|
@ -16,21 +16,21 @@
|
|||
*/
|
||||
|
||||
#include "hal.h"
|
||||
#include "backlight.h"
|
||||
#include "led.h"
|
||||
#include "printf.h"
|
||||
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#include "backlight.h"
|
||||
|
||||
void backlight_init_ports(void) {
|
||||
printf("backlight_init_ports()\n");
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
|
||||
palSetPadMode(GPIOB, 8, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPad(GPIOB, 8);
|
||||
#endif
|
||||
}
|
||||
|
||||
void backlight_set(uint8_t level) {
|
||||
printf("backlight_set(%d)\n", level);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
if (level == 0) {
|
||||
// Turn backlight off
|
||||
palSetPad(GPIOB, 8);
|
||||
|
@ -38,8 +38,8 @@ void backlight_set(uint8_t level) {
|
|||
// Turn backlight on
|
||||
palClearPad(GPIOB, 8);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
printf("led_set_kb(%d)\n", usb_led);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue