better ifdef to handle non split kb
This commit is contained in:
parent
b949c99311
commit
6c633ba710
3 changed files with 5 additions and 6 deletions
|
@ -15,6 +15,8 @@
|
||||||
#include <dt-bindings/zmk/hid_usage.h>
|
#include <dt-bindings/zmk/hid_usage.h>
|
||||||
#include <dt-bindings/zmk/hid_usage_pages.h>
|
#include <dt-bindings/zmk/hid_usage_pages.h>
|
||||||
|
|
||||||
|
#define ZMK_HID_KEYBOARD_NKRO_MAX_USAGE HID_USAGE_KEY_KEYPAD_EQUAL
|
||||||
|
|
||||||
#define COLLECTION_REPORT 0x03
|
#define COLLECTION_REPORT 0x03
|
||||||
|
|
||||||
static const uint8_t zmk_hid_report_desc[] = {
|
static const uint8_t zmk_hid_report_desc[] = {
|
||||||
|
@ -88,7 +90,6 @@ static const uint8_t zmk_hid_report_desc[] = {
|
||||||
/* REPORT_COUNT (CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE) */
|
/* REPORT_COUNT (CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE) */
|
||||||
HID_REPORT_COUNT(CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE),
|
HID_REPORT_COUNT(CONFIG_ZMK_HID_CONSUMER_REPORT_SIZE),
|
||||||
HID_INPUT(0x00),
|
HID_INPUT(0x00),
|
||||||
0x00,
|
|
||||||
/* END COLLECTION */
|
/* END COLLECTION */
|
||||||
HID_END_COLLECTION,
|
HID_END_COLLECTION,
|
||||||
|
|
||||||
|
|
|
@ -18,8 +18,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||||
#include <zmk/endpoints.h>
|
#include <zmk/endpoints.h>
|
||||||
#include <zmk/mouse.h>
|
#include <zmk/mouse.h>
|
||||||
|
|
||||||
//TODO: There is probably a better flag to use here
|
#if !defined(CONFIG_ZMK_SPLIT) || defined(CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
|
||||||
#if(CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
|
|
||||||
static struct vector2d move_speed = {0};
|
static struct vector2d move_speed = {0};
|
||||||
static struct vector2d scroll_speed = {0};
|
static struct vector2d scroll_speed = {0};
|
||||||
static struct mouse_config move_config = (struct mouse_config){0};
|
static struct mouse_config move_config = (struct mouse_config){0};
|
||||||
|
|
|
@ -16,8 +16,7 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||||
|
|
||||||
#include <sys/util.h> // CLAMP
|
#include <sys/util.h> // CLAMP
|
||||||
|
|
||||||
//TODO: probably a better flag to use here
|
#if !defined(CONFIG_ZMK_SPLIT) || defined(CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
|
||||||
#if(CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL)
|
|
||||||
#if CONFIG_MINIMAL_LIBC
|
#if CONFIG_MINIMAL_LIBC
|
||||||
static float powf(float base, float exponent) {
|
static float powf(float base, float exponent) {
|
||||||
// poor man's power implementation rounds the exponent down to the nearest integer.
|
// poor man's power implementation rounds the exponent down to the nearest integer.
|
||||||
|
@ -104,4 +103,4 @@ int zmk_mouse_tick_listener(const zmk_event_t *eh) {
|
||||||
ZMK_LISTENER(zmk_mouse_tick_listener, zmk_mouse_tick_listener);
|
ZMK_LISTENER(zmk_mouse_tick_listener, zmk_mouse_tick_listener);
|
||||||
ZMK_SUBSCRIPTION(zmk_mouse_tick_listener, zmk_mouse_tick);
|
ZMK_SUBSCRIPTION(zmk_mouse_tick_listener, zmk_mouse_tick);
|
||||||
|
|
||||||
#endif /* CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL */
|
#endif /* !defined(CONFIG_ZMK_SPLIT) || defined(CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL) */
|
Loading…
Add table
Reference in a new issue