nRF52840 only: USBD string descriptors management. More...
Modules |
|
| USBD string configuration | |
|
nRF52840 only:
Configuration of the string module that can be easily affected by the final user.
|
|
Macros |
|
| #define | APP_USBD_STRING_DESC (...) |
|
USB string initialization.
More...
|
|
Enumerations |
|
| enum |
app_usbd_string_desc_idx_t
{
APP_USBD_STRING_ID_LANGIDS = 0, APP_USBD_STRING_ID_MANUFACTURER , APP_USBD_STRING_ID_PRODUCT , APP_USBD_STRING_ID_SERIAL , APP_USBD_STRING_ID_CNT } |
|
USB string descriptors ID's.
More...
|
|
Functions |
|
| uint16_t const * | app_usbd_string_desc_get ( app_usbd_string_desc_idx_t idx, uint16_t langid) |
|
Get string descriptor.
More...
|
|
| static size_t | app_usbd_string_desc_length (uint16_t const *p_str) |
|
Get string length.
More...
|
|
Detailed Description
nRF52840 only: USBD string descriptors management.
Macro Definition Documentation
| #define APP_USBD_STRING_DESC | ( | ... | ) |
Value:
(
const
uint16_t[]){ \
(0xff & (
sizeof
((uint16_t[]){__VA_ARGS__}) + 2)) | \
((uint16_t)
APP_USBD_DESCRIPTOR_STRING
) << 8, \
__VA_ARGS__ }
USB string initialization.
Macro that creates initialization values for USB string. The format contains header and string itself. The string should be declared as an array of uint16_t type.
- Parameters
-
[in] ... Comma separated string letters or language ID.
- Returns
- String descriptor initialization data.
Enumeration Type Documentation
Function Documentation
| uint16_t const* app_usbd_string_desc_get | ( | app_usbd_string_desc_idx_t | idx , |
| uint16_t | langid | ||
| ) |
Get string descriptor.
- Parameters
-
[in] idx String descriptor index [in] langid Selected language for the string
- Returns
- String descriptor or NULL if not exist
|
inline static |
Get string length.
Function to get string length from descriptor (descriptor returned by app_usbd_string_desc_get )
- Parameters
-
[in] p_str String descriptor pointer
- Returns
- Total descriptor length in bytes