Hi,
I have example nrf/samples/esb/prx. Now I want to add UART0 (in ASYNC mode - DMA) for TX and RX communication with another device.
I just tried to proceed according to this: https://docs.zephyrproject.org/3.1.0/hardware/peripherals/uart.html#
What I did:
1) Commented all LOG_ERR and LOG_INF lines, commented #include <logging/log.h> and LOG_MODULE_REGISTER(esb_prx, CONFIG_ESB_PRX_APP_LOG_LEVEL); Because uart0 is probably used for logging?!?
2) In main.c I add these "for brinking" uart0:
#define UART0 DT_NODELABEL(uart0) const struct device *uart0_dev;
static bool initUART(void)
{
uart0_dev = DEVICE_DT_GET(UART0);
if (uart0_dev == NULL) {
//printk("Device not found\n");
return false;
}
uart_callback_set(uart0_dev,CallbackUART0,NULL);
return true;
}
# # Copyright (c) 2019 Nordic Semiconductor ASA # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # #CONFIG_NCS_SAMPLES_DEFAULTS=y CONFIG_ESB=y CONFIG_SERIAL=y CONFIG_UART_0_ASYNC=y CONFIG_UART_ASYNC_API=y #CONFIG_DEBUG_OPTIMIZATIONS=y #CONFIG_DEBUG_THREAD_INFO=y
96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)

