projects
/
pub
/
lufa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add option to the USB XMEGAs to set the USB bus interrupt priority level.
[pub/lufa.git]
/
LUFA
/
Drivers
/
USB
/
Core
/
Device.h
diff --git
a/LUFA/Drivers/USB/Core/Device.h
b/LUFA/Drivers/USB/Core/Device.h
index
fdec1df
..
68e5e93
100644
(file)
--- a/
LUFA/Drivers/USB/Core/Device.h
+++ b/
LUFA/Drivers/USB/Core/Device.h
@@
-51,10
+51,16
@@
\r
/* Includes: */
\r
#include "../../../Common/Common.h"
\r
\r
/* Includes: */
\r
#include "../../../Common/Common.h"
\r
+ #include "USBMode.h"
\r
#include "StdDescriptors.h"
\r
#include "USBInterrupt.h"
\r
#include "Endpoint.h"
\r
\r
#include "StdDescriptors.h"
\r
#include "USBInterrupt.h"
\r
#include "Endpoint.h"
\r
\r
+ /* Enable C linkage for C++ Compilers: */
\r
+ #if defined(__cplusplus)
\r
+ extern "C" {
\r
+ #endif
\r
+
\r
/* Preprocessor Checks: */
\r
#if !defined(__INCLUDE_FROM_USB_DRIVER)
\r
#error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
\r
/* Preprocessor Checks: */
\r
#if !defined(__INCLUDE_FROM_USB_DRIVER)
\r
#error Do not include this file directly. Include LUFA/Drivers/USB/USB.h instead.
\r
@@
-62,6
+68,13
@@
\r
/* Public Interface - May be used in end-application: */
\r
/* Enums: */
\r
\r
/* Public Interface - May be used in end-application: */
\r
/* Enums: */
\r
+ /** Enum for the various states of the USB Device state machine. Only some states are
\r
+ * implemented in the LUFA library - other states are left to the user to implement.
\r
+ *
\r
+ * For information on each possible USB device state, refer to the USB 2.0 specification.
\r
+ *
\r
+ * \see \ref USB_DeviceState, which stores the current device state machine state.
\r
+ */
\r
enum USB_Device_States_t
\r
{
\r
DEVICE_STATE_Unattached = 0, /**< Internally implemented by the library. This state indicates
\r
enum USB_Device_States_t
\r
{
\r
DEVICE_STATE_Unattached = 0, /**< Internally implemented by the library. This state indicates
\r
@@
-106,7
+119,8
@@
* the address of the descriptor.
\r
* \param[out] MemoryAddressSpace A value from the \ref USB_DescriptorMemorySpaces_t enum to indicate the memory
\r
* space in which the descriptor is stored. This parameter does not exist when one
\r
* the address of the descriptor.
\r
* \param[out] MemoryAddressSpace A value from the \ref USB_DescriptorMemorySpaces_t enum to indicate the memory
\r
* space in which the descriptor is stored. This parameter does not exist when one
\r
- * of the \c USE_*_DESCRIPTORS compile time options is used.
\r
+ * of the \c USE_*_DESCRIPTORS compile time options is used, or on architectures which
\r
+ * use a unified address space.
\r
*
\r
* \note By default, the library expects all descriptors to be located in flash memory via the \c PROGMEM attribute.
\r
* If descriptors should be located in RAM or EEPROM instead (to speed up access in the case of RAM, or to
\r
*
\r
* \note By default, the library expects all descriptors to be located in flash memory via the \c PROGMEM attribute.
\r
* If descriptors should be located in RAM or EEPROM instead (to speed up access in the case of RAM, or to
\r
@@
-119,7
+133,8
@@
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
\r
const uint8_t wIndex,
\r
const void** const DescriptorAddress
\r
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
\r
const uint8_t wIndex,
\r
const void** const DescriptorAddress
\r
- #if !defined(USE_FLASH_DESCRIPTORS) && !defined(USE_EEPROM_DESCRIPTORS) && !defined(USE_RAM_DESCRIPTORS)
\r
+ #if (defined(ARCH_HAS_MULTI_ADDRESS_SPACE) || defined(__DOXYGEN__)) && \
\r
+ !(defined(USE_FLASH_DESCRIPTORS) || defined(USE_EEPROM_DESCRIPTORS) || defined(USE_RAM_DESCRIPTORS))
\r
, uint8_t* MemoryAddressSpace
\r
#endif
\r
) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
\r
, uint8_t* MemoryAddressSpace
\r
#endif
\r
) ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
\r
@@
-127,8
+142,15
@@
/* Architecture Includes: */
\r
#if (ARCH == ARCH_AVR8)
\r
#include "AVR8/Device_AVR8.h"
\r
/* Architecture Includes: */
\r
#if (ARCH == ARCH_AVR8)
\r
#include "AVR8/Device_AVR8.h"
\r
- #elif (ARCH == ARCH_UC3B)
\r
- #include "UC3B/Device_UC3B.h"
\r
+ #elif (ARCH == ARCH_UC3)
\r
+ #include "UC3/Device_UC3.h"
\r
+ #elif (ARCH == ARCH_XMEGA)
\r
+ #include "XMEGA/Device_XMEGA.h"
\r
+ #endif
\r
+
\r
+ /* Disable C linkage for C++ Compilers: */
\r
+ #if defined(__cplusplus)
\r
+ }
\r
#endif
\r
\r
#endif
\r
#endif
\r
\r
#endif
\r