Waveshare NRF52840 User Manual page 25

Eval kit
Table of Contents

Advertisement

NRF52840 Eval Kit User Manual
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
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
LED_On(LED0);
break;
}
case
'2':
{
printf("\r\n LED0 OFF
LED_Off(LED0);
break;
}
case
'3':
{
printf("\r\n LED1 ON
LED_On(LED1);
break;
}
case
'4':
{
printf("\r\n LED1 OFF
LED_Off(LED1);
break;
}
case
'5':
Vision: V1.0.1 Date: 2019.01.19
started.\r\n");
\r\n");
\r\n");
\r\n");
\r\n");
25 / 72

Advertisement

Table of Contents
loading

Table of Contents