From 41239fa43fc28123a352a86677d7bfc4a09673a5 Mon Sep 17 00:00:00 2001 From: sakumisu <1203593632@qq.com> Date: Thu, 18 Aug 2022 21:49:15 +0800 Subject: [PATCH] modify keyboard macro --- demo/hid_custom_inout_template.c | 2 +- demo/hid_keyboard_template.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/hid_custom_inout_template.c b/demo/hid_custom_inout_template.c index 5dca2b61..c8f8a717 100644 --- a/demo/hid_custom_inout_template.c +++ b/demo/hid_custom_inout_template.c @@ -227,7 +227,7 @@ void hid_custom_keyboard_init(void) void hid_custom_test(void) { - uint8_t sendbuffer[64] = { 0x00, 0x00, HID_KEY_A, 0x00, 0x00, 0x00, 0x00, 0x00 }; + uint8_t sendbuffer[64] = { 0x00, 0x00, HID_KBD_USAGE_A, 0x00, 0x00, 0x00, 0x00, 0x00 }; custom_state = HID_STATE_BUSY; usbd_ep_start_write(HIDRAW_IN_EP, sendbuffer, 8); while (custom_state == HID_STATE_BUSY) { diff --git a/demo/hid_keyboard_template.c b/demo/hid_keyboard_template.c index b477c781..fc8387ea 100644 --- a/demo/hid_keyboard_template.c +++ b/demo/hid_keyboard_template.c @@ -213,7 +213,7 @@ void hid_keyboard_init(void) void hid_keyboard_test(void) { - uint8_t sendbuffer[8] = { 0x00, 0x00, HID_KEY_A, 0x00, 0x00, 0x00, 0x00, 0x00 }; //A + uint8_t sendbuffer[8] = { 0x00, 0x00, HID_KBD_USAGE_A, 0x00, 0x00, 0x00, 0x00, 0x00 }; //A hid_state = HID_STATE_BUSY; usbd_ep_start_write(HID_INT_EP, sendbuffer, 8); while (hid_state == HID_STATE_BUSY) {