From eab3add3c5c94da9c92d00aeeaf7e396c7ce8969 Mon Sep 17 00:00:00 2001 From: arighi Date: Wed, 13 Oct 2010 11:00:22 +0000 Subject: [PATCH] USB: integrate vendor and product ID configuration in the wizard git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4424 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cfg/cfg_usbkbd.h | 14 ++++++++++++++ bertos/cfg/cfg_usbmouse.h | 14 ++++++++++++++ bertos/cfg/cfg_usbser.h | 14 ++++++++++++++ bertos/drv/usbkbd.c | 4 ++-- bertos/drv/usbmouse.c | 4 ++-- bertos/drv/usbser.c | 4 ++-- 6 files changed, 48 insertions(+), 6 deletions(-) diff --git a/bertos/cfg/cfg_usbkbd.h b/bertos/cfg/cfg_usbkbd.h index 967b541f..5b6fb65a 100644 --- a/bertos/cfg/cfg_usbkbd.h +++ b/bertos/cfg/cfg_usbkbd.h @@ -61,4 +61,18 @@ */ #define USB_KEYBOARD_LOG_FORMAT LOG_FMT_TERSE +/** + * USB vendor ID (please change this in your project, using a valid ID number!). + * + * $WIZ$ type = "hex" + */ +#define USB_KEYBOARD_VENDOR_ID 0x046d + +/** + * USB product ID (please change this in your project, using a valid ID number!). + * + * $WIZ$ type = "hex" + */ +#define USB_KEYBOARD_PRODUCT_ID 0xffff + #endif /* CFG_USB_KEYBOARD_H */ diff --git a/bertos/cfg/cfg_usbmouse.h b/bertos/cfg/cfg_usbmouse.h index 89ff4c53..73143284 100644 --- a/bertos/cfg/cfg_usbmouse.h +++ b/bertos/cfg/cfg_usbmouse.h @@ -61,4 +61,18 @@ */ #define USB_MOUSE_LOG_FORMAT LOG_FMT_TERSE +/** + * USB vendor ID (please change this in your project, using a valid ID number!). + * + * $WIZ$ type = "hex" + */ +#define USB_MOUSE_VENDOR_ID 0xffff + +/** + * USB product ID (please change this in your project, using a valid ID number!). + * + * $WIZ$ type = "hex" + */ +#define USB_MOUSE_PRODUCT_ID 0x0000 + #endif /* CFG_USBMOUSE_H */ diff --git a/bertos/cfg/cfg_usbser.h b/bertos/cfg/cfg_usbser.h index 6e47012a..1fa44e73 100644 --- a/bertos/cfg/cfg_usbser.h +++ b/bertos/cfg/cfg_usbser.h @@ -61,4 +61,18 @@ */ #define USB_SERIAL_LOG_FORMAT LOG_FMT_TERSE +/** + * USB vendor ID (please change this in your project, using a valid ID number!). + * + * $WIZ$ type = "hex" + */ +#define USB_SERIAL_VENDOR_ID 0x05f9 + +/** + * USB product ID (please change this in your project, using a valid ID number!). + * + * $WIZ$ type = "hex" + */ +#define USB_SERIAL_PRODUCT_ID 0xffff + #endif /* CFG_USBSER_H */ diff --git a/bertos/drv/usbkbd.c b/bertos/drv/usbkbd.c index 6d9f40ff..3cf552d0 100644 --- a/bertos/drv/usbkbd.c +++ b/bertos/drv/usbkbd.c @@ -58,8 +58,8 @@ /* * HID device configuration (usb-keyboard) */ -#define USB_HID_VENDOR_ID 0xffff /* custom */ -#define USB_HID_PRODUCT_ID 0x0000 +#define USB_HID_VENDOR_ID USB_KEYBOARD_VENDOR_ID +#define USB_HID_PRODUCT_ID USB_KEYBOARD_PRODUCT_ID #define USB_HID_INTERFACES 1 #define USB_HID_ENDPOINTS 1 diff --git a/bertos/drv/usbmouse.c b/bertos/drv/usbmouse.c index b5f5a49d..dd1708b0 100644 --- a/bertos/drv/usbmouse.c +++ b/bertos/drv/usbmouse.c @@ -58,8 +58,8 @@ /* * 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 diff --git a/bertos/drv/usbser.c b/bertos/drv/usbser.c index da9750da..00377d12 100644 --- a/bertos/drv/usbser.c +++ b/bertos/drv/usbser.c @@ -58,8 +58,8 @@ #include "drv/usbser.h" -#define USB_SERIAL_VENDOR_ID 0x05f9 -#define USB_SERIAL_PRODUCT_ID 0xffff +#define USB_SERIAL_VENDOR_ID USB_SERIAL_VENDOR_ID +#define USB_SERIAL_PRODUCT_ID USB_SERIAL_PRODUCT_ID #define USB_SERIAL_INTERFACES 1 #define USB_SERIAL_ENDPOINTS 3 -- 2.25.1