EasyManua.ls Logo

Waveshare NRF52840 - Page 25

Waveshare NRF52840
72 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
NRF52840 Eval Kit User Manual
Vision: V1.0.1 Date: 2019.01.19 25 / 72
uint32_t err_code;
APP_UART_FIFO_INIT(&comm_params,UART_RX_BUF_SIZE,UART_TX_BUF_SI
ZE,uart_error_handle,APP_IRQ_PRIORITY_LOWEST,err_code);
APP_ERROR_CHECK(err_code);
printf("\r\nUART example started.\r\n");
while (true)
{
uint8_t cr;
//Get Data from the port!
while (app_uart_get(&cr) != NRF_SUCCESS);
//Then put data to the port
while (app_uart_put(cr) != NRF_SUCCESS);
switch (cr)
{
case '1':
{
printf("\r\n LED0 ON \r\n");
LED_On(LED0);
break;
}
case '2':
{
printf("\r\n LED0 OFF \r\n");
LED_Off(LED0);
break;
}
case '3':
{
printf("\r\n LED1 ON \r\n");
LED_On(LED1);
break;
}
case '4':
{
printf("\r\n LED1 OFF \r\n");
LED_Off(LED1);
break;
}
case '5':