diff options
author | Dan Hertz <daniel@dhertz.com> | 2018-05-29 04:22:43 +0100 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2018-05-28 20:22:43 -0700 |
commit | 6009ca2d4a76cc3fa66fd9b1339ebe9b11775ffc (patch) | |
tree | 56ef4bdd129e29747f150be712fe8a194892d3b4 /keyboards/canoe/canoe.c | |
parent | dfa7a708fef77ac1570face29d7e8413f3e725ee (diff) |
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
Diffstat (limited to 'keyboards/canoe/canoe.c')
-rw-r--r-- | keyboards/canoe/canoe.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/keyboards/canoe/canoe.c b/keyboards/canoe/canoe.c index 6a67562348..bc69df2e5e 100644 --- a/keyboards/canoe/canoe.c +++ b/keyboards/canoe/canoe.c @@ -16,14 +16,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "canoe.h" +#ifdef BACKLIGHT_ENABLE +#include "backlight.h" +#endif +#ifdef RGBLIGHT_ENABLE +#include "i2c.h" #include "rgblight.h" +#endif -#include <avr/pgmspace.h> +#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 |