Macros
USB String Descriptor Definitions
Collaboration diagram for USB String Descriptor Definitions:

Macros

#define USBStringDescriptor_ENGLISH_US   0x09, 0x04
 
#define USBStringDescriptor_LENGTH(length)   ((length) * 2 + 2)
 
#define USBStringDescriptor_UNICODE(ascii)   (ascii), 0
 

Detailed Description

This section lists the codes and macros for USB string descriptor definition.

Language IDs
  • USBStringDescriptor_ENGLISH_US
String Descriptor Length
  • USBStringDescriptor_LENGTH
ASCII to UNICODE conversion
  • USBStringDescriptor_UNICODE

Macro Definition Documentation

◆ USBStringDescriptor_ENGLISH_US

#define USBStringDescriptor_ENGLISH_US   0x09, 0x04

Language ID for US English.

Definition at line 437 of file USBDescriptors.h.

◆ USBStringDescriptor_LENGTH

#define USBStringDescriptor_LENGTH (   length)    ((length) * 2 + 2)

Calculates the length of a string descriptor given the number of ascii characters/language IDs in it.

Parameters
lengthThe ascii format string length.
Returns
The actual data length in bytes.

Definition at line 444 of file USBDescriptors.h.

◆ USBStringDescriptor_UNICODE

#define USBStringDescriptor_UNICODE (   ascii)    (ascii), 0

Converts an ascii character to its unicode representation.

Parameters
asciiThe ASCII character to convert
Returns
A 2-byte-array for the UNICODE based on given ASCII

Definition at line 450 of file USBDescriptors.h.



inertial_sense_ros
Author(s):
autogenerated on Sun Feb 28 2021 03:18:02