From 1b1b1a025da27f8f9c7af85b3fe28aadf0022ef2 Mon Sep 17 00:00:00 2001 From: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com> Date: Tue, 12 Sep 2023 14:30:08 +0900 Subject: [PATCH] usbdev: Fix build error with BOARD_USBDEV_SERIALSTR --- drivers/usbdev/composite.c | 4 ++++ drivers/usbdev/composite.h | 7 +++++++ drivers/usbdev/composite_desc.c | 7 ------- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/usbdev/composite.c b/drivers/usbdev/composite.c index 87e1ce8919..306cc40a64 100644 --- a/drivers/usbdev/composite.c +++ b/drivers/usbdev/composite.c @@ -38,6 +38,10 @@ #include #include +#ifdef CONFIG_BOARD_USBDEV_SERIALSTR +# include +#endif + #include "composite.h" /**************************************************************************** diff --git a/drivers/usbdev/composite.h b/drivers/usbdev/composite.h index ec885f87b4..859e3e2411 100644 --- a/drivers/usbdev/composite.h +++ b/drivers/usbdev/composite.h @@ -50,6 +50,13 @@ #define COMPOSITE_CONFIGIDNONE (0) /* Config ID = 0 means to return to address mode */ #define COMPOSITE_CONFIGID (1) /* The only supported configuration ID */ +/* Descriptor strings */ + +#define COMPOSITE_MANUFACTURERSTRID (1) +#define COMPOSITE_PRODUCTSTRID (2) +#define COMPOSITE_SERIALSTRID (3) +#define COMPOSITE_CONFIGSTRID (4) + /**************************************************************************** * Public Types ****************************************************************************/ diff --git a/drivers/usbdev/composite_desc.c b/drivers/usbdev/composite_desc.c index 80ab316ec2..a5f959a271 100644 --- a/drivers/usbdev/composite_desc.c +++ b/drivers/usbdev/composite_desc.c @@ -93,13 +93,6 @@ #define COMPOSITE_STR_LANGUAGE (0x0409) /* en-us */ -/* Descriptor strings */ - -#define COMPOSITE_MANUFACTURERSTRID (1) -#define COMPOSITE_PRODUCTSTRID (2) -#define COMPOSITE_SERIALSTRID (3) -#define COMPOSITE_CONFIGSTRID (4) - /**************************************************************************** * Private Data ****************************************************************************/