From 181dae642f26918ccc4f544cc659fa8f37655d94 Mon Sep 17 00:00:00 2001 From: MiloradCvjetkovic Date: Tue, 8 Sep 2026 11:05:15 +0200 Subject: [PATCH 1/2] USB Host: minor robustness improvement --- Components/USB/Source/usbh_lib_core.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Components/USB/Source/usbh_lib_core.c b/Components/USB/Source/usbh_lib_core.c index 0e5415bb..7806ca5e 100644 --- a/Components/USB/Source/usbh_lib_core.c +++ b/Components/USB/Source/usbh_lib_core.c @@ -1,6 +1,6 @@ /*------------------------------------------------------------------------------ * MDK Middleware - Component ::USB:Host - * Copyright (c) 2004-2024 Arm Limited (or its affiliates). + * Copyright (c) 2004-2026 Arm Limited (or its affiliates). * All rights reserved. *------------------------------------------------------------------------------ * Name: usbh_lib_core.c @@ -1774,7 +1774,9 @@ usbStatus USBH_DeviceRequest_GetConfiguration (uint8_t device, uint8_t *ptr_conf usbStatus status; usbStatus mstatus; - EvrUSBH_Core_RequestGetConfiguration(device, *ptr_configuration); + if (ptr_configuration != NULL) { + EvrUSBH_Core_RequestGetConfiguration(device, *ptr_configuration); + } ctrl = usbh_dev[device].ctrl; status = CheckController (ctrl); @@ -1850,7 +1852,9 @@ usbStatus USBH_DeviceRequest_GetInterface (uint8_t device, uint8_t index, uint8_ usbStatus status; usbStatus mstatus; - EvrUSBH_Core_RequestGetInterface(device, index, *ptr_alternate); + if (ptr_alternate != NULL) { + EvrUSBH_Core_RequestGetInterface(device, index, *ptr_alternate); + } ctrl = usbh_dev[device].ctrl; status = CheckController (ctrl); From 756d1b7897c9c60f1a4070ba60a7ba1d8be0a588 Mon Sep 17 00:00:00 2001 From: MiloradCvjetkovic Date: Tue, 8 Sep 2026 11:07:13 +0200 Subject: [PATCH 2/2] USB Device: minor improvement to an internal function description --- Components/USB/Source/usbd_cmsis_rtos2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Components/USB/Source/usbd_cmsis_rtos2.c b/Components/USB/Source/usbd_cmsis_rtos2.c index 9e3e856c..ccb95775 100644 --- a/Components/USB/Source/usbd_cmsis_rtos2.c +++ b/Components/USB/Source/usbd_cmsis_rtos2.c @@ -1,6 +1,6 @@ /*------------------------------------------------------------------------------ * MDK Middleware - Component ::USB:Device - * Copyright (c) 2004-2024 Arm Limited (or its affiliates). All rights reserved. + * Copyright (c) 2004-2026 Arm Limited (or its affiliates). All rights reserved. *------------------------------------------------------------------------------ * Name: usbd_cmsis_rtos2.c * Purpose: USB Device (USBD) - RTOS abstraction implemented on CMSIS-RTOS2 @@ -824,7 +824,9 @@ static osRtxSemaphore_t usbd_hid_semaphore_cb_mem [USBD_HID_NUM] // Functions definition -/// \brief Create a thread +/// \brief Create a USB-specific thread +/// \details This function creates a USB thread as requested by the system. +/// The thread can be either a USB Core thread or a class-specific thread for handling class-specific endpoint events. /// \param[in] thread thread /// \param[in] index parameter dependent on thread (device index or class instance or endpoint index) /// \return