From 15b9bce6bab13d85529fe9aaa91b3df9cd773e13 Mon Sep 17 00:00:00 2001 From: Wilba6582 Date: Tue, 17 Mar 2015 00:43:37 +1100 Subject: Initial commit for Planck PCB Rev 1. - Backlight on PB7 controlled by Timer1 Fast PWM (no interrupts). - Backlight commands connected temporarily to top left keys. - Backlight init called from matrix.c, since there's no generic keyboard_init() override function. --- keyboard/planck/matrix.c | 74 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 24 deletions(-) (limited to 'keyboard/planck/matrix.c') diff --git a/keyboard/planck/matrix.c b/keyboard/planck/matrix.c index 38d35e3e07..8cd9ac85b6 100644 --- a/keyboard/planck/matrix.c +++ b/keyboard/planck/matrix.c @@ -27,6 +27,7 @@ along with this program. If not, see . #include "debug.h" #include "util.h" #include "matrix.h" +#include "backlight.h" // TODO fix this dependency #ifndef DEBOUNCE @@ -57,6 +58,13 @@ uint8_t matrix_cols(void) void matrix_init(void) { + // To use PORTF disable JTAG with writing JTD bit twice within four cycles. + MCUCR |= (1<