1
0
Fork 0

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:
Joel Challis 2019-10-17 17:48:58 +01:00 committed by GitHub
parent e3a21348c3
commit abfd6ed961
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 230 additions and 212 deletions

View file

@ -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);