From: arighi Date: Thu, 30 Sep 2010 14:57:24 +0000 (+0000) Subject: USB: make all USB strings as const X-Git-Tag: 2.6.0~10 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=12b52c42097e3f0144bac3c56d374b7a0666ab40;p=bertos.git USB: make all USB strings as const git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4391 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/drv/usbkbd.c b/bertos/drv/usbkbd.c index 02d1c7d9..6d9f40ff 100644 --- a/bertos/drv/usbkbd.c +++ b/bertos/drv/usbkbd.c @@ -183,18 +183,18 @@ static const UsbDescHeader *usb_hid_config[] = NULL, }; -static DEFINE_USB_STRING(language_str, "\x09\x04"); // Language ID: en_US -static DEFINE_USB_STRING(manufacturer_str, +static const DEFINE_USB_STRING(language_str, "\x09\x04"); // Language ID: en_US +static const DEFINE_USB_STRING(manufacturer_str, USB_STRING("B", "e", "R", "T", "O", "S")); -static DEFINE_USB_STRING(product_str, +static const DEFINE_USB_STRING(product_str, USB_STRING("U", "S", "B", " ", "K", "e", "y", "b", "o", "a", "r", "d")); static const UsbStringDesc *usb_hid_strings[] = { - (UsbStringDesc *)&language_str, - (UsbStringDesc *)&manufacturer_str, - (UsbStringDesc *)&product_str, + (const UsbStringDesc *)&language_str, + (const UsbStringDesc *)&manufacturer_str, + (const UsbStringDesc *)&product_str, NULL, }; diff --git a/bertos/drv/usbmouse.c b/bertos/drv/usbmouse.c index a562f582..b5f5a49d 100644 --- a/bertos/drv/usbmouse.c +++ b/bertos/drv/usbmouse.c @@ -172,17 +172,17 @@ static const UsbDescHeader *usb_hid_config[] = NULL, }; -static DEFINE_USB_STRING(language_str, "\x09\x04"); // Language ID: en_US -static DEFINE_USB_STRING(manufacturer_str, +static const DEFINE_USB_STRING(language_str, "\x09\x04"); // Language ID: en_US +static const DEFINE_USB_STRING(manufacturer_str, USB_STRING("B", "e", "R", "T", "O", "S")); -static DEFINE_USB_STRING(product_str, +static const DEFINE_USB_STRING(product_str, USB_STRING("U", "S", "B", " ", "M", "o", "u", "s", "e")); static const UsbStringDesc *usb_hid_strings[] = { - (UsbStringDesc *)&language_str, - (UsbStringDesc *)&manufacturer_str, - (UsbStringDesc *)&product_str, + (const UsbStringDesc *)&language_str, + (const UsbStringDesc *)&manufacturer_str, + (const UsbStringDesc *)&product_str, NULL, }; diff --git a/bertos/drv/usbser.c b/bertos/drv/usbser.c index 78444b13..da9750da 100644 --- a/bertos/drv/usbser.c +++ b/bertos/drv/usbser.c @@ -149,20 +149,20 @@ static const UsbDescHeader *usb_serial_config[] = NULL, }; -static DEFINE_USB_STRING(language_str, "\x09\x04"); // Language ID: en_US -static DEFINE_USB_STRING(manufacturer_str, +static const DEFINE_USB_STRING(language_str, "\x09\x04"); // Language ID: en_US +static const DEFINE_USB_STRING(manufacturer_str, USB_STRING("B", "e", "R", "T", "O", "S")); -static DEFINE_USB_STRING(product_str, +static const DEFINE_USB_STRING(product_str, USB_STRING("U", "S", "B", "-", "s", "e", "r", "i", "a", "l")); -static DEFINE_USB_STRING(serial_str, +static const DEFINE_USB_STRING(serial_str, USB_STRING("0", "0", "1")); static const UsbStringDesc *usb_serial_strings[] = { - (UsbStringDesc *)&language_str, - (UsbStringDesc *)&manufacturer_str, - (UsbStringDesc *)&product_str, - (UsbStringDesc *)&serial_str, + (const UsbStringDesc *)&language_str, + (const UsbStringDesc *)&manufacturer_str, + (const UsbStringDesc *)&product_str, + (const UsbStringDesc *)&serial_str, NULL, };