USB::StringDescriptor< max_chars > Struct Template Reference
Template for making a USB string descriptor. More...
#include <Descriptors.h>
Inheritance diagram for USB::StringDescriptor< max_chars >:
Collaboration diagram for USB::StringDescriptor< max_chars >:
Public Member Functions | |
StringDescriptor () | |
Construct an empty string descriptor. More... | |
StringDescriptor (const char *str, size_t charCount) | |
Construct a string descriptor containing text. More... | |
StringDescriptor (const String &s) | |
![]() | |
template<typename T > | |
const T * | as () const |
Less clumsy way to cast descriptor to a specific type. More... | |
size_t | printTo (Print &p) const |
Public Attributes | |
uint16_t | text [max_chars] |
UTF16-LE encoded text (no NUL terminator) More... | |
![]() | |
uint8_t | length |
Total size (in bytes) including this header. More... | |
uint8_t | type |
e.g. TUSB_DESC_STRING More... | |
Detailed Description
template<size_t max_chars>
struct USB::StringDescriptor< max_chars >
Template for making a USB string descriptor.
Constructor & Destructor Documentation
◆ StringDescriptor() [1/3]
template<size_t max_chars>
|
inline |
Construct an empty string descriptor.
◆ StringDescriptor() [2/3]
template<size_t max_chars>
|
inline |
Construct a string descriptor containing text.
- Parameters
-
str ASCII text (unicode page #0 only) charCount Number of characters in string
◆ StringDescriptor() [3/3]
template<size_t max_chars>
|
inline |
Member Data Documentation
◆ text
template<size_t max_chars>
uint16_t USB::StringDescriptor< max_chars >::text[max_chars] |
UTF16-LE encoded text (no NUL terminator)
The documentation for this struct was generated from the following file: