|
@ -221,7 +221,8 @@ static void ble_nus_chars_received_uart_print(uint8_t * p_data, uint16_t data_le |
|
|
|
|
|
|
|
|
NRF_LOG_DEBUG("Receiving data."); |
|
|
NRF_LOG_DEBUG("Receiving data."); |
|
|
NRF_LOG_HEXDUMP_DEBUG(p_data, data_len); |
|
|
NRF_LOG_HEXDUMP_DEBUG(p_data, data_len); |
|
|
|
|
|
|
|
|
|
|
|
// app_uart_put(0x5A); |
|
|
|
|
|
// app_uart_put(data_len); |
|
|
for (uint32_t i = 0; i < data_len; i++) |
|
|
for (uint32_t i = 0; i < data_len; i++) |
|
|
{ |
|
|
{ |
|
|
do |
|
|
do |
|
@ -234,6 +235,8 @@ static void ble_nus_chars_received_uart_print(uint8_t * p_data, uint16_t data_le |
|
|
} |
|
|
} |
|
|
} while (ret_val == NRF_ERROR_BUSY); |
|
|
} while (ret_val == NRF_ERROR_BUSY); |
|
|
} |
|
|
} |
|
|
|
|
|
app_uart_put(0x5A); |
|
|
|
|
|
app_uart_put(0xA5); |
|
|
// if (p_data[data_len-1] == '\r') |
|
|
// if (p_data[data_len-1] == '\r') |
|
|
// { |
|
|
// { |
|
|
// while (app_uart_put('\n') == NRF_ERROR_BUSY); |
|
|
// while (app_uart_put('\n') == NRF_ERROR_BUSY); |
|
@ -690,7 +693,7 @@ int main(void) |
|
|
app_timer_create(&m_uart_send_tmr, APP_TIMER_MODE_REPEATED, uart_send_tmr_cb); |
|
|
app_timer_create(&m_uart_send_tmr, APP_TIMER_MODE_REPEATED, uart_send_tmr_cb); |
|
|
app_timer_start(m_uart_send_tmr, APP_TIMER_TICKS(2), NULL); |
|
|
app_timer_start(m_uart_send_tmr, APP_TIMER_TICKS(2), NULL); |
|
|
|
|
|
|
|
|
app_uart_put(1); |
|
|
|
|
|
|
|
|
// app_uart_put(1); |
|
|
|
|
|
|
|
|
// Start execution. |
|
|
// Start execution. |
|
|
printf("BLE UART central example started.\r\n"); |
|
|
printf("BLE UART central example started.\r\n"); |
|
|