USB: make all USB strings as const
authorarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 30 Sep 2010 14:57:24 +0000 (14:57 +0000)
committerarighi <arighi@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 30 Sep 2010 14:57:24 +0000 (14:57 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4391 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/drv/usbkbd.c
bertos/drv/usbmouse.c
bertos/drv/usbser.c

index 02d1c7d9304b1f4d7c1b59e8df984102c1df8b99..6d9f40ffaee088a6898baef812125d370ff4d6cc 100644 (file)
@@ -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,
 };
 
index a562f58287feaa0da985811d9dd81298cbc92448..b5f5a49d3e104fc39611d4a7b1f17b5077e66cb6 100644 (file)
@@ -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,
 };
 
index 78444b136b66446e59087283b03844b838887421..da9750da46973b997504b788b9c55fd2c8f7558c 100644 (file)
@@ -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,
 };