ST意法半导体
直播中

周悠悠

8年用户 124经验值
私信 关注
[问答]

如何使用USR SW2按钮




如何通过wrapper.cs / SDK获取用户按钮事件?
我的申请需要它。

问候
亚历克斯

以上来自于谷歌翻译


以下为原文




hi,


how can I get the user button event over the wrapper.cs / SDK ?
I need it for my application.

regards
Alex

回帖(4)

周悠悠

2018-9-17 13:03:09
好问题版本2.0:
 
 
 在iNEMO的固件中有iNEMO_Button.c
 
 有方法:
 
 uint32_t iNEMO_Button_Get_State(Button_TypeDef按钮)
 {
 返回GPIO_ReadInputDataBit(BUTTON_PORT [Button],BUTTON_PIN [Button]);
 }
 
 如何在iNemo C / C ++控制台演示中获得状态?
 
 请帮忙!

以上来自于谷歌翻译


以下为原文




ok question version 2.0:


In the Firmware of iNEMO there is the iNEMO_Button.c  

there is the method:

uint32_t iNEMO_Button_Get_State(Button_TypeDef Button)
{
   return GPIO_ReadInputDataBit(BUTTON_PORT[Button], BUTTON_PIN[Button]);
}

how can I get the state in the iNemo C/C++ console demonstration?

PLEASE help!
举报

周悠悠

2018-9-17 13:16:44
好吧,如果那是不可能的我有想法用固件中的按钮状态值替换压力值但我没有找到压力传感器通过VCOM发送数据的部分

以上来自于谷歌翻译


以下为原文




ok if that isnt possible I had the idea to


to replace the pressure value with the button state value in the firmware

but i didnt find the part where the pressure sensor send data to via VCOM
举报

李娟

2018-9-17 13:27:38
您可以在协议中提供一个带有新MexId的新帧,并使用inemoV2 sdk的.h中定义的INEMO2_SendFrameBase获取它;或者更快的方法可能是使用trace命令。按下按钮时发送跟踪按摩框,您可以使用.h中提供的INEMO2_GetTrace功能获取它。
 
 
请不要在其他帖子中垃圾邮件,不同主题。
 
 
 谢谢和最诚挚的问候
 iNEMO团队

以上来自于谷歌翻译


以下为原文







You can provide a new frame with a new MexId in the protocol and get it with the INEMO2_SendFrameBase defined in the .h of the inemoV2 sdk; Or a more fast way could be the usage of trace command. Send a trace massage frame when the button is pressed, you can get it with the INEMO2_GetTrace function available in the .h.

  
ps please, do not spam your question in other post, with different subject.

  
Thanks and Best Regards
iNEMO Team
举报

周悠悠

2018-9-17 13:35:00
非常感谢法比奥!
 
 抱歉发送垃圾邮件!
 
 我想试试跟踪。但是我没有想法如何在按下按钮时发送跟踪消息以及在何处实现它(在main.c中?)。
 
 
 
 问候
 亚历克斯

以上来自于谷歌翻译


以下为原文




thank you very much Fabio!

sorry for that spamming!

I want to try it with the trace. But I don't have a Idea how to send a trace message when button is pressed and where to implement it (in main.c ?).



regards
Alex
举报

更多回帖

发帖
×
20
完善资料,
赚取积分