I have burnt ble-app-multilink peripheral code on my nrf51822ek. What happens currently is dat when i press button on kit, on kit led turns on . when i press it again, it turns off.
I require that when button is in pressed state it, the led should remain on and when it is released it should turn off.
How is this possible ? any sort of help will be appreciated.
It looks like the Board Support Package (bsp) used in the example to handle the button events only supports button presses or button releases. In the example the button event handler is configured to trigger only on button pushes. So to make your peripheral to act like want you will need to write your own gpiote interrupt routine that triggers on both events.
What this routine should be like ? and where should it be coded ?
You can look into the GPIOTE functionality and drivers. I don't think we have any good examples for GPIOTE right now. There is just this. I can only advice you to read the GPIOTE chapter in the Reference Manual and the driver documentation. What you want to do is to make an interrupt that triggers on both high-to-low and low-to-high events on a pin. Then look at the code in the bsp_event_handler() function in the multilink peripheral and implement it in your GPIOTE interrupt handler.
I couldnot find any function like bsp_event_handler .
Can you report what SDK version you are using and what softdevice and what version you are working with. Also, what version of the evaluation kit you have. How is your setup, do you have two evaluation boards, one multilink central and one for multilink peripheral?