1
0
Fork 0
forked from forks/qmk_firmware

Remove quantum.h includes from keyboard custom matrix.cs (#23371)

This commit is contained in:
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;