Long button press to trigger an event

Hello Nordic team,

I am trying to develop a long button press handler, but I am unable to find the proper documentation or example code to help with that. I am not sure if I should use bsp.c or app_button.c. 

Reading through devzone has me more inclined to using app_button instead of bsp.c but I am unsure as to what the differences really are. Is there example code that can support my development??

Thanks for your time and support,


  • Hi! I apologize for the slow response.

    I'm going to assume you're asking about the difference between the Board Support Package (BSP) and the Button Handler. Please correct me if my assumption is wrong.

    The BSP provides another layer of abstraction on top of the button handler, but it is mostly used for handling buttons in BLE examples, using the BSP BLE Button Module. If you are just writing a simple button handler, I would use the Button Handler library. 

    If you take a look at bsp.c, app_button.h is included in that. So it utilizes the functions in the button handler, but it provides another layer of abstraction. 

    Best regards,


Reply Children