Skip to content

Commit e49d174

Browse files
ssnovercarlescufi
authored andcommitted
driver: usb: change function parameter name from class to base_class.
Change function parameter name in function usbd_device_set_code_triple from `class` to `base_class` as `class` is a keyword in C++. Signed-off-by: Shane Snover <[email protected]>
1 parent 47e4728 commit e49d174

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

include/zephyr/usb/usbd.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -703,16 +703,16 @@ int usbd_device_set_pid(struct usbd_contex *const uds_ctx,
703703
/**
704704
* @brief Set USB device descriptor code triple Base Class, SubClass, and Protocol
705705
*
706-
* @param[in] uds_ctx Pointer to USB device support context
707-
* @param[in] class bDeviceClass value
708-
* @param[in] subclass bDeviceSubClass value
709-
* @param[in] protocol bDeviceProtocol value
706+
* @param[in] uds_ctx Pointer to USB device support context
707+
* @param[in] base_class bDeviceClass value
708+
* @param[in] subclass bDeviceSubClass value
709+
* @param[in] protocol bDeviceProtocol value
710710
*
711711
* @return 0 on success, other values on fail.
712712
*/
713713
int usbd_device_set_code_triple(struct usbd_contex *const uds_ctx,
714-
const uint8_t class, const uint8_t subclass,
715-
const uint8_t protocol);
714+
const uint8_t base_class,
715+
const uint8_t subclass, const uint8_t protocol);
716716

717717
/**
718718
* @brief Setup USB device configuration attribute Remote Wakeup

subsys/usb/device_next/usbd_device.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ int usbd_device_set_pid(struct usbd_contex *const uds_ctx,
8181
}
8282

8383
int usbd_device_set_code_triple(struct usbd_contex *const uds_ctx,
84-
const uint8_t class, const uint8_t subclass,
85-
const uint8_t protocol)
84+
const uint8_t base_class,
85+
const uint8_t subclass, const uint8_t protocol)
8686
{
8787
struct usb_device_descriptor *desc = uds_ctx->desc;
8888
int ret = 0;
@@ -94,7 +94,7 @@ int usbd_device_set_code_triple(struct usbd_contex *const uds_ctx,
9494
goto set_code_triple_exit;
9595
}
9696

97-
desc->bDeviceClass = class;
97+
desc->bDeviceClass = base_class;
9898
desc->bDeviceSubClass = subclass;
9999
desc->bDeviceProtocol = protocol;
100100

0 commit comments

Comments
 (0)