Hello, I am using nrf51 and sdk12.2. I want to print data to terminal using printf function. So I added app_uart_fifo.c also I included paths. I did not get any errors from the compiler but I cant see anything output on my uart terminal. My code is:
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
/**@brief Function for initializing the UART module.
*/
/**@snippet [UART Initialization] */
static void uart_init(void)
{
uint32_t err_code;
const app_uart_comm_params_t comm_params =
{
RX_PIN_NUMBER,
TX_PIN_NUMBER,
RTS_PIN_NUMBER,
CTS_PIN_NUMBER,
APP_UART_FLOW_CONTROL_DISABLED,
false,
UART_BAUDRATE_BAUDRATE_Baud115200
};
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);
}
main()
{
uart_init();
printf("hello");
}