diff options
author | Nick Brassel <nick@tzarc.org> | 2023-02-28 11:22:29 +1100 |
---|---|---|
committer | Nick Brassel <nick@tzarc.org> | 2023-02-28 11:22:29 +1100 |
commit | bacec14073b2e897d5a52caf12de5a6a1f7b4078 (patch) | |
tree | d4e3e57aac1a829a191831efd2e62c8a43217885 /keyboards/duck/tcv3 | |
parent | d70e9b8659a7fbbd7069fd542bd07e67e04327a1 (diff) | |
parent | b865b9e1706ad28ae4882bd2e0331e98808295fa (diff) |
Merge remote-tracking branch 'upstream/develop'
Diffstat (limited to 'keyboards/duck/tcv3')
-rw-r--r-- | keyboards/duck/tcv3/config.h | 8 | ||||
-rw-r--r-- | keyboards/duck/tcv3/indicator_leds.h | 2 | ||||
-rw-r--r-- | keyboards/duck/tcv3/info.json | 5 | ||||
-rw-r--r-- | keyboards/duck/tcv3/matrix.c | 10 | ||||
-rw-r--r-- | keyboards/duck/tcv3/rules.mk | 6 | ||||
-rw-r--r-- | keyboards/duck/tcv3/tcv3.c | 30 |
6 files changed, 31 insertions, 30 deletions
diff --git a/keyboards/duck/tcv3/config.h b/keyboards/duck/tcv3/config.h index 29b389914e..4cb83d43fa 100644 --- a/keyboards/duck/tcv3/config.h +++ b/keyboards/duck/tcv3/config.h @@ -17,7 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#include "config_common.h" /* key matrix size */ #define MATRIX_ROWS 6 @@ -25,9 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIODE_DIRECTION COL2ROW -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD #define RGBLIGHT_EFFECT_RAINBOW_SWIRL @@ -40,7 +36,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_EFFECT_TWINKLE #define RGB_DI_PIN D6 #define RGBLED_NUM 17 - -/* Set to top left most key */ -#define BOOTMAGIC_LITE_ROW 5 -#define BOOTMAGIC_LITE_COLUMN 10 diff --git a/keyboards/duck/tcv3/indicator_leds.h b/keyboards/duck/tcv3/indicator_leds.h index ad3ec54f52..9bd437084d 100644 --- a/keyboards/duck/tcv3/indicator_leds.h +++ b/keyboards/duck/tcv3/indicator_leds.h @@ -1,3 +1,5 @@ +#pragma once + #include "duck_led/duck_led.h" void indicator_leds_set(bool leds[8]); diff --git a/keyboards/duck/tcv3/info.json b/keyboards/duck/tcv3/info.json index f90d994cd0..9b8b20e80e 100644 --- a/keyboards/duck/tcv3/info.json +++ b/keyboards/duck/tcv3/info.json @@ -8,6 +8,11 @@ "pid": "0x5443", "device_version": "0.0.1" }, + "bootmagic": { + "matrix": [5, 10] + }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu", "layouts": { "LAYOUT_all": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2.25, "y":0}, {"x":4.25, "y":0}, {"x":5.25, "y":0}, {"x":6.25, "y":0}, {"x":7.25, "y":0}, {"x":8.75, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.5, "y":0}, {"x":18.5, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2.25, "y":1.25}, {"x":3.25, "y":1.25}, {"x":4.25, "y":1.25}, {"x":5.25, "y":1.25}, {"x":6.25, "y":1.25}, {"x":7.25, "y":1.25}, {"x":8.25, "y":1.25}, {"x":9.25, "y":1.25}, {"x":10.25, "y":1.25}, {"x":11.25, "y":1.25}, {"x":12.25, "y":1.25}, {"x":13.25, "y":1.25}, {"x":14.25, "y":1.25}, {"x":15.25, "y":1.25}, {"x":16.25, "y":1.25}, {"x":17.5, "y":1.25}, {"x":18.5, "y":1.25}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2.25, "y":2.25, "w":1.5}, {"x":3.75, "y":2.25}, {"x":4.75, "y":2.25}, {"x":5.75, "y":2.25}, {"x":6.75, "y":2.25}, {"x":7.75, "y":2.25}, {"x":8.75, "y":2.25}, {"x":9.75, "y":2.25}, {"x":10.75, "y":2.25}, {"x":11.75, "y":2.25}, {"x":12.75, "y":2.25}, {"x":13.75, "y":2.25}, {"x":14.75, "y":2.25}, {"x":15.75, "y":2.25, "w":1.5}, {"x":17.5, "y":2.25}, {"x":18.5, "y":2.25}, {"x":0, "y":3.25}, {"x":1, "y":3.25}, {"x":2.25, "y":3.25, "w":1.75}, {"x":4, "y":3.25}, {"x":5, "y":3.25}, {"x":6, "y":3.25}, {"x":7, "y":3.25}, {"x":8, "y":3.25}, {"x":9, "y":3.25}, {"x":10, "y":3.25}, {"x":11, "y":3.25}, {"x":12, "y":3.25}, {"x":13, "y":3.25}, {"x":14, "y":3.25}, {"x":15, "y":3.25}, {"x":16, "y":3.25, "w":1.25}, {"x":17.5, "y":3.25}, {"x":18.5, "y":3.25}, {"x":0, "y":4.25}, {"x":1, "y":4.25}, {"x":2.25, "y":4.25, "w":1.25}, {"x":3.5, "y":4.25}, {"x":4.5, "y":4.25}, {"x":5.5, "y":4.25}, {"x":6.5, "y":4.25}, {"x":7.5, "y":4.25}, {"x":8.5, "y":4.25}, {"x":9.5, "y":4.25}, {"x":10.5, "y":4.25}, {"x":11.5, "y":4.25}, {"x":12.5, "y":4.25}, {"x":13.5, "y":4.25}, {"x":14.5, "y":4.25, "w":1.75}, {"x":16.25, "y":4.25}, {"x":17.5, "y":4.5}, {"x":0, "y":5.25}, {"x":1, "y":5.25}, {"x":2.25, "y":5.25, "w":1.5}, {"x":3.75, "y":5.25}, {"x":4.75, "y":5.25, "w":1.5}, {"x":6.25, "y":5.25, "w":6}, {"x":12.25, "y":5.25, "w":1.5}, {"x":13.75, "y":5.25}, {"x":14.75, "y":5.25, "w":1.5}, {"x":16.5, "y":5.5}, {"x":17.5, "y":5.5}, {"x":18.5, "y":5.5}] diff --git a/keyboards/duck/tcv3/matrix.c b/keyboards/duck/tcv3/matrix.c index d2d90470a0..d3f44bf886 100644 --- a/keyboards/duck/tcv3/matrix.c +++ b/keyboards/duck/tcv3/matrix.c @@ -22,6 +22,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "print.h" #include "debug.h" +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + static uint8_t debouncing = DEBOUNCE; /* matrix state(1:on, 0:off) */ @@ -74,7 +78,7 @@ void matrix_init(void) { matrix_debouncing[i] = 0; } - matrix_init_quantum(); + matrix_init_kb(); } uint8_t matrix_scan(void) { @@ -108,7 +112,7 @@ uint8_t matrix_scan(void) { } } - matrix_scan_quantum(); + matrix_scan_kb(); return 1; } @@ -277,4 +281,4 @@ static void select_col(uint8_t col) { PORTB |= 0b00100000; break; } -}
\ No newline at end of file +} diff --git a/keyboards/duck/tcv3/rules.mk b/keyboards/duck/tcv3/rules.mk index 3fef0ce542..b13684d8fd 100644 --- a/keyboards/duck/tcv3/rules.mk +++ b/keyboards/duck/tcv3/rules.mk @@ -1,9 +1,3 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - # Build Options # change yes to no to disable # diff --git a/keyboards/duck/tcv3/tcv3.c b/keyboards/duck/tcv3/tcv3.c index 4d52d22c11..805d2b75d5 100644 --- a/keyboards/duck/tcv3/tcv3.c +++ b/keyboards/duck/tcv3/tcv3.c @@ -100,19 +100,23 @@ void backlight_set(uint8_t level) { } // // Port from backlight_update_state -// void led_set_kb(uint8_t usb_led) { -// bool status[7] = { -// backlight_os_state & (1<<USB_LED_CAPS_LOCK), -// backlight_os_state & (1<<USB_LED_SCROLL_LOCK), -// backlight_os_state & (1<<USB_LED_NUM_LOCK), -// backlight_layer_state & (1<<1), -// backlight_layer_state & (1<<2), -// backlight_layer_state & (1<<3), -// backlight_layer_state & (1<<4) -// }; -// indicator_leds_set(status); -// backlight_os_state & (1<<USB_LED_CAPS_LOCK) ? (PORTB &= ~0b00000001) : (PORTB |= 0b00000001); -// backlight_os_state & (1<<USB_LED_SCROLL_LOCK) ? (PORTB &= ~0b00010000) : (PORTB |= 0b00010000); +// bool led_update_kb(led_t led_state) { +// bool res = led_update_user(led_state); +// if(res) { +// bool status[7] = { +// backlight_os_state & (1<<USB_LED_CAPS_LOCK), +// backlight_os_state & (1<<USB_LED_SCROLL_LOCK), +// backlight_os_state & (1<<USB_LED_NUM_LOCK), +// backlight_layer_state & (1<<1), +// backlight_layer_state & (1<<2), +// backlight_layer_state & (1<<3), +// backlight_layer_state & (1<<4) +// }; +// indicator_leds_set(status); +// backlight_os_state & (1<<USB_LED_CAPS_LOCK) ? (PORTB &= ~0b00000001) : (PORTB |= 0b00000001); +// backlight_os_state & (1<<USB_LED_SCROLL_LOCK) ? (PORTB &= ~0b00010000) : (PORTB |= 0b00010000); +// } +// return res; // } // U5 Pin 1, 2, 3 connected to top left LEDs |