![]() |
![]() |
Data Structures | |
| struct | USBLIB_PACKED |
| This structure is used to access the Command Block wrapper (CBW) data structure that is used when the communicating with the mass storage class device. More... | |
Macros | |
| #define | USBShort(usValue) (usValue & 0xff), (usValue >> 8) |
| #define | USB3Byte(ulValue) |
| #define | USBLong(ulValue) |
| #define | NEXT_USB_DESCRIPTOR(ptr) |
| #define NEXT_USB_DESCRIPTOR | ( | ptr | ) |
Traverse to the next USB descriptor in a block.
| ptr | points to the first byte of a descriptor in a block of USB descriptors. |
This macro aids in traversing lists of descriptors by returning a pointer to the next descriptor in the list given a pointer to the current one.
| #define USB3Byte | ( | ulValue | ) |
Write a 3 byte unsigned long value to a USB descriptor block.
| ulValue | is the three byte unsigned value that is to be written to the descriptor. |
This helper macro is used in descriptor definitions to write three-byte values. Since the configuration descriptor contains all interface and endpoint descriptors in a contiguous block of memory, these descriptors are typically defined using an array of bytes rather than as packed structures.
| #define USBLong | ( | ulValue | ) |
Write a 4 byte unsigned long value to a USB descriptor block.
| ulValue | is the four byte unsigned long that is to be written to the descriptor. |
This helper macro is used in descriptor definitions to write four-byte values. Since the configuration descriptor contains all interface and endpoint descriptors in a contiguous block of memory, these descriptors are typically defined using an array of bytes rather than as packed structures.
| #define USBShort | ( | usValue | ) | (usValue & 0xff), (usValue >> 8) |
Write a 2 byte uint16_t value to a USB descriptor block.
| usValue | is the two byte uint16_t that is to be written to the descriptor. |
This helper macro is used in descriptor definitions to write two-byte values. Since the configuration descriptor contains all interface and endpoint descriptors in a contiguous block of memory, these descriptors are typically defined using an array of bytes rather than as packed structures.