add hid_rgbled keymap
This commit is contained in:
20
keyboards/hid_rgbled/config.h
Normal file
20
keyboards/hid_rgbled/config.h
Normal file
@@ -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
|
||||||
45
keyboards/hid_rgbled/info.json
Normal file
45
keyboards/hid_rgbled/info.json
Normal file
@@ -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}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
16
keyboards/hid_rgbled/keymaps/default/keymap.c
Normal file
16
keyboards/hid_rgbled/keymaps/default/keymap.c
Normal file
@@ -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);
|
||||||
|
}
|
||||||
27
keyboards/hid_rgbled/keymaps/hid/keymap.c
Normal file
27
keyboards/hid_rgbled/keymaps/hid/keymap.c
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
// Copyright 2023 QMK
|
||||||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include <raw_hid.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();
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
1
keyboards/hid_rgbled/keymaps/hid/rules.mk
Normal file
1
keyboards/hid_rgbled/keymaps/hid/rules.mk
Normal file
@@ -0,0 +1 @@
|
|||||||
|
RAW_ENABLE = yes
|
||||||
27
keyboards/hid_rgbled/readme.md
Normal file
27
keyboards/hid_rgbled/readme.md
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# hid_rgbled
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
*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
|
||||||
1
keyboards/hid_rgbled/rules.mk
Normal file
1
keyboards/hid_rgbled/rules.mk
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# This file intentionally left blank
|
||||||
20
keyboards/hid_rgbled/xiao_rp2040/info.json
Normal file
20
keyboards/hid_rgbled/xiao_rp2040/info.json
Normal file
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
1
keyboards/hid_rgbled/xiao_rp2040/rules.mk
Normal file
1
keyboards/hid_rgbled/xiao_rp2040/rules.mk
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# This file intentionally left blank
|
||||||
9
keyboards/hid_rgbled/xiao_rp2040/xiao_rp2040.c
Normal file
9
keyboards/hid_rgbled/xiao_rp2040/xiao_rp2040.c
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
void keyboard_post_init_kb(void) {
|
||||||
|
// power up rgbled
|
||||||
|
setPinOutput(GP11);
|
||||||
|
writePinHigh(GP11);
|
||||||
|
|
||||||
|
keyboard_post_init_user();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user