Change/Override Trinket (attiny85) USB identificat

2019-07-29 23:39发布

The AdaFruit 'Trinket' library identifies itself as "Trinket HID Combo" when using as USB Keyboard. Is it possible to change this name to more useful name (with some code, constant etc)?

I'm using Arduino 1.0.4 IDE. Take a look in the source of this library but cannot find this name hard coded.

Any ideas to override this?

1条回答
Root(大扎)
2楼-- · 2019-07-29 23:53

You have to change the Trinket library.
Search for USB_CFG_DEVICE_NAME in usbconfig.h

#define USB_CFG_DEVICE_NAME 'T', 'r', 'i', 'n', 'k', 'e', 't', ' ', 'H', 'I', 'D', ' ', 'C', 'o', 'm', 'b', 'o',

Here is the reference to the adafruit library: Adafruit-Trinket-USB

查看更多
登录 后发表回答