Change/Override Trinket (attiny85) USB identification name, device name

萝らか妹 提交于 2019-12-11 04:59:23

问题


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:


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



来源:https://stackoverflow.com/questions/37740026/change-override-trinket-attiny85-usb-identification-name-device-name

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!