Remove `quantum.h` includes from keyboard custom `matrix.c`s (#23371)

master
Ryan 2024-03-31 01:07:19 +11:00 committed by GitHub
parent 76bd5142cf
commit 2dd406f08f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
97 changed files with 104 additions and 244 deletions

View File

@ -14,10 +14,8 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "matrix.h"
#include "wait.h"
#include "quantum.h"
#include "i2c_master.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;

View File

@ -17,7 +17,6 @@
*/
#include "matrix.h"
#include "quantum.h"
matrix_row_t read_rows(void) {
return

View File

@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "uart.h"

View File

@ -14,10 +14,7 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "quantum.h"
#include "timer.h"
#include "wait.h"
#include "print.h"

View File

@ -1,6 +1,7 @@
// Copyright 2023 David Hoelscher (@customMK)
// SPDX-License-Identifier: GPL-2.0-or-later
#include "quantum.h"
#include "matrix.h"
#include <string.h>
// Pin definitions
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;

View File

@ -15,8 +15,6 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#if defined(__AVR__)
#include <avr/io.h>
#include <avr/wdt.h>
@ -31,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "timer.h"
#include "i2c_slave.h"
#include "lufa.h"
#include "quantum.h"
#define SLAVE_I2C_ADDRESS 0x32

View File

@ -13,7 +13,10 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "print.h"
#include "bitwise.h"
#include "wait.h"
#ifndef DEBOUNCE
# define DEBOUNCE 5

View File

@ -14,7 +14,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "debug.h"
#include "bitwise.h"
#include "wait.h"
#ifndef DEBOUNCE
# define DEBOUNCE 5

View File

@ -15,10 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "matrix.h"
#include "quantum.h"
#include "sn74x138.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;

View File

@ -15,10 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "matrix.h"
#include "quantum.h"
#include "sn74x138.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;

View File

@ -14,8 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "matrix.h"
#include "pca9555.h"
#include "quantum.h"
#include "timer.h"
// PCA9555 i2c address, 0x20: A0 = 0, A1 = 0, A2 = 0
#define IC1 0x20

View File

@ -15,7 +15,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "matrix.h"
#include "quantum.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;

View File

@ -15,7 +15,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "matrix.h"
#include "quantum.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;

View File

@ -15,7 +15,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "matrix.h"
#include "quantum.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;

View File

@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "uart.h"

View File

@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "uart.h"

View File

@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "uart.h"

View File

@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "uart.h"

View File

@ -4,15 +4,12 @@
/*
* scan matrix
*/
#include <stdint.h>
#include <stdbool.h>
#include "matrix.h"
#include <string.h>
#include "atomic_util.h"
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
/* matrix state(1:on, 0:off) */
extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values

View File

@ -14,15 +14,12 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#include "atomic_util.h"
#include "split_util.h"
#include "config.h"
#include "transport.h"
#include "debounce.h"
#include "wait.h"
#define ERROR_DISCONNECT_COUNT 5

View File

@ -15,14 +15,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <avr/io.h>
#include "spi_master.h"
#include "quantum.h"
#include "matrix.h"
static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;

View File

@ -13,8 +13,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "i2c_master.h"
#include "wait.h"
#include <string.h>
#include "wire-protocol-constants.h"

View File

@ -14,12 +14,9 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#ifndef readPort
# include "gpio_extr.h"
#endif

View File

@ -15,9 +15,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// clang-format off
#include <stdint.h>
#include <stdbool.h>
#include <gpio.h>
#ifndef readPort
# include "gpio_extr.h"
#endif
@ -25,7 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "matrix.h"
#include "matrix_extr.h"
#include "debounce.h"
#include "quantum.h"
#define ALWAYS_INLINE inline __attribute__((always_inline))
#define NO_INLINE __attribute__((noinline))

View File

@ -2,12 +2,11 @@
// Copyright 2023 @jasonhazel (Jason Hazel)
// SPDX-License-Identifier: GPL-3.0-or-later
#include "quantum.h"
#include "spi_master.h"
#include <string.h> /* memset */
#include <unistd.h> /* close */
#include "quantum.h"
#include "matrix.h"
#include <string.h>
#include "spi_master.h"
#include "debug.h"
#include "wait.h"
#if (!defined(SHIFTREG_MATRIX_COL_CS))
# error Missing shift register I/O pin definitions

View File

@ -16,7 +16,12 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "debug.h"
#include "timer.h"
#include "wait.h"
#include "suspend.h"
#include <avr/interrupt.h>
#ifdef BLUETOOTH_ENABLE
# include "adafruit_ble.h"

View File

@ -14,12 +14,9 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
static const pin_t row_pins[] = MATRIX_ROW_PINS;
static const pin_t col_pins[] = MATRIX_COL_PINS;

View File

@ -14,12 +14,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#include "spi_master.h"
#include "print.h"
#include "mschwingen.h"

View File

@ -14,10 +14,7 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "matrix.h"
#include "quantum.h"
#define ROW_SHIFTER ((uint16_t)1)

View File

@ -14,10 +14,7 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "matrix.h"
#include "quantum.h"
#define ROW_SHIFTER ((uint16_t)1)

View File

@ -14,12 +14,9 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "wait.h"
#include "util.h"
#include "matrix.h"
#include "quantum.h"
// Encoder things
#define SWITCH_1 F7

View File

@ -15,7 +15,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "board.h"

View File

@ -14,15 +14,12 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")

View File

@ -14,15 +14,12 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")

View File

@ -14,10 +14,7 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "matrix.h"
#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define ROW_SHIFTER ((uint8_t)1)

View File

@ -14,15 +14,12 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")

View File

@ -14,15 +14,12 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")

View File

@ -17,7 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "wait.h"
#include "matrix.h"
#include "quantum.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;

View File

@ -13,7 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "i2c_master.h"
#include <string.h>
#include "model01.h"

View File

@ -14,7 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "atomic_util.h"
#include <string.h>
#ifndef SHIFT_COL_START
# define SHIFT_COL_START 8

View File

@ -15,7 +15,8 @@
*/
#include "matrix.h"
#include "quantum.h"
#include "atomic_util.h"
#include <string.h>
// Pin connected to DS of 74HC595
#define DATA_PIN A7

View File

@ -15,7 +15,8 @@
*/
#include "matrix.h"
#include "quantum.h"
#include "atomic_util.h"
#include <string.h>
// Pin connected to DS of 74HC595
#define DATA_PIN C15

View File

@ -14,7 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "atomic_util.h"
#include <string.h>
// Pin connected to DS of 74HC595
#define DATA_PIN A7

View File

@ -15,7 +15,8 @@
*/
#include "matrix.h"
#include "quantum.h"
#include "atomic_util.h"
#include <string.h>
// Pin connected to DS of 74HC595
#define DATA_PIN A7

View File

@ -15,7 +15,8 @@
*/
#include "matrix.h"
#include "quantum.h"
#include "atomic_util.h"
#include <string.h>
// Pin connected to DS of 74HC595
#define DATA_PIN C15

View File

@ -15,7 +15,8 @@
*/
#include "matrix.h"
#include "quantum.h"
#include "atomic_util.h"
#include <string.h>
// Pin connected to DS of 74HC595
#define DATA_PIN C15

View File

@ -15,7 +15,8 @@
*/
#include "matrix.h"
#include "quantum.h"
#include "atomic_util.h"
#include <string.h>
// Pin connected to DS of 74HC595
#define DATA_PIN C15

View File

@ -15,7 +15,8 @@
*/
#include "matrix.h"
#include "quantum.h"
#include "atomic_util.h"
#include <string.h>
// Pin connected to DS of 74HC595
#define DATA_PIN A7

View File

@ -15,7 +15,8 @@
*/
#include "matrix.h"
#include "quantum.h"
#include "atomic_util.h"
#include <string.h>
#ifndef PIN_USED_74HC595
# define PIN_USED_74HC595 8

View File

@ -15,7 +15,8 @@
*/
#include "matrix.h"
#include "quantum.h"
#include "atomic_util.h"
#include <string.h>
// Pin connected to DS of 74HC595
#define DATA_PIN A7

View File

@ -15,7 +15,8 @@
*/
#include "matrix.h"
#include "quantum.h"
#include "atomic_util.h"
#include <string.h>
// Pin connected to DS of 74HC595
#define DATA_PIN C15

View File

@ -15,7 +15,8 @@
*/
#include "matrix.h"
#include "quantum.h"
#include "atomic_util.h"
#include <string.h>
#ifndef PIN_USED_74HC595
# define PIN_USED_74HC595 8

View File

@ -3,8 +3,6 @@
#include "matrix.h"
#include "quantum.h"
static matrix_row_t read_row(uint8_t row) {
matrix_io_delay(); // without this wait read unstable value.

View File

@ -17,10 +17,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "quantum.h"
#include "matrix.h"
#include "tca6424.h"
#include "abelx.h"

View File

@ -14,12 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;

View File

@ -2,10 +2,6 @@
* matrix.c
*/
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "quantum.h"
#include "matrix.h"
#include "tca6424.h"
#include "m20add.h"

View File

@ -2,16 +2,10 @@
* matrix.c
*/
#include <stdint.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <hal.h>
#include "quantum.h"
#include "matrix.h"
#include "timer.h"
#include "wait.h"
#include "print.h"
#include "matrix.h"
#ifndef DEBOUNCE
# define DEBOUNCE 5
@ -167,16 +161,16 @@ matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
void matrix_print(void)
{
printf("\nr/c 01234567\n");
xprintf("\nr/c 01234567\n");
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
printf("%X0: ", row);
xprintf("%X0: ", row);
matrix_row_t data = matrix_get_row(row);
for (int col = 0; col < MATRIX_COLS; col++) {
if (data & (1<<col))
printf("1");
xprintf("1");
else
printf("0");
xprintf("0");
}
printf("\n");
xprintf("\n");
}
}

View File

@ -16,13 +16,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "wait.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#ifdef DIRECT_PINS
static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;

View File

@ -16,13 +16,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "wait.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#ifdef DIRECT_PINS
static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;

View File

@ -16,13 +16,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "wait.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#ifdef DIRECT_PINS
static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;

View File

@ -16,13 +16,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "wait.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#ifdef DIRECT_PINS
static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;

View File

@ -16,13 +16,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "wait.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#ifdef DIRECT_PINS
static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;

View File

@ -14,12 +14,9 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "wait.h"
#include "util.h"
#include "matrix.h"
#include "quantum.h"
// Encoder things
#define ENC_SW F7

View File

@ -14,8 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "wait.h"
#include "common/shift_register.h"
static uint8_t read_rows(void);

View File

@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "uart.h"

View File

@ -14,15 +14,12 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#include "pca9555.h"
/*

View File

@ -15,9 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string.h>
#include <stdio.h>
#include "quantum.h"
#include "matrix.h"
#include "i2c_master.h"
#define RIGHT_HALF

View File

@ -13,7 +13,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "wait.h"
#define COL_SHIFTER ((uint32_t)1)

View File

@ -13,13 +13,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "util.h"
#include "matrix.h"
#include <string.h>
#include "split_util.h"
#include "quantum.h"
#include "wait.h"
#define VIRT_COLS_PER_HAND 1
#define PHYS_COLS_PER_HAND (MATRIX_COLS - VIRT_COLS_PER_HAND)

View File

@ -15,9 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string.h>
#include <stdio.h>
#include "quantum.h"
#include "matrix.h"
#include "i2c_master.h"
#define RIGHT_HALF

View File

@ -15,7 +15,8 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "wait.h"
#if (MATRIX_COLS <= 8)
# define ROW_SHIFTER ((uint8_t)1)

View File

@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "i2c_slave.h"
#define MY_I2C_ADDRESS (0x20U << 1)

View File

@ -15,7 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "wait.h"
/* matrix state(1:on, 0:off) */
static pin_t matrix_row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;

View File

@ -15,11 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "gpio.h"
#include "hal_pal.h"
#include "hal_pal_lld.h"
#include "quantum.h"
#include "matrix.h"
#include <hal_pal.h>
#include <math.h>
#include "wait.h"
// STM32-specific watchdog config calculations
// timeout = 31.25us * PR * (RL + 1)

View File

@ -15,7 +15,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "debug.h"
#include "timer.h"
#include "wait.h"
#ifndef DEBOUNCE
# define DEBOUNCE 5

View File

@ -14,13 +14,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#include "wait.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;

View File

@ -14,10 +14,8 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "matrix.h"
#include "quantum.h"
#include "atomic_util.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;

View File

@ -14,7 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "uart.h"

View File

@ -14,15 +14,12 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")

View File

@ -14,15 +14,12 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")

View File

@ -14,15 +14,12 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "wait.h"
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "debounce.h"
#include "quantum.h"
#if (MATRIX_COLS <= 8)
# define print_matrix_header() print("\nr/c 01234567\n")

View File

@ -17,10 +17,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdbool.h>
#include "matrix.h"
#include <util/delay.h>
#include "quantum.h"
static const uint32_t col_values[24] = SHR_COLS;

View File

@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "uart.h"

View File

@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "uart.h"

View File

@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "uart.h"

View File

@ -15,9 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <string.h>
#include <stdio.h>
#include "quantum.h"
#include "matrix.h"
#include "i2c_master.h"
#define RIGHT_HALF

View File

@ -13,7 +13,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "wait.h"
#define COL_SHIFTER ((uint32_t)1)

View File

@ -13,15 +13,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
#include <string.h>
#include "matrix.h"
#include "pca9555.h"
#include "quantum.h"
#include "debug.h"
// PCA9555 slave addresses
#define IC1 0x20

View File

@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
#include "matrix.h"
#include "uart.h"

View File

@ -23,7 +23,8 @@ SOFTWARE.
#include "matrix.h"
#include "i2c_master.h"
#include "quantum.h"
#include "print.h"
#include <string.h>
#define VIBRATE_LENGTH 50 //Defines number of interrupts motor will vibrate for, must be bigger than 8 for correct operation
volatile uint8_t vibrate = 0; //Trigger vibration in interrupt
@ -276,16 +277,16 @@ matrix_row_t matrix_get_row(uint8_t row) {
}
void matrix_print(void) {
printf("\nr/c 01234567\n");
xprintf("\nr/c 01234567\n");
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
printf("%X0: ", row);
xprintf("%X0: ", row);
matrix_row_t data = matrix_get_row(row);
for (int col = 0; col < MATRIX_COLS; col++) {
if (data & (1<<col))
printf("1");
xprintf("1");
else
printf("0");
xprintf("0");
}
printf("\n");
xprintf("\n");
}
}

View File

@ -13,8 +13,10 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "matrix.h"
#include "mcp23018.h"
#include "quantum.h"
#include "print.h"
#include "wait.h"
// Optimize scanning code for speed as a slight mitigation for the port expander
#pragma GCC push_options

View File

@ -13,15 +13,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
#include <string.h>
#include "matrix.h"
#include "pca9555.h"
#include "quantum.h"
#include "debug.h"
// PCA9555 slave addresses
#define IC1 0x20

View File

@ -13,15 +13,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
#include <string.h>
#include "matrix.h"
#include "pca9555.h"
#include "quantum.h"
#include "debug.h"
#include "wait.h"
// PCA9555 slave addresses
#define IC1 0x20

View File

@ -15,10 +15,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "matrix.h"
#include "quantum.h"
#include "sn74x138.h"
static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;

View File

@ -14,10 +14,8 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "matrix.h"
#include "wait.h"
#include "quantum.h"
#include "i2c_master.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;

View File

@ -14,10 +14,8 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "matrix.h"
#include "wait.h"
#include "quantum.h"
#include "i2c_master.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;

View File

@ -14,10 +14,8 @@ 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 <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdbool.h>
#include "matrix.h"
#include "wait.h"
#include "quantum.h"
#include "i2c_master.h"
static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;