diff --git a/keyboards/nullbitsco/rp2040_bb/config.h b/keyboards/nullbitsco/rp2040_bb/config.h index afbdfeeb31517c22cb1b33eb9242b06152af2118..1df39ee900768b3712fc1c42bcd6a29f37ad6dfd 100644 --- a/keyboards/nullbitsco/rp2040_bb/config.h +++ b/keyboards/nullbitsco/rp2040_bb/config.h @@ -19,13 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x6E61 -#define PRODUCT_ID 0x6069 -#define DEVICE_VER 0x0001 -#define MANUFACTURER nullbits -#define PRODUCT RP2040_BB - /* key matrix size */ #define MATRIX_COLS 2 #define MATRIX_ROWS 3 @@ -37,14 +30,28 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { GP4, GP5 } #define MATRIX_ROW_PINS { GP6, GP7, GP8 } +/* RP2040 definitions */ #define RP2040_FLASH_W25X10CL +#define RMKB_SIO_DRIVER SIOD0 +#define RMKB_SIO_TX_PIN GP0 +#define RMKB_SIO_RX_PIN GP1 /* Optional SMT LED pins */ #define RGB_DI_PIN GP19 #define RGBLED_NUM 8 #define RGBLIGHT_DEFAULT_VAL 64 #define RGBLIGHT_DEFAULT_MODE 10 -#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE +#define RGBLIGHT_SLEEP /* Optional encoder pins */ #define ENCODERS_PAD_A { GP23 } @@ -56,4 +63,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define I2C_DRIVER I2CD2 /* Debug configs */ -#define DEBUG_MATRIX_SCAN_RATE +// #define DEBUG_MATRIX_SCAN_RATE +// #define KEYBOARD_REMOTE diff --git a/keyboards/nullbitsco/rp2040_bb/halconf.h b/keyboards/nullbitsco/rp2040_bb/halconf.h index c4a7101379f8530d6575d45703b0d41b830c4c71..2cd9db10ff83148054a1256eb43f1230a0cb9639 100644 --- a/keyboards/nullbitsco/rp2040_bb/halconf.h +++ b/keyboards/nullbitsco/rp2040_bb/halconf.h @@ -1,5 +1,6 @@ #pragma once #define HAL_USE_I2C TRUE +#define HAL_USE_SIO TRUE #include_next <halconf.h> diff --git a/keyboards/nullbitsco/rp2040_bb/info.json b/keyboards/nullbitsco/rp2040_bb/info.json new file mode 100644 index 0000000000000000000000000000000000000000..005604feb16ac7c776bf2b84ea3b788a7b0f999f --- /dev/null +++ b/keyboards/nullbitsco/rp2040_bb/info.json @@ -0,0 +1,9 @@ +{ + "keyboard_name": "RP2040_BB", + "manufacturer": "nullbits", + "usb": { + "vid": "0x6E61", + "pid": "0x6069", + "device_version": "0.0.1" + } +} diff --git a/keyboards/nullbitsco/rp2040_bb/mcuconf.h b/keyboards/nullbitsco/rp2040_bb/mcuconf.h index 4e812fc7057f5c2a925442c0c526481c3fc8c9f3..01d7d5287552b50664540de885f841bb0890539e 100644 --- a/keyboards/nullbitsco/rp2040_bb/mcuconf.h +++ b/keyboards/nullbitsco/rp2040_bb/mcuconf.h @@ -4,3 +4,6 @@ #undef RP_I2C_USE_I2C1 #define RP_I2C_USE_I2C1 TRUE + +#undef RP_SIO_USE_UART0 +#define RP_SIO_USE_UART0 TRUE diff --git a/keyboards/nullbitsco/rp2040_bb/rp2040_bb.c b/keyboards/nullbitsco/rp2040_bb/rp2040_bb.c index f8c42a110730f54474e0e5367f436b0015cc2d8c..156fb6f62b6437f9a4328d26670a0427fe02eadb 100644 --- a/keyboards/nullbitsco/rp2040_bb/rp2040_bb.c +++ b/keyboards/nullbitsco/rp2040_bb/rp2040_bb.c @@ -1,11 +1,28 @@ -// Copyright 2022 Stefan Kerkmann +// Copyright 2022 Jay Greco // SPDX-License-Identifier: GPL-2.0-or-later #include QMK_KEYBOARD_H +#include "common/remote_kb.h" void keyboard_post_init_user(void) { debug_enable = true; debug_matrix = true; - debug_keyboard = true; - debug_mouse = true; + // debug_keyboard = true; + // debug_mouse = true; +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + process_record_remote_kb(keycode, record); + if (!process_record_user(keycode, record)) return false; + return true; +} + +void matrix_init_kb(void) { + matrix_init_remote_kb(); + matrix_init_user(); +} + +void matrix_scan_kb(void) { + matrix_scan_remote_kb(); + matrix_scan_user(); } diff --git a/keyboards/nullbitsco/rp2040_bb/rules.mk b/keyboards/nullbitsco/rp2040_bb/rules.mk index b04b1a90d907bc870f93546aad151db97a5a4816..4595f01acd85e3cdb1371673df6d3e2a1507c1ce 100644 --- a/keyboards/nullbitsco/rp2040_bb/rules.mk +++ b/keyboards/nullbitsco/rp2040_bb/rules.mk @@ -20,3 +20,5 @@ VIA_ENABLE = yes ENCODER_ENABLE = yes RGBLIGHT_ENABLE = yes AUDIO_ENABLE = no #not yet supported + +SRC += common/remote_kb.c