Skip to content

Instantly share code, notes, and snippets.

@j0hnm4r5 j0hnm4r5/name.c
Last active Mar 7, 2019

Embed
What would you like to do?
Teensy Serial Name
#include <usb_names.h>
#define MANUFACTURER_NAME \
{ \
'M', '4', 'R', '5' \
}
#define MANUFACTURER_NAME_LEN 4
#define PRODUCT_NAME \
{ \
'K', 'V', 'M', '-', 'L', 'I', 'N', 'K', ' ', 'H', 'O', 'S', 'T' \
}
#define PRODUCT_NAME_LEN 13
#define SERIAL_NUMBER \
{ \
'K', 'V', 'M', 'L', '_', 'H', '_', '0', '0', '1' \
}
#define SERIAL_NUMBER_LEN 10
struct usb_string_descriptor_struct usb_string_manufacturer_name = {
2 + MANUFACTURER_NAME_LEN * 2,
3,
MANUFACTURER_NAME};
struct usb_string_descriptor_struct usb_string_product_name = {
2 + PRODUCT_NAME_LEN * 2,
3,
PRODUCT_NAME};
struct usb_string_descriptor_struct usb_string_serial_number = {
2 + SERIAL_NUMBER_LEN * 2,
3,
SERIAL_NUMBER};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.