I am using ble_app_uart SDK_11 s130 on nRF51-dk.
I want the received characters to be buffered into a string until a new line character is received. The relevant code for receiving characters over BLE is here;
static void nus_data_handler(ble_nus_t * p_nus, uint8_t * p_data, uint16_t length)
{
for (uint32_t i = 0; i < length; i++)
{
while(app_uart_put(p_data[i]) != NRF_SUCCESS);
}
while(app_uart_put('\n') != NRF_SUCCESS);
}
When is nus_data_handler() called? Each time a character is received like uart_event_handle()?