Resolve compiler warnings.
This commit is contained in:
@@ -98,7 +98,7 @@ static uint8_t mouseSpeedAccelDivisorCounter = 0;
|
|||||||
static uint8_t mouseSpeed = 3;
|
static uint8_t mouseSpeed = 3;
|
||||||
static bool wasPreviousMouseActionWheelAction = false;
|
static bool wasPreviousMouseActionWheelAction = false;
|
||||||
|
|
||||||
static void handleMouseKey(usb_mouse_report_t *report, key_action_t key, const uint8_t *prevKeyStates, const uint8_t *currKeyStates, uint8_t keyId)
|
void HandleMouseKey(usb_mouse_report_t *report, key_action_t key, const uint8_t *prevKeyStates, const uint8_t *currKeyStates, uint8_t keyId)
|
||||||
{
|
{
|
||||||
if (!isKeyPressed(prevKeyStates, currKeyStates, keyId)) {
|
if (!isKeyPressed(prevKeyStates, currKeyStates, keyId)) {
|
||||||
return;
|
return;
|
||||||
@@ -172,7 +172,7 @@ void HandleKeyboardEvents(usb_keyboard_report_t *keyboardReport, usb_mouse_repor
|
|||||||
key_action_t code = getKeycode(slotId, keyId);
|
key_action_t code = getKeycode(slotId, keyId);
|
||||||
|
|
||||||
if (code.type == KEY_ACTION_MOUSE) {
|
if (code.type == KEY_ACTION_MOUSE) {
|
||||||
handleMouseKey(mouseReport, code, PreviousKeyStates[slotId], CurrentKeyStates[slotId], keyId);
|
HandleMouseKey(mouseReport, code, PreviousKeyStates[slotId], CurrentKeyStates[slotId], keyId);
|
||||||
} else {
|
} else {
|
||||||
if (handleKey(code, scancodeIdx, keyboardReport, PreviousKeyStates[slotId], CurrentKeyStates[slotId], keyId)) {
|
if (handleKey(code, scancodeIdx, keyboardReport, PreviousKeyStates[slotId], CurrentKeyStates[slotId], keyId)) {
|
||||||
scancodeIdx++;
|
scancodeIdx++;
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ typedef struct {
|
|||||||
};
|
};
|
||||||
} __attribute__ ((packed)) key_action_t;
|
} __attribute__ ((packed)) key_action_t;
|
||||||
|
|
||||||
|
void HandleMouseKey(usb_mouse_report_t *report, key_action_t key, const uint8_t *prevKeyStates, const uint8_t *currKeyStates, uint8_t keyId);
|
||||||
void HandleKeyboardEvents(usb_keyboard_report_t *keyboardReport, usb_mouse_report_t *mouseReport);
|
void HandleKeyboardEvents(usb_keyboard_report_t *keyboardReport, usb_mouse_report_t *mouseReport);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ static uint16_t readCompactLength(serialized_buffer_t *buffer) {
|
|||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
static const char *readString(serialized_buffer_t *buffer, uint16_t *len) {
|
static const char *readString(serialized_buffer_t *buffer, uint16_t *len) {
|
||||||
const char *str = (const char *)&(buffer->buffer[buffer->offset]);
|
const char *str = (const char *)&(buffer->buffer[buffer->offset]);
|
||||||
|
|
||||||
@@ -49,6 +50,7 @@ static const char *readString(serialized_buffer_t *buffer, uint16_t *len) {
|
|||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// ----------------
|
// ----------------
|
||||||
|
|
||||||
@@ -127,8 +129,8 @@ static void processSwitchLayerAction(key_action_t *action, serialized_buffer_t *
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void processSwitchKeymapAction(key_action_t *action, serialized_buffer_t *buffer) {
|
static void processSwitchKeymapAction(key_action_t *action, serialized_buffer_t *buffer) {
|
||||||
uint16_t len;
|
// uint16_t len;
|
||||||
const char *keymap = readString(buffer, &len);
|
// const char *keymap = readString(buffer, &len);
|
||||||
|
|
||||||
action->type = KEY_ACTION_SWITCH_KEYMAP;
|
action->type = KEY_ACTION_SWITCH_KEYMAP;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user