完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
在I2C上发送卡普赛克轨迹板数据我遇到了麻烦。我使用CY8CKIT-041,并想把CY8C4045 AZI S413收集到的CAPENSETRAKPADDATA数据发送到CyBLY-022001—00上,在I2C上。然后我想通过HOGPO发送数据,但是我在设置所有这些方面都有困难。
我现在有一个即时警报服务,在那里我可以切换CyStApp应用程序中的警报服务,数据由CyBul-022001—00接收,I2C-BLE桥将警报数据发送到CYY8C4045 AZI S413,这取决于它接收到的3个警报信号中的哪一个触发RGB LED。我附上了我拼凑的代码。我是一个C新手,您可以提供任何帮助,将感谢您帮助我获得HID衬衫的工作。谢谢。 BLL教程 5.6兆字节 以上来自于百度翻译 以下为原文 I'm having trouble sending capsense trackpad data over I2C. I am using CY8CKIT-041 and would like to send the capsense trackpad data collected by CY8C4045AZI-S413 to the CYBLE-022001-00 over I2C. I would then like to send data out over HOGP but am having trouble setting all of this up. I currently have an immediate alert service working where I can toggle the alert service in the CYSmart app, the data is received by the CYBLE-022001-00 and an I2C-BLE bridge sends the alert data to the CY8C4045AZI-S413 which in turn toggles a RGB LED depending on which of the 3 alert signals it received. I have attached the code I have pieced together. I am a C novice and any help you can provide would be appreciated in helping me get the HID-BLE Mouse working. Thanks. |
|
相关推荐
2个回答
|
|
是的,我希望有人有一个通过I2C传递HID数据的示例项目,我可以用它作为基线来修改。但看起来我只能自己动手。完全同意HID相当复杂的评论,我一直在试图将现有的UB-HID示例修改为通过I2C然后进入HOGP。我查看了GAMEPADXOXFLASH,但它看起来不像我可以很容易地修改它来为一个CasSead轨迹板工作。不过我会再看一遍。首先,我建议你把代码清理得更异步。也许一旦我孤立了个人的功能,我就会更容易理解。谢谢你的小费。
以上来自于百度翻译 以下为原文 Yeah, I was hoping someone had an example project that passed HID data over I2C that I could use as a baseline to modify. But it looks like I will just have to brute force it myself. Totally agree with the comment that HID is pretty complicated, I've been banging my head against the wall trying to modify existing USB-HID examples to pass over I2C then into the HOGP. I looked into the gamepad example but it didn't look like I could easily modify it to work for a capsense trackpad. I'll look at it again though. I'll start by taking your suggestion of cleaning up the code to be more asynchronous. Maybe it will be easier for me to understand once I isolate the individual functions. Thanks for the tip. |
|
|
|
60user51 发表于 2019-7-3 13:04 最终,HID变成:一小段原始数据,以及大量的字节来表示数据对应的数据,比如表示HID设备类型的头字节,它有什么类型/多少种数据类型、版本控制、兼容性等等。 因为你要使用一个简单的轨迹板,所以我怀疑游戏的游戏杆代码是非常接近的,因为轨迹板X-Y将类似于操纵杆X-Y;而且,仅仅因为你从I2C接收轨迹板数据并不意味着你必须发送静态的HID值。I2C;如果你设置了一个“默认的HID”状态,你可以从HID发送到BLE,那么你需要从那时起做的就是修改轨迹板原始值,将其加入到HID更新中。 我已经做了一些工作与HID,但大部分是修改,而不是从头开始。我将尽可能多地帮助,但是HID有相关的数据表: 如果你想了解更多关于HID相关的项目,请尝试查找:HID协议、描述符和“标准”设备,如HID鼠标、键盘、耳机等。 将HID数据转换成序列化的数据包并通过I2C发送可能是最简单的实现方式,但与下注: 以上来自于百度翻译 以下为原文 Ultimately, HID turns into: A little bit of raw data, and alot of bytes for signifying what the data corresponds to; Like the header bytes signifying what type of HID device it is, what type/how many data types it has available, versioning, compatability, etc. Since you are going for a simple trackpad, the example game joystick code would be pretty close I suspect, as trackpad x-y would be similar to joystick x-y; Also, just because you are receiving the trackpad data from I2C doesn't mean that you have to transmit the HID values that are static through the I2C either; If you setup a "Default HID" state that you can send from the HID over BLE, then all you would need to do from that point on is modify the trackpad raw values to be incorporated in the HID updates. I have done a little work with HID, but most of it was modifications rather than from scratch. I'll try to help out as much as I can, but HID has alot of datasheets associated :( If you are looking to learn more about the HID-related items, try looking up: HID protocol, descriptors, and the "standard" devices, like HID mice, keyboards, headsets, etc. Converting the HID data into a serialized data packet and sending it over I2C is probably the easiest implementation, but go with what works bets :) |
|
|
|
只有小组成员才能发言,加入小组>>
727个成员聚集在这个小组
加入小组1940 浏览 1 评论
1686 浏览 1 评论
3453 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1612 浏览 6 评论
1407 浏览 1 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-7-2 19:10 , Processed in 0.788214 second(s), Total 80, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191