SDK 16.0
52810
S112
From the sample code of SDK we can see that the UART is enabled by code ourself, as the following. However, what's the usage of the NRFX_UARTE_ENABLED and NRFX_UARTE_CONFIG_LOG_ENABLED for? Can we enable UART logging just by changing those items in SDK_config.h? In other words, can we choose either RTT or UART just by changing SDK_config.h, instead of changing code to either call RTT or UART?
Basically I want to use RTT logging while initial coding, and UART logging while the performance tuning, to avoid the DK impact. I don't want to change code. I just want to change SDK_config.h. How can I achieve that?
Thanks,
const app_uart_comm_params_t comm_params = { RX_PIN_NUMBER, TX_PIN_NUMBER, RTS_PIN_NUMBER, CTS_PIN_NUMBER, UART_HWFC, false, #if defined (UART_PRESENT) NRF_UART_BAUDRATE_115200 #else NRF_UARTE_BAUDRATE_115200 #endif }; APP_UART_FIFO_INIT(&comm_params, UART_RX_BUF_SIZE, UART_TX_BUF_SIZE, uart_error_handle, APP_IRQ_PRIORITY_LOWEST, err_code); APP_ERROR_CHECK(err_code);