Example for handling button interrupt?

I would like to implement button interrupt handler. I found two examples in nRF5 SDK v16.0.0. One is examples\peripheral\pin_change_int. And another one is components\libraries\button\app_button.c. Which one will you suggest?

Parents Reply Children
  • snowuyl said:
    Thanks for your support!

    No problem at all, I am happy to help! :) 

    snowuyl said:
    Do you have suggested example for using app_button library?

    The app_button library is used by all of our ble_peripheral examples, so you could take a look through those to see how you may use it. You can read more about the app button library in its documentation.

    snowuyl said:
    I need to change BUTTON_ENABLED and BUTTON_HIGH_ACCURACY_ENABLED from 0 to 1?

    This depends on your application. You will need to have enabled the button, but for a regular button press (like a human pressing the button on a Development Kit) you do not need the HIGH_ACCURACY.

    Best regards,
    Karl

Related