Waveshare NRF52840 User Manual page 24

Eval kit
Table of Contents

Advertisement

NRF52840 Eval Kit User Manual
app_uart_comm_params_t comm_params
{
RX_PIN_NUMBER,
TX_PIN_NUMBER,
RTS_PIN_NUMBER,
CTS_PIN_NUMBER,
UART_HWFC,
false,
NRF_UART_BAUDRATE_115200
};
void
uart_error_handle(app_uart_evt_t
{
if
(p_event->evt_type
{
APP_ERROR_HANDLER(p_event->data.error_communication);
}
else if
(p_event->evt_type
{
APP_ERROR_HANDLER(p_event->data.error_code);
}
}
main.c:
#include "nrf.h"
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include "app_uart.h"
#include "app_error.h"
#include "nrf_delay.h"
#include "nrf_uart.h"
#include "nrf_uarte.h"
#include "led.h"
#include "uart.h"
/**
* @brief Function for main application entry.
*/
int
main(void)
{
Vision: V1.0.1 Date: 2019.01.19
=
* p_event)
== APP_UART_COMMUNICATION_ERROR)
== APP_UART_FIFO_ERROR)
24 / 72

Advertisement

Table of Contents
loading

Table of Contents