diff options
Diffstat (limited to 'keyboards/3w6')
-rw-r--r-- | keyboards/3w6/rev1/keyboard.json (renamed from keyboards/3w6/rev1/info.json) | 10 | ||||
-rw-r--r-- | keyboards/3w6/rev1/matrix.c | 14 | ||||
-rw-r--r-- | keyboards/3w6/rev1/rules.mk | 16 | ||||
-rw-r--r-- | keyboards/3w6/rev2/keyboard.json (renamed from keyboards/3w6/rev2/info.json) | 10 | ||||
-rw-r--r-- | keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c | 4 | ||||
-rw-r--r-- | keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.h | 4 | ||||
-rw-r--r-- | keyboards/3w6/rev2/matrix.c | 14 | ||||
-rw-r--r-- | keyboards/3w6/rev2/rules.mk | 16 |
8 files changed, 39 insertions, 49 deletions
diff --git a/keyboards/3w6/rev1/info.json b/keyboards/3w6/rev1/keyboard.json index 2db9363564..478c79b942 100644 --- a/keyboards/3w6/rev1/info.json +++ b/keyboards/3w6/rev1/keyboard.json @@ -1,6 +1,14 @@ { "usb": { - "device_version": "0.0.1" + "device_version": "0.0.1", + "no_startup_check": true + }, + "features": { + "bootmagic": false, + "extrakey": true, + "mousekey": true, + "nkro": false, + "unicode": true }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/3w6/rev1/matrix.c b/keyboards/3w6/rev1/matrix.c index aa3e43fbe0..0c06a743a1 100644 --- a/keyboards/3w6/rev1/matrix.c +++ b/keyboards/3w6/rev1/matrix.c @@ -165,8 +165,8 @@ static void init_cols(void) { pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_L; for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) { pin_t pin = matrix_col_pins_mcu[pin_index]; - setPinInput(pin); - writePinHigh(pin); + gpio_set_pin_input(pin); + gpio_write_pin_high(pin); } } @@ -177,7 +177,7 @@ static matrix_row_t read_cols(uint8_t row) { // For each col... for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) { // Select the col pin to read (active low) - uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]); + uint8_t pin_state = gpio_read_pin(matrix_col_pins_mcu[col_index]); // Populate the matrix row with the state of the col pin current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); @@ -223,8 +223,8 @@ static void unselect_rows(void) { pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_L; for (int pin_index = 0; pin_index < MATRIX_ROWS_PER_SIDE; pin_index++) { pin_t pin = matrix_row_pins_mcu[pin_index]; - setPinInput(pin); - writePinLow(pin); + gpio_set_pin_input(pin); + gpio_write_pin_low(pin); } } @@ -236,8 +236,8 @@ static void select_row(uint8_t row) { // select on atmega32u4 pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_L; pin_t pin = matrix_row_pins_mcu[row]; - setPinOutput(pin); - writePinLow(pin); + gpio_set_pin_output(pin); + gpio_write_pin_low(pin); } else { // select on tca9555 if (tca9555_status) { // if there was an error diff --git a/keyboards/3w6/rev1/rules.mk b/keyboards/3w6/rev1/rules.mk index b7988ce4f5..cea39bb5c9 100644 --- a/keyboards/3w6/rev1/rules.mk +++ b/keyboards/3w6/rev1/rules.mk @@ -1,19 +1,3 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -UNICODE_ENABLE = yes CUSTOM_MATRIX = lite -NO_USB_STARTUP_CHECK = yes -LTO_ENABLE = no - SRC += matrix.c I2C_DRIVER_REQUIRED = yes diff --git a/keyboards/3w6/rev2/info.json b/keyboards/3w6/rev2/keyboard.json index 70ee0e0fca..f3981e88d9 100644 --- a/keyboards/3w6/rev2/info.json +++ b/keyboards/3w6/rev2/keyboard.json @@ -1,6 +1,14 @@ { "usb": { - "device_version": "0.0.2" + "device_version": "0.0.2", + "no_startup_check": true + }, + "features": { + "bootmagic": false, + "extrakey": true, + "mousekey": true, + "nkro": false, + "unicode": true }, "processor": "atmega32u4", "bootloader": "atmel-dfu", diff --git a/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c b/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c index 0db58bfabd..c32f2a04d2 100644 --- a/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c +++ b/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c @@ -14,8 +14,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include QMK_KEYBOARD_H #include "pimoroni_trackball.h" #include "i2c_master.h" +#include "action.h" +#include "timer.h" +#include "print.h" static uint8_t scrolling = 0; static int16_t x_offset = 0; diff --git a/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.h b/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.h index ca2559bec7..d85d4e60a9 100644 --- a/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.h +++ b/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.h @@ -16,8 +16,10 @@ #pragma once -#include "quantum.h" +#include <stdint.h> +#include <stdbool.h> #include "pointing_device.h" +#include "report.h" #ifndef TRACKBALL_ADDRESS # define TRACKBALL_ADDRESS (0x0A << 1) diff --git a/keyboards/3w6/rev2/matrix.c b/keyboards/3w6/rev2/matrix.c index da7a5344e5..8c628215aa 100644 --- a/keyboards/3w6/rev2/matrix.c +++ b/keyboards/3w6/rev2/matrix.c @@ -165,8 +165,8 @@ static void init_cols(void) { pin_t matrix_col_pins_mcu[MATRIX_COLS_PER_SIDE] = MATRIX_COL_PINS_L; for (int pin_index = 0; pin_index < MATRIX_COLS_PER_SIDE; pin_index++) { pin_t pin = matrix_col_pins_mcu[pin_index]; - setPinInput(pin); - writePinHigh(pin); + gpio_set_pin_input(pin); + gpio_write_pin_high(pin); } } @@ -177,7 +177,7 @@ static matrix_row_t read_cols(uint8_t row) { // For each col... for (uint8_t col_index = 0; col_index < MATRIX_COLS_PER_SIDE; col_index++) { // Select the col pin to read (active low) - uint8_t pin_state = readPin(matrix_col_pins_mcu[col_index]); + uint8_t pin_state = gpio_read_pin(matrix_col_pins_mcu[col_index]); // Populate the matrix row with the state of the col pin current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); @@ -221,8 +221,8 @@ static void unselect_rows(void) { pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_L; for (int pin_index = 0; pin_index < MATRIX_ROWS_PER_SIDE; pin_index++) { pin_t pin = matrix_row_pins_mcu[pin_index]; - setPinInput(pin); - writePinLow(pin); + gpio_set_pin_input(pin); + gpio_write_pin_low(pin); } } @@ -233,8 +233,8 @@ static void select_row(uint8_t row) { // select on atmega32u4 pin_t matrix_row_pins_mcu[MATRIX_ROWS_PER_SIDE] = MATRIX_ROW_PINS_L; pin_t pin = matrix_row_pins_mcu[row]; - setPinOutput(pin); - writePinLow(pin); + gpio_set_pin_output(pin); + gpio_write_pin_low(pin); } else { // select on tca9555 if (tca9555_status) { // if there was an error diff --git a/keyboards/3w6/rev2/rules.mk b/keyboards/3w6/rev2/rules.mk index b7988ce4f5..cea39bb5c9 100644 --- a/keyboards/3w6/rev2/rules.mk +++ b/keyboards/3w6/rev2/rules.mk @@ -1,19 +1,3 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -UNICODE_ENABLE = yes CUSTOM_MATRIX = lite -NO_USB_STARTUP_CHECK = yes -LTO_ENABLE = no - SRC += matrix.c I2C_DRIVER_REQUIRED = yes |