Merge remote-tracking branch 'origin/develop' into xap

This commit is contained in:
QMK Bot 2025-05-14 12:01:47 +00:00
commit d4d7ea8375
7 changed files with 14 additions and 17 deletions

View File

@ -0,0 +1,5 @@
{
"features": {
"pointing_device": true
}
}

View File

@ -1,3 +1 @@
POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = cirque_pinnacle_spi

View File

@ -3,8 +3,5 @@
#pragma once
#define HAL_USE_SPI TRUE
#define SPI_USE_WAIT TRUE
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
#include_next <halconf.h>

View File

@ -6,8 +6,6 @@
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true
@ -23,7 +21,6 @@
"driver": "vendor"
}
},
"url": "",
"usb": {
"device_version": "1.0.0",
"pid": "0x4832",

View File

@ -1,8 +1,10 @@
{
"features": {
"joystick": true
"joystick": true,
"pointing_device": true
},
"joystick": {
"driver": "analog",
"axes": {
"x": {
"high": 938,

View File

@ -1,3 +1 @@
POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = pmw3389
JOYSTICK_DRIVER = analog

View File

@ -32,7 +32,7 @@ uint8_t has_anykey(void) {
uint8_t* p = keyboard_report->keys;
uint8_t lp = sizeof(keyboard_report->keys);
#ifdef NKRO_ENABLE
if (usb_device_state_get_protocol() == USB_PROTOCOL_REPORT && keymap_config.nkro) {
if (host_can_send_nkro() && keymap_config.nkro) {
p = nkro_report->bits;
lp = sizeof(nkro_report->bits);
}
@ -49,7 +49,7 @@ uint8_t has_anykey(void) {
*/
uint8_t get_first_key(void) {
#ifdef NKRO_ENABLE
if (usb_device_state_get_protocol() == USB_PROTOCOL_REPORT && keymap_config.nkro) {
if (host_can_send_nkro() && keymap_config.nkro) {
uint8_t i = 0;
for (; i < NKRO_REPORT_BITS && !nkro_report->bits[i]; i++)
;
@ -69,7 +69,7 @@ bool is_key_pressed(uint8_t key) {
return false;
}
#ifdef NKRO_ENABLE
if (usb_device_state_get_protocol() == USB_PROTOCOL_REPORT && keymap_config.nkro) {
if (host_can_send_nkro() && keymap_config.nkro) {
if ((key >> 3) < NKRO_REPORT_BITS) {
return nkro_report->bits[key >> 3] & 1 << (key & 7);
} else {
@ -151,7 +151,7 @@ void del_key_bit(report_nkro_t* nkro_report, uint8_t code) {
*/
void add_key_to_report(uint8_t key) {
#ifdef NKRO_ENABLE
if (usb_device_state_get_protocol() == USB_PROTOCOL_REPORT && keymap_config.nkro) {
if (host_can_send_nkro() && keymap_config.nkro) {
add_key_bit(nkro_report, key);
return;
}
@ -165,7 +165,7 @@ void add_key_to_report(uint8_t key) {
*/
void del_key_from_report(uint8_t key) {
#ifdef NKRO_ENABLE
if (usb_device_state_get_protocol() == USB_PROTOCOL_REPORT && keymap_config.nkro) {
if (host_can_send_nkro() && keymap_config.nkro) {
del_key_bit(nkro_report, key);
return;
}
@ -180,7 +180,7 @@ void del_key_from_report(uint8_t key) {
void clear_keys_from_report(void) {
// not clear mods
#ifdef NKRO_ENABLE
if (usb_device_state_get_protocol() == USB_PROTOCOL_REPORT && keymap_config.nkro) {
if (host_can_send_nkro() && keymap_config.nkro) {
memset(nkro_report->bits, 0, sizeof(nkro_report->bits));
return;
}