I want to use my native language (Farsi فارسی) in naming USB_CFG_DEVICE_NAME.
As I know for add a language I have to edit String Descriptor this way:
Code: Select all
PROGMEM char usbDescriptorString0[] = { /* language descriptor */
6, /* sizeof(usbDescriptorString0): length of descriptor in bytes */
3, /* descriptor type */
0x09, 0x04, /* language index (0x0409 = US-English) */
0x29, 0x04, /* language index (0x0429 = Farsi) */
};
I Want my DEVICE_NAME to be امیر with this Unicode(UTF16) in hex : 06 27 06 45 06 cc 06 31
Can any one help ? tnx
And i have another question that what does this macro do?
Code: Select all
#define USB_STRING_DESCRIPTOR_HEADER(stringLength) ((2*(stringLength)+2) | (3<<8))
It is used somewhere like:
Code: Select all
#if USB_CFG_DESCR_PROPS_STRING_PRODUCT == 0 && USB_CFG_DEVICE_NAME_LEN
#undef USB_CFG_DESCR_PROPS_STRING_PRODUCT
#define USB_CFG_DESCR_PROPS_STRING_PRODUCT sizeof(usbDescriptorStringDevice)
PROGMEM int usbDescriptorStringDevice[] = {
USB_STRING_DESCRIPTOR_HEADER(USB_CFG_DEVICE_NAME_LEN),
USB_CFG_DEVICE_NAME
};
#endif
Is it something that i have to change in my work?