How to disable Bluetooth Radio and SPI Communication when Power button pressed

Hello!

I am using nRF Connect SDK  v2.6.0

I am new to NCS can you give some examples and suggestions on this.

I'm doing the firmware that will be applied to the custom device.


This device contains one button to switch on/off the device on 3 sec long press, I am bit confusing on long press button(give some examples or suggestions on power button)

I am reading 2 sensors data every 2msec continuosly and i am sending sensor values to the  android(client)  via BLE.

This is the first time to control the power, CPU using push button.

I want to apply the long press(3 sec) button functionality to turn off the BLE and communications(in my case SPI) 

I went through nRF9160 Feather blog its different 

I am facing difficulty to apply the long press button 

Now I am trying to implement press the same button for 3 sec  to turn/off the led.

Thank you in advance.

Related