extern "C" {\r
#endif\r
\r
- /* Public Interface - May be used in end-application: */ \r
+ /* Public Interface - May be used in end-application: */\r
+ /* Macros: */\r
+ #if defined(USE_SINGLE_DEVICE_CONFIGURATION)\r
+ #define TOTAL_NUM_CONFIGURATIONS 1\r
+ #endif\r
+ \r
+ /* Enums: */\r
+ #if !defined(USE_FLASH_DESCRIPTORS) && !defined(USE_EEPROM_DESCRIPTORS) && !defined(USE_RAM_DESCRIPTORS)\r
+ /** Enum for the possible descriptor memory spaces, for the MemoryAddressSpace of the\r
+ * \ref CALLBACK_USB_GetDescriptor() function. This can be used when none of the USE_*_DESCRIPTORS\r
+ * compile time options are used, to indicate in which memory space the descriptor is stored.\r
+ *\r
+ * \ingroup Group_Device\r
+ */\r
+ enum USB_DescriptorMemorySpaces_t\r
+ {\r
+ MEMSPACE_FLASH = 0, /**< Indicates the requested descriptor is located in FLASH memory */\r
+ MEMSPACE_EEPROM = 1, /**< Indicates the requested descriptor is located in EEPROM memory */\r
+ MEMSPACE_RAM = 2, /**< Indicates the requested descriptor is located in RAM memory */\r
+ };\r
+ #endif\r
+ \r
/* Global Variables: */\r
/** Indicates the currently set configuration number of the device. USB devices may have several\r
* different configurations which the host can select between; this indicates the currently selected\r
* value, or 0 if no configuration has been selected.\r
*\r
- * If a device has only one single configuration, the token USE_SINGLE_DEVICE_CONFIGURATION may be\r
- * defined in the project makefile and passed to the compiler using the -D switch. This optimize for\r
- * a single configuration, saving a small amount of space in the resulting compiled binary.\r
- *\r
* \note This variable should be treated as read-only in the user application, and never manually\r
* changed in value.\r
*\r
#if !defined(__DOXYGEN__)\r
#if defined(USE_RAM_DESCRIPTORS) && defined(USE_EEPROM_DESCRIPTORS)\r
#error USE_RAM_DESCRIPTORS and USE_EEPROM_DESCRIPTORS are mutually exclusive.\r
+ #elif defined(USE_RAM_DESCRIPTORS) && defined(USE_FLASH_DESCRIPTORS)\r
+ #error USE_RAM_DESCRIPTORS and USE_FLASH_DESCRIPTORS are mutually exclusive.\r
+ #elif defined(USE_FLASH_DESCRIPTORS) && defined(USE_EEPROM_DESCRIPTORS)\r
+ #error USE_FLASH_DESCRIPTORS and USE_EEPROM_DESCRIPTORS are mutually exclusive.\r
+ #elif defined(USE_FLASH_DESCRIPTORS) && defined(USE_EEPROM_DESCRIPTORS) && defined(USE_RAM_DESCRIPTORS)\r
+ #error Only one of the USE_*_DESCRIPTORS modes should be selected.\r
#endif\r
\r
/* Function Prototypes: */\r