From 46e7fb2d3ccd699c0a1b1fd9d02860b1f2a44141 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 26 Oct 2015 14:49:46 -0400 Subject: quantum separated --- keyboard/planck/matrix.c | 299 ----------------------------------------------- 1 file changed, 299 deletions(-) delete mode 100644 keyboard/planck/matrix.c (limited to 'keyboard/planck/matrix.c') diff --git a/keyboard/planck/matrix.c b/keyboard/planck/matrix.c deleted file mode 100644 index 12a1585436..0000000000 --- a/keyboard/planck/matrix.c +++ /dev/null @@ -1,299 +0,0 @@ -/* -Copyright 2012 Jun Wako -Generated by planckkeyboard.com (2014 Jack Humbert) - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 10 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#if DIODE_DIRECTION == ROW2COL -static matrix_row_t matrix_reversed[MATRIX_COLS]; -static matrix_row_t matrix_reversed_debouncing[MATRIX_COLS]; -#endif - -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - // To use PORTF disable JTAG with writing JTD bit twice within four cycles. - MCUCR |= (1<> y) << x; - } - matrix[y] = row; - } -#endif - - return 1; -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1