I was trying to develop a project using nrf51822. Which needs to send data over ble and do some functions according to the data received. In which I have to add a lengthy code for my application. Which has to use pstorage, pwm, etc. The main function of ble_app_uart ends like this. for (;;) { power_manage(); }
My question is how can I include my codes in this main file without hurting ble_uart functionality. I tried by simply adding my codes after power mange() function, but it didn't work because that wil put the cpu into sleep mode and it will not execute my code. Then I commented the power_ manage function, but that time I couldn't send data from nrf uart app. The app is not getting connected with the device. What should I do to achieve this thing? Please give me guidelines.