USB: make all USB strings as const
[bertos.git] / bertos / drv / usbkbd.c
index 24608770c91fbad5ff168de67239254e5d9274a8..6d9f40ffaee088a6898baef812125d370ff4d6cc 100644 (file)
@@ -50,6 +50,7 @@
 #include <cpu/power.h> // cpu_relax()
 
 #include <drv/usb.h>
+#include <drv/usb_endpoint.h>
 
 #include "drv/usb_hid.h"
 #include "drv/usbkbd.h"
@@ -66,7 +67,7 @@
 #define USB_STRING_MANUFACTURER 1
 #define USB_STRING_PRODUCT     2
 
-#define USB_HID_REPORT_EP      (USB_DIR_IN | 1)
+#define USB_HID_REPORT_EP      (USB_DIR_IN | USB_KBD_EP_REPORT)
 
 static UsbDeviceDesc usb_hid_device_descriptor =
 {
@@ -182,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,
 };