Have a few questions about ble_app_uart example.
-
From the way I see it, it sets uart_event_handle as the callback, and every time there's an "event" that takes place be it in the form of receiving data, it invokes uart_evt_handler which in turns calls the callback. Is that the basic high level flow?
-
I set the breakpoint inside uart_evt_handler but it doesn't get triggered at all. I see there's been issues debugging in softdevice. Is this normal?
- I'm still a bit unfamiliar with event-driven programming but if you were to incorporate RTOS in such an application such that say there's a specific task that's waiting on the data to be received from the app through message queues (which is taken care of by nus_data_handler() currently), and a different task that's dealing with the serial data to be sent, would it be doable? So for instance: if the data is being received from the BLE app, nus_data_handler gets triggered which would then set the flag/write to stream buffer that the freeRTOS task is waiting on...and once that's done, the task will continue processing it. Does this idea sound reasonable or there's a possibility of not using nus_data_handler() instead and the task gets the indication rightaway?