更改/覆盖 Trinket (attiny85) USB 标识名称、设备名称 [英] Change/Override Trinket (attiny85) USB identification name, device name

查看:35
本文介绍了更改/覆盖 Trinket (attiny85) USB 标识名称、设备名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用作 USB 键盘时,AdaFruit 'Trinket' 库将自身标识为Trinket HID Combo".是否可以将此名称更改为更有用的名称(使用一些代码、常量等)?

我使用的是 Arduino 1.0.4 IDE.查看这个库的源代码,但找不到硬编码的这个名称.

有什么想法可以覆盖这个吗?

解决方案

您必须更改 Trinket 库.
usbconfig.h

中搜索 USB_CFG_DEVICE_NAME

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

这是 adafruit 库的参考:Adafruit-Trinket-USB

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?

解决方案

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

这篇关于更改/覆盖 Trinket (attiny85) USB 标识名称、设备名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆