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... | |
nRF52840 only: USBD string descriptors management.
#define APP_USBD_STRING_DESC | ( | ... | ) |
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.
[in] | ... | Comma separated string letters or language ID. |
uint16_t const* app_usbd_string_desc_get | ( | app_usbd_string_desc_idx_t | idx, |
uint16_t | langid | ||
) |
Get string descriptor.
[in] | idx | String descriptor index |
[in] | langid | Selected language for the string |
|
inlinestatic |
Get string length.
Function to get string length from descriptor (descriptor returned by app_usbd_string_desc_get)
[in] | p_str | String descriptor pointer |