diff --git a/keyboards/hid_rgbled/config.h b/keyboards/hid_rgbled/config.h new file mode 100644 index 0000000000..6144d2716d --- /dev/null +++ b/keyboards/hid_rgbled/config.h @@ -0,0 +1,20 @@ +// Copyright 2024 hsgw (@hsgw) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT diff --git a/keyboards/hid_rgbled/info.json b/keyboards/hid_rgbled/info.json new file mode 100644 index 0000000000..874e24cb1c --- /dev/null +++ b/keyboards/hid_rgbled/info.json @@ -0,0 +1,45 @@ +{ + "manufacturer": "hsgw", + "keyboard_name": "hid_rgbled", + "maintainer": "hsgw", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "features": { + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true + }, + "rgblight": { + "saturation_steps": 8, + "brightness_steps": 8, + "led_count": 1, + "sleep": true, + "animations": { + "breathing": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "snake": true, + "knight": true, + "christmas": true, + "static_gradient": true, + "rgb_test": true, + "alternating": true, + "twinkle": true + } + }, + "layouts": { + "LAYOUT_ortho_1x1": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0} + ] + } + } +} diff --git a/keyboards/hid_rgbled/keymaps/default/keymap.c b/keyboards/hid_rgbled/keymaps/default/keymap.c new file mode 100644 index 0000000000..ee73856517 --- /dev/null +++ b/keyboards/hid_rgbled/keymaps/default/keymap.c @@ -0,0 +1,16 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ortho_1x1(KC_A) +}; +// clang-format on + +void keyboard_post_init_user(void) { + rgblight_enable(); + rgblight_mode(RGBLIGHT_MODE_RGB_TEST); +} diff --git a/keyboards/hid_rgbled/keymaps/hid/keymap.c b/keyboards/hid_rgbled/keymaps/hid/keymap.c new file mode 100644 index 0000000000..6e10f2df9a --- /dev/null +++ b/keyboards/hid_rgbled/keymaps/hid/keymap.c @@ -0,0 +1,27 @@ +// Copyright 2023 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H +#include + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ortho_1x1(KC_A) +}; +// clang-format on + +void keyboard_post_init_user(void) { + rgblight_enable(); +} + +void raw_hid_receive(uint8_t *data, uint8_t length) { + // `data` is a pointer to the buffer containing the received HID report + // `length` is the length of the report - always `RAW_EPSIZE` + uint8_t response[length]; + memset(response, 0, length); + response[0] = 'B'; + if (data[0] == 'A') { + raw_hid_send(response, length); + } +} diff --git a/keyboards/hid_rgbled/keymaps/hid/rules.mk b/keyboards/hid_rgbled/keymaps/hid/rules.mk new file mode 100644 index 0000000000..474bf6b0d0 --- /dev/null +++ b/keyboards/hid_rgbled/keymaps/hid/rules.mk @@ -0,0 +1 @@ +RAW_ENABLE = yes diff --git a/keyboards/hid_rgbled/readme.md b/keyboards/hid_rgbled/readme.md new file mode 100644 index 0000000000..a2271e8dc4 --- /dev/null +++ b/keyboards/hid_rgbled/readme.md @@ -0,0 +1,27 @@ +# hid_rgbled + +![hid_rgbled](imgur.com image replace me!) + +*A short description of the keyboard/project* + +* Keyboard Maintainer: [hsgw](https://github.com/hsgw) +* Hardware Supported: *The PCBs, controllers supported* +* Hardware Availability: *Links to where you can find this hardware* + +Make example for this keyboard (after setting up your build environment): + + make hid_rgbled:default + +Flashing example for this keyboard: + + make hid_rgbled:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/hid_rgbled/rules.mk b/keyboards/hid_rgbled/rules.mk new file mode 100644 index 0000000000..6e7633bfe0 --- /dev/null +++ b/keyboards/hid_rgbled/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/hid_rgbled/xiao_rp2040/info.json b/keyboards/hid_rgbled/xiao_rp2040/info.json new file mode 100644 index 0000000000..78a969432a --- /dev/null +++ b/keyboards/hid_rgbled/xiao_rp2040/info.json @@ -0,0 +1,20 @@ +{ + "bootloader": "rp2040", + "processor": "RP2040", + "url": "", + "usb": { + "device_version": "1.0.0", + "pid": "0x0000", + "vid": "0xFEED" + }, + "matrix_pins":{ + "direct": [["GP26"]] + }, + "ws2812": { + "pin": "GP12", + "driver": "vendor" + }, + "rgblight": { + "max_brightness": 200 + } +} diff --git a/keyboards/hid_rgbled/xiao_rp2040/rules.mk b/keyboards/hid_rgbled/xiao_rp2040/rules.mk new file mode 100644 index 0000000000..6e7633bfe0 --- /dev/null +++ b/keyboards/hid_rgbled/xiao_rp2040/rules.mk @@ -0,0 +1 @@ +# This file intentionally left blank diff --git a/keyboards/hid_rgbled/xiao_rp2040/xiao_rp2040.c b/keyboards/hid_rgbled/xiao_rp2040/xiao_rp2040.c new file mode 100644 index 0000000000..560583b63b --- /dev/null +++ b/keyboards/hid_rgbled/xiao_rp2040/xiao_rp2040.c @@ -0,0 +1,9 @@ +#include "quantum.h" + +void keyboard_post_init_kb(void) { + // power up rgbled + setPinOutput(GP11); + writePinHigh(GP11); + + keyboard_post_init_user(); +}