3 Copyright (C) Dean Camera, 2009.
5 dean [at] fourwalledcubicle [dot] com
6 www.fourwalledcubicle.com
10 Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
12 Permission to use, copy, modify, and distribute this software
13 and its documentation for any purpose and without fee is hereby
14 granted, provided that the above copyright notice appear in all
15 copies and that both that the copyright notice and this
16 permission notice and warranty disclaimer appear in supporting
17 documentation, and that the name of the author not be used in
18 advertising or publicity pertaining to distribution of the
19 software without specific, written prior permission.
21 The author disclaim all warranties with regard to this
22 software, including all implied warranties of merchantability
23 and fitness. In no event shall the author be liable for any
24 special, indirect or consequential damages or any damages
25 whatsoever resulting from loss of use, data or profits, whether
26 in an action of contract, negligence or other tortious action,
27 arising out of or in connection with the use or performance of
34 /* Private Interface - For use in library only: */
35 #if !defined(__DOXYGEN__)
37 #if ((defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || \
38 defined(__AVR_AT90USB162__) || defined(__AVR_AT90USB82__) || \
39 defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || \
40 defined(__AVR_ATmega32U6__)) && !defined(USB_DEVICE_ONLY))
41 #define USB_DEVICE_ONLY
44 #if (defined(__AVR_AT90USB162__) || defined(__AVR_AT90USB82__))
45 #define USB_LIMITED_CONTROLLER
46 #elif (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
47 #define USB_MODIFIED_FULL_CONTROLLER
49 #define USB_FULL_CONTROLLER
52 #if (!defined(USB_DEVICE_ONLY) && !defined(USB_HOST_ONLY))
53 #define USB_CAN_BE_BOTH
54 #define USB_CAN_BE_HOST
55 #define USB_CAN_BE_DEVICE
56 #elif defined(USB_HOST_ONLY)
57 #define USB_CAN_BE_HOST
58 #define USB_CurrentMode USB_MODE_HOST
59 #elif defined(USB_DEVICE_ONLY)
60 #define USB_CAN_BE_DEVICE
61 #define USB_CurrentMode USB_MODE_DEVICE
64 #if (defined(USB_HOST_ONLY) && defined(USB_DEVICE_ONLY))
65 #error USB_HOST_ONLY and USB_DEVICE_ONLY are mutually exclusive.
68 #if (defined(USE_RAM_DESCRIPTORS) && defined(USE_EEPROM_DESCRIPTORS))
69 #error USE_RAM_DESCRIPTORS and USE_EEPROM_DESCRIPTORS are mutually exclusive.
72 #if defined(USE_STATIC_OPTIONS)
73 #define USB_Options USE_STATIC_OPTIONS