4 * \brief USB configuration file
6 * Copyright (c) 2009-2015 Atmel Corporation. All rights reserved.
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions are met:
15 * 1. Redistributions of source code must retain the above copyright notice,
16 * this list of conditions and the following disclaimer.
18 * 2. Redistributions in binary form must reproduce the above copyright notice,
19 * this list of conditions and the following disclaimer in the documentation
20 * and/or other materials provided with the distribution.
22 * 3. The name of Atmel may not be used to endorse or promote products derived
23 * from this software without specific prior written permission.
25 * 4. This software may only be redistributed and used in connection with an
26 * Atmel microcontroller product.
28 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
29 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
30 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
31 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
32 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
36 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
37 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 * POSSIBILITY OF SUCH DAMAGE.
44 * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
51 #include "udi_device_conf.h"
53 #define UDI_CDC_DEFAULT_RATE 115200
54 #define UDI_CDC_DEFAULT_STOPBITS CDC_STOP_BITS_1
55 #define UDI_CDC_DEFAULT_PARITY CDC_PAR_NONE
56 #define UDI_CDC_DEFAULT_DATABITS 8
58 //! Device definition (mandatory)
59 #define USB_DEVICE_VENDOR_ID VENDOR_ID
60 #define USB_DEVICE_PRODUCT_ID PRODUCT_ID
61 #define USB_DEVICE_VERSION DEVICE_VER
62 #define USB_DEVICE_POWER 500 // Consumption on Vbus line (mA)
63 #define USB_DEVICE_ATTR (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
64 // (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_BUS_POWERED)
65 // (USB_CONFIG_ATTR_REMOTE_WAKEUP|USB_CONFIG_ATTR_SELF_POWERED)
66 // (USB_CONFIG_ATTR_SELF_POWERED)
67 // (USB_CONFIG_ATTR_BUS_POWERED)
69 //! USB Device string definitions (Optional)
70 #define USB_DEVICE_MANUFACTURE_NAME MANUFACTURER
71 #define USB_DEVICE_PRODUCT_NAME PRODUCT
72 #define USB_DEVICE_SERIAL_NAME SERIAL_NUM
74 //Comment out USB_DEVICE_SERIAL_USE_BOOTLOADER_SERIAL to prevent ROM lookup of factory programmed serial number
75 #define USB_DEVICE_SERIAL_USE_BOOTLOADER_SERIAL
78 * Device speeds support
81 //! To define a Low speed device
82 //#define USB_DEVICE_LOW_SPEED
84 //! To authorize the High speed
86 //#define USB_DEVICE_HS_SUPPORT
88 //#define USB_DEVICE_HS_SUPPORT
93 * USB Device Callbacks definitions (Optional)
96 #define UDC_VBUS_EVENT(b_vbus_high)
97 #define UDC_SOF_EVENT() main_sof_action()
98 #define UDC_SUSPEND_EVENT() main_suspend_action()
99 #define UDC_RESUME_EVENT() main_resume_action()
100 //! Mandatory when USB_DEVICE_ATTR authorizes remote wakeup feature
101 #define UDC_REMOTEWAKEUP_ENABLE() main_remotewakeup_enable()
102 #define UDC_REMOTEWAKEUP_DISABLE() main_remotewakeup_disable()
103 //! When a extra string descriptor must be supported
104 //! other than manufacturer, product and serial string
105 // #define UDC_GET_EXTRA_STRING()
112 * USB Interface Configuration
116 * Configuration of HID Keyboard interface
119 //! Interface callback definition
121 #define UDI_HID_KBD_ENABLE_EXT() main_kbd_enable()
122 #define UDI_HID_KBD_DISABLE_EXT() main_kbd_disable()
123 //#define UDI_HID_KBD_CHANGE_LED(value) ui_kbd_led(value)
127 #define UDI_HID_NKRO_ENABLE_EXT() main_nkro_enable()
128 #define UDI_HID_NKRO_DISABLE_EXT() main_nkro_disable()
129 //#define UDI_HID_NKRO_CHANGE_LED(value) ui_kbd_led(value)
133 #define UDI_HID_EXK_ENABLE_EXT() main_exk_enable()
134 #define UDI_HID_EXK_DISABLE_EXT() main_exk_disable()
138 #define UDI_HID_MOU_ENABLE_EXT() main_mou_enable()
139 #define UDI_HID_MOU_DISABLE_EXT() main_mou_disable()
143 #define UDI_HID_RAW_ENABLE_EXT() main_raw_enable()
144 #define UDI_HID_RAW_DISABLE_EXT() main_raw_disable()
153 * USB Device Driver Configuration
158 //! The includes of classes and other headers must be done at the end of this file to avoid compile error
159 #include "udi_hid_kbd_conf.h"
160 #include "usb_main.h"
163 #endif // _CONF_USB_H_