projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update preset and fix for new name.
[bertos.git]
/
bertos
/
drv
/
usbmouse.c
diff --git
a/bertos/drv/usbmouse.c
b/bertos/drv/usbmouse.c
index b725a8f46c8a667fc095bc9201631a11c7c62367..ba468ca54aa74aa065e1ae8325242018f3e100fe 100644
(file)
--- a/
bertos/drv/usbmouse.c
+++ b/
bertos/drv/usbmouse.c
@@
-34,8
+34,13
@@
*
* \brief Generic USB mouse device driver.
*
*
* \brief Generic USB mouse device driver.
*
+ * notest: avr
+ * notest: arm
*/
*/
+#include "usb_hid.h"
+#include "usbmouse.h"
+
#include "cfg/cfg_usbmouse.h"
#define LOG_LEVEL USB_MOUSE_LOG_LEVEL
#include "cfg/cfg_usbmouse.h"
#define LOG_LEVEL USB_MOUSE_LOG_LEVEL
@@
-50,15
+55,14
@@
#include <cpu/power.h> // cpu_relax()
#include <drv/usb.h>
#include <cpu/power.h> // cpu_relax()
#include <drv/usb.h>
+#include <drv/usb_endpoint.h>
-#include "drv/usb_hid.h"
-#include "drv/usbmouse.h"
/*
* HID device configuration (usb-mouse)
*/
/*
* HID device configuration (usb-mouse)
*/
-#define USB_HID_VENDOR_ID
0xffff /* custom */
-#define USB_HID_PRODUCT_ID
0x0000
+#define USB_HID_VENDOR_ID
USB_MOUSE_VENDOR_ID
+#define USB_HID_PRODUCT_ID
USB_MOUSE_PRODUCT_ID
#define USB_HID_INTERFACES 1
#define USB_HID_ENDPOINTS 1
#define USB_HID_INTERFACES 1
#define USB_HID_ENDPOINTS 1
@@
-66,7
+70,7
@@
#define USB_STRING_MANUFACTURER 1
#define USB_STRING_PRODUCT 2
#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_MOUSE_EP_REPORT
)
static UsbDeviceDesc usb_hid_device_descriptor =
{
static UsbDeviceDesc usb_hid_device_descriptor =
{
@@
-171,17
+175,17
@@
static const UsbDescHeader *usb_hid_config[] =
NULL,
};
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"));
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[] =
{
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,
};
NULL,
};