log uart set about sdk11

#define RX_PIN_NUMBER 1
#define TX_PIN_NUMBER 2
#define CTS_PIN_NUMBER 0XFF
#define RTS_PIN_NUMBER 0XFF
#define HWFC 0

#ifndef NRF_LOG_USES_RTT
#define NRF_LOG_USES_RTT 0
#endif

#ifndef NRF_LOG_USES_UART
#define NRF_LOG_USES_UART 1
#endif

#ifndef NRF_LOG_USES_RAW_UART
#define NRF_LOG_USES_RAW_UART 0
#endif

uint32_t log_uart_init()
{
static bool initialized = false;
if (initialized)
{
return NRF_SUCCESS;
}

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,
true,
UART_BAUDRATE_BAUDRATE_Baud115200
};

APP_UART_FIFO_INIT(&comm_params,
UART_RX_BUF_SIZE,
UART_TX_BUF_SIZE,
uart_error_cb,
APP_IRQ_PRIORITY_LOW,
err_code);

initialized = true;

return err_code;
}

int main(void)
{
uint8_t err_code;
err_code = NRF_LOG_INIT();
if(err_code != NRF_SUCCESS)
{
nrf_gpio_pin_toggle(LED);
}
ble_stack_init();
nrf_gpio_cfg_output(LED);
nrf_gpio_pin_clear(LED);
NRF_LOG("Some text\r\n");
// Start scanning for peripherals
scan_start();
for (;;)
{
power_manage();
}

If I want to use uart to output logs, is there a problem with this setup? 

Related