This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ble_app_uart -> Button hold event

main.cHi,

Currently I am using "ble_app_uart" base example to understand how ble works. I have gone through bsp and other header that related to button events.

There are few things that I didn't understand well enough to use this application in my project. In my project when ever I hold button for 5sec then only advertise instead of just a simple push that it is currently doing. Also if I press and release then do something else.

Can anyone help me where to start if I want to implement the above requirement.

Siva

Parents
  • That is a very general question about low-level GUI programming, not specific to any chip. You might read about state machines for button events.

  • Sorry, I don't have code and am not familiar with button events or 'bsp'. Looking at bsp/bsp_btn_ble.c, it seems that the low-level GUI programming might already be done and you just need to change the response to the defined events e.g. BTN_ACTION_SLEEP equivalent to BSP_BUTTON_ACTION_RELEASE.

Reply
  • Sorry, I don't have code and am not familiar with button events or 'bsp'. Looking at bsp/bsp_btn_ble.c, it seems that the low-level GUI programming might already be done and you just need to change the response to the defined events e.g. BTN_ACTION_SLEEP equivalent to BSP_BUTTON_ACTION_RELEASE.

Children
No Data