Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Components/USB/Include/rl_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ extern "C" {
/// Status code values returned by USB library functions.
typedef enum {
usbOK = 0U, ///< Function completed with no error
usbTimeout, ///< Function completed; time-out occurred
usbTimeout, ///< Function timed out
usbInvalidParameter, ///< Invalid Parameter error: a mandatory parameter was missing or specified an incorrect object
usbThreadError = 0x10U, ///< CMSIS-RTOS Thread creation/termination failed
usbTimerError, ///< CMSIS-RTOS Timer creation/deletion failed
usbSemaphoreError, ///< CMSIS-RTOS Semaphore creation failed
usbMutexError, ///< CMSIS-RTOS Mutex creation failed
usbSemaphoreError, ///< CMSIS-RTOS Semaphore creation/acquisition/release/deletion failed
usbMutexError, ///< CMSIS-RTOS Mutex creation/acquisition/release/deletion failed
usbControllerError = 0x20U, ///< Controller does not exist
usbDeviceError, ///< Device does not exist
usbDriverError, ///< Driver function produced error
Expand Down Expand Up @@ -2314,7 +2314,7 @@ extern usbStatus USBD_HID_Uninitialize (uint8_t instance);
extern void USBD_HID_Reset (uint8_t instance);
extern void USBD_HID_SetConfiguration (uint8_t instance);
extern void USBD_HID_EndpointStart (uint8_t instance, uint8_t ep_addr);
extern void USBD_HID_Timer (void const *argument);
extern void USBD_HID_Timer (void *argument);

extern usbStatus USBD_MSC_Initialize (uint8_t instance);
extern usbStatus USBD_MSC_Uninitialize (uint8_t instance);
Expand Down
18 changes: 9 additions & 9 deletions Components/USB/Script/Headers/usbd_config_def_x.h
Original file line number Diff line number Diff line change
@@ -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_config_def_$x.h
* Purpose: USB Device (USBD) - Device $x Definitions
Expand Down Expand Up @@ -5641,8 +5641,8 @@
#define USBD_CDC4_RNDIS (USBD$x_CDC4_RNDIS)
#define USBD_CDC4_IF0_NUM (USBD$x_CUSTOM_CLASS_IF_CNT+USBD$x_ADC_IF_CNT+USBD$x_CDC0_IF_CNT+USBD$x_CDC1_IF_CNT+USBD$x_CDC2_IF_CNT+USBD$x_CDC3_IF_CNT)
#define USBD_CDC4_IF1_NUM (USBD_CDC4_IF0_NUM+1)
#define USBD_CDC4_IF_CNT (USBD$x_CDC3_IF_CNT)
#define USBD_CDC4_EP_CNT (USBD$x_CDC3_EP_CNT)
#define USBD_CDC4_IF_CNT (USBD$x_CDC4_IF_CNT)
#define USBD_CDC4_EP_CNT (USBD$x_CDC4_EP_CNT)
#define USBD_CDC4_IF0_STR_IDX (USBD$x_DEV_STR_CNT+USBD$x_CUSTOM_CLASS_STR_CNT+USBD$x_ADC_STR_CNT+USBD$x_CDC0_STR_CNT+USBD$x_CDC1_STR_CNT+USBD$x_CDC2_STR_CNT+USBD$x_CDC3_STR_CNT)
#define USBD_CDC4_IF1_STR_IDX (USBD_CDC4_IF0_STR_IDX+1)
#define USBD_CDC4_IMAC_STR_IDX (USBD_CDC4_IF0_STR_IDX+2)
Expand Down Expand Up @@ -5871,8 +5871,8 @@
#define USBD_CDC5_RNDIS (USBD$x_CDC5_RNDIS)
#define USBD_CDC5_IF0_NUM (USBD$x_CUSTOM_CLASS_IF_CNT+USBD$x_ADC_IF_CNT+USBD$x_CDC0_IF_CNT+USBD$x_CDC1_IF_CNT+USBD$x_CDC2_IF_CNT+USBD$x_CDC3_IF_CNT+USBD$x_CDC4_IF_CNT)
#define USBD_CDC5_IF1_NUM (USBD_CDC5_IF0_NUM+1)
#define USBD_CDC5_IF_CNT (USBD$x_CDC3_IF_CNT)
#define USBD_CDC5_EP_CNT (USBD$x_CDC3_EP_CNT)
#define USBD_CDC5_IF_CNT (USBD$x_CDC5_IF_CNT)
#define USBD_CDC5_EP_CNT (USBD$x_CDC5_EP_CNT)
#define USBD_CDC5_IF0_STR_IDX (USBD$x_DEV_STR_CNT+USBD$x_CUSTOM_CLASS_STR_CNT+USBD$x_ADC_STR_CNT+USBD$x_CDC0_STR_CNT+USBD$x_CDC1_STR_CNT+USBD$x_CDC2_STR_CNT+USBD$x_CDC3_STR_CNT+USBD$x_CDC4_STR_CNT)
#define USBD_CDC5_IF1_STR_IDX (USBD_CDC5_IF0_STR_IDX+1)
#define USBD_CDC5_IMAC_STR_IDX (USBD_CDC5_IF0_STR_IDX+2)
Expand Down Expand Up @@ -6101,8 +6101,8 @@
#define USBD_CDC6_RNDIS (USBD$x_CDC6_RNDIS)
#define USBD_CDC6_IF0_NUM (USBD$x_CUSTOM_CLASS_IF_CNT+USBD$x_ADC_IF_CNT+USBD$x_CDC0_IF_CNT+USBD$x_CDC1_IF_CNT+USBD$x_CDC2_IF_CNT+USBD$x_CDC3_IF_CNT+USBD$x_CDC4_IF_CNT+USBD$x_CDC5_IF_CNT)
#define USBD_CDC6_IF1_NUM (USBD_CDC6_IF0_NUM+1)
#define USBD_CDC6_IF_CNT (USBD$x_CDC3_IF_CNT)
#define USBD_CDC6_EP_CNT (USBD$x_CDC3_EP_CNT)
#define USBD_CDC6_IF_CNT (USBD$x_CDC6_IF_CNT)
#define USBD_CDC6_EP_CNT (USBD$x_CDC6_EP_CNT)
#define USBD_CDC6_IF0_STR_IDX (USBD$x_DEV_STR_CNT+USBD$x_CUSTOM_CLASS_STR_CNT+USBD$x_ADC_STR_CNT+USBD$x_CDC0_STR_CNT+USBD$x_CDC1_STR_CNT+USBD$x_CDC2_STR_CNT+USBD$x_CDC3_STR_CNT+USBD$x_CDC4_STR_CNT+USBD$x_CDC5_STR_CNT)
#define USBD_CDC6_IF1_STR_IDX (USBD_CDC6_IF0_STR_IDX+1)
#define USBD_CDC6_IMAC_STR_IDX (USBD_CDC6_IF0_STR_IDX+2)
Expand Down Expand Up @@ -6331,8 +6331,8 @@
#define USBD_CDC7_RNDIS (USBD$x_CDC7_RNDIS)
#define USBD_CDC7_IF0_NUM (USBD$x_CUSTOM_CLASS_IF_CNT+USBD$x_ADC_IF_CNT+USBD$x_CDC0_IF_CNT+USBD$x_CDC1_IF_CNT+USBD$x_CDC2_IF_CNT+USBD$x_CDC3_IF_CNT+USBD$x_CDC4_IF_CNT+USBD$x_CDC5_IF_CNT+USBD$x_CDC6_IF_CNT)
#define USBD_CDC7_IF1_NUM (USBD_CDC7_IF0_NUM+1)
#define USBD_CDC7_IF_CNT (USBD$x_CDC3_IF_CNT)
#define USBD_CDC7_EP_CNT (USBD$x_CDC3_EP_CNT)
#define USBD_CDC7_IF_CNT (USBD$x_CDC7_IF_CNT)
#define USBD_CDC7_EP_CNT (USBD$x_CDC7_EP_CNT)
#define USBD_CDC7_IF0_STR_IDX (USBD$x_DEV_STR_CNT+USBD$x_CUSTOM_CLASS_STR_CNT+USBD$x_ADC_STR_CNT+USBD$x_CDC0_STR_CNT+USBD$x_CDC1_STR_CNT+USBD$x_CDC2_STR_CNT+USBD$x_CDC3_STR_CNT+USBD$x_CDC4_STR_CNT+USBD$x_CDC5_STR_CNT+USBD$x_CDC6_STR_CNT)
#define USBD_CDC7_IF1_STR_IDX (USBD_CDC7_IF0_STR_IDX+1)
#define USBD_CDC7_IMAC_STR_IDX (USBD_CDC7_IF0_STR_IDX+2)
Expand Down
3 changes: 2 additions & 1 deletion Components/USB/Source/usb_lib_ver.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*------------------------------------------------------------------------------
* MDK Middleware - Component ::USB:Common
* 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: usb_lib_ver.c
* Purpose: USB Common Device/Host - Version module
Expand All @@ -9,5 +9,6 @@
#include <stdint.h>

#include "rl_usb.h"
#include "usb_lib_ver.h"

const uint32_t usb_lib_version = MW_USB_VERSION;
18 changes: 8 additions & 10 deletions Components/USB/Source/usbd_cmsis_rtos2.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@

#include "usbd_compatibility.h"

#include "usbd_lib_core.h"
#include "usbd_lib_adc.h"
#include "usbd_lib_cdc.h"
#include "usbd_lib_custom_class.h"
#include "usbd_lib_hid.h"
#include "usbd_lib_msc.h"

// Local structure definitions
typedef struct {
uint32_t stack_size; // size of thread stack
Expand All @@ -20,15 +27,6 @@ typedef struct {

// Resources definition

// Import thread function prototypes
extern void USBD_Core_Thread (void *arg);
extern void USBD_ADC_Thread (void *arg);
extern void USBD_CDC_Int_Thread (void *arg);
extern void USBD_CDC_Bulk_Thread (void *arg);
extern void USBD_HID_Thread (void *arg);
extern void USBD_MSC_Thread (void *arg);
extern void USBD_CustomClass_EP_Thread (void *arg);

// Import thread definitions generated by each Device instance
// in usbd_config_dev_n.c file (n = 0 .. 3)
#ifdef RTE_USB_Device_0
Expand Down Expand Up @@ -1031,7 +1029,7 @@ void *USBD_TimerCreate (uint8_t instance) {
timer_attr.cb_mem = &usbd_hid_timer_cb_mem[instance];
timer_attr.cb_size = sizeof(osRtxTimer_t);
#endif
return ((void *)osTimerNew ((osTimerFunc_t)USBD_HID_Timer, osTimerPeriodic, (void *)((uint32_t)instance), &timer_attr));
return ((void *)osTimerNew (USBD_HID_Timer, osTimerPeriodic, (void *)((uint32_t)instance), &timer_attr));
#else
(void)instance;
return NULL;
Expand Down
Loading
Loading