From eaf29f1e394afa4e1c2bfe71659f95f507191d7e Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sun, 1 May 2022 22:43:04 +0100 Subject: [PATCH] Mark keyboard reports passed to process_usb_keyboard_report() as const. --- system/usbhcd.c | 2 +- system/usbhcd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/system/usbhcd.c b/system/usbhcd.c index fdae1d3..cb50b1b 100644 --- a/system/usbhcd.c +++ b/system/usbhcd.c @@ -679,7 +679,7 @@ bool find_attached_usb_keyboards(const usb_hcd_t *hcd, const usb_hub_t *hub, int return keyboard_found; } -bool process_usb_keyboard_report(const usb_hcd_t *hcd, hid_kbd_rpt_t *report, hid_kbd_rpt_t *prev_report) +bool process_usb_keyboard_report(const usb_hcd_t *hcd, const hid_kbd_rpt_t *report, const hid_kbd_rpt_t *prev_report) { hcd_workspace_t *ws = hcd->ws; diff --git a/system/usbhcd.h b/system/usbhcd.h index 1e98958..3d1fc29 100644 --- a/system/usbhcd.h +++ b/system/usbhcd.h @@ -274,7 +274,7 @@ bool find_attached_usb_keyboards(const usb_hcd_t *hcd, const usb_hub_t *hub, int * * Used internally by the various HCI drivers. */ -bool process_usb_keyboard_report(const usb_hcd_t *hcd, hid_kbd_rpt_t *report, hid_kbd_rpt_t *prev_report); +bool process_usb_keyboard_report(const usb_hcd_t *hcd, const hid_kbd_rpt_t *report, const hid_kbd_rpt_t *prev_report); /** * Scans the attached USB devices and initialises all HID keyboard devices