From 6009ca2d4a76cc3fa66fd9b1339ebe9b11775ffc Mon Sep 17 00:00:00 2001 From: Dan Hertz Date: Tue, 29 May 2018 04:22:43 +0100 Subject: Update Canoe ps2avr board (#3066) * Add Percent Canoe keyboard * Fix row of nonus backslash * Update info.json to be correct for canoe * Change LAYOUT_ISO to LAYOUT_iso * Remove bootloader key in info.json --- keyboards/canoe/canoe.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'keyboards/canoe/canoe.c') diff --git a/keyboards/canoe/canoe.c b/keyboards/canoe/canoe.c index 6a6756234..bc69df2e5 100644 --- a/keyboards/canoe/canoe.c +++ b/keyboards/canoe/canoe.c @@ -16,14 +16,33 @@ along with this program. If not, see . */ #include "canoe.h" +#ifdef BACKLIGHT_ENABLE +#include "backlight.h" +#endif +#ifdef RGBLIGHT_ENABLE +#include "i2c.h" #include "rgblight.h" +#endif -#include +#ifdef BACKLIGHT_ENABLE +void backlight_set(uint8_t level) { + if (level == 0) { + // Turn out the lights + PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + } else { + // Turn on the lights + PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + } +} -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" +void backlight_init_ports(void) { + DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); +} + +#endif +#ifdef RGBLIGHT_ENABLE extern rgblight_config_t rgblight_config; void rgblight_set(void) { @@ -43,3 +62,4 @@ __attribute__ ((weak)) void matrix_scan_user(void) { rgblight_task(); } +#endif -- cgit v1.2.3-24-g4f1b