/** \file\r
*\r
* Standard USB device descriptor defines and retrieval routines, for USB devices. This module contains\r
- * strucutures and macros for the easy creation of standard USB descriptors in USB device projects.\r
+ * structures and macros for the easy creation of standard USB descriptors in USB device projects.\r
*\r
* All standard descriptors have their elements named in an identical manner to the official USB specification,\r
* however slightly more verbose alternate (non-standard) names are also supplied if the macro\r
#include <stdbool.h>\r
\r
#include "../../../Common/Common.h"\r
- #include "../LowLevel/USBMode.h"\r
+ #include "USBMode.h"\r
#include "Events.h"\r
\r
#if defined(USB_CAN_BE_DEVICE)\r
* descriptor's ConfigAttributes value to indicate that the specified configuration can draw its power\r
* from the host's VBUS line.\r
*/\r
- #define USB_CONFIG_ATTR_BUSPOWERED 0b10000000\r
+ #define USB_CONFIG_ATTR_BUSPOWERED 0x80\r
\r
/** Can be masked with other configuration descriptor attributes for a USB_Descriptor_Configuration_Header_t\r
* descriptor's ConfigAttributes value to indicate that the specified configuration can draw its power\r
* from the device's own power source.\r
*/\r
- #define USB_CONFIG_ATTR_SELFPOWERED 0b11000000\r
+ #define USB_CONFIG_ATTR_SELFPOWERED 0xC0\r
\r
/** Can be masked with other configuration descriptor attributes for a USB_Descriptor_Configuration_Header_t\r
* descriptor's ConfigAttributes value to indicate that the specified configuration supports the\r
* remote wakeup feature of the USB standard, allowing a suspended USB device to wake up the host upon\r
* request.\r
*/\r
- #define USB_CONFIG_ATTR_REMOTEWAKEUP 0b10100000\r
+ #define USB_CONFIG_ATTR_REMOTEWAKEUP 0xA0\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's\r
* Attributes value to indicate that the specified endpoint is not synchronized.\r
*\r
* \see The USB specification for more details on the possible Endpoint attributes.\r
*/\r
- #define ENDPOINT_ATTR_NO_SYNC (0b00 << 2)\r
+ #define ENDPOINT_ATTR_NO_SYNC (0 << 2)\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's\r
* Attributes value to indicate that the specified endpoint is asynchronous.\r
*\r
* \see The USB specification for more details on the possible Endpoint attributes.\r
*/\r
- #define ENDPOINT_ATTR_ASYNC (0b01 << 2)\r
+ #define ENDPOINT_ATTR_ASYNC (1 << 2)\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's\r
* Attributes value to indicate that the specified endpoint is adaptive.\r
*\r
* \see The USB specification for more details on the possible Endpoint attributes.\r
*/\r
- #define ENDPOINT_ATTR_ADAPTIVE (0b10 << 2)\r
+ #define ENDPOINT_ATTR_ADAPTIVE (2 << 2)\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's\r
* Attributes value to indicate that the specified endpoint is synchronized.\r
*\r
* \see The USB specification for more details on the possible Endpoint attributes.\r
*/\r
- #define ENDPOINT_ATTR_SYNC (0b11 << 2)\r
+ #define ENDPOINT_ATTR_SYNC (3 << 2)\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's\r
* Attributes value to indicate that the specified endpoint is used for data transfers.\r
*\r
* \see The USB specification for more details on the possible Endpoint usage attributes.\r
*/\r
- #define ENDPOINT_USAGE_DATA (0b00 << 4)\r
+ #define ENDPOINT_USAGE_DATA (0 << 4)\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's\r
* Attributes value to indicate that the specified endpoint is used for feedback.\r
*\r
* \see The USB specification for more details on the possible Endpoint usage attributes.\r
*/\r
- #define ENDPOINT_USAGE_FEEDBACK (0b01 << 4)\r
+ #define ENDPOINT_USAGE_FEEDBACK (1 << 4)\r
\r
/** Can be masked with other endpoint descriptor attributes for a USB_Descriptor_Endpoint_t descriptor's\r
* Attributes value to indicate that the specified endpoint is used for implicit feedback.\r
*\r
* \see The USB specification for more details on the possible Endpoint usage attributes.\r
*/\r
- #define ENDPOINT_USAGE_IMPLICIT_FEEDBACK (0b10 << 4)\r
+ #define ENDPOINT_USAGE_IMPLICIT_FEEDBACK (2 << 4)\r
\r
/** Gives a void pointer to the specified descriptor (of any type). */\r
#define DESCRIPTOR_ADDRESS(Descriptor) ((void*)&Descriptor)\r
uint16_t ReleaseNumber; /**< Product release (version) number. */\r
\r
uint8_t ManufacturerStrIndex; /**< String index for the manufacturer's name. The\r
- * host will request this string via a seperate\r
+ * host will request this string via a separate\r
* control request for the string descriptor.\r
*\r
* \note If no string supplied, use NO_DESCRIPTOR.\r
* \see ManufacturerStrIndex structure entry.\r
*/\r
uint8_t SerialNumStrIndex; /**< String index for the product's globally unique hexadecimal\r
- * serial number, in uppercase Unicoded ASCII.\r
+ * serial number, in uppercase Unicode ASCII.\r
*\r
* \see ManufacturerStrIndex structure entry.\r
*/\r
\r
/** Type define for a standard interface association descriptor.\r
*\r
- * This descriptor has been added as a suppliment to the USB2.0 standard, in the ECN located at\r
+ * This descriptor has been added as a supplement to the USB2.0 standard, in the ECN located at\r
* <a>http://www.usb.org/developers/docs/InterfaceAssociationDescriptor_ecn.pdf</a>. It allows compound\r
* devices with multiple interfaces related to the same function to have the multiple interfaces bound\r
* together at the point of enumeration, loading one generic driver for all the interfaces in the single\r
* maximum packet size that the endpoint can receive at a time.\r
*/\r
\r
- uint8_t PollingIntervalMS; /**< Polling interval in milliseconds for the endpont\r
+ uint8_t PollingIntervalMS; /**< Polling interval in milliseconds for the endpoint\r
* if it is an INTERRUPT or ISOCHRONOUS type.\r
*/\r
#else\r
*\r
* \note By default, the library expects all descriptors to be located in flash memory via the 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
- * allow the descriptors to be changed dynamically at runtime) either the USE_SRAM_DESCRIPTORS or the \r
+ * allow the descriptors to be changed dynamically at runtime) either the USE_RAM_DESCRIPTORS or the \r
* USE_EEPROM_DESCRIPTORS tokens may be defined in the project makefile and passed to the compiler by the -D\r
* switch.\r
*\r