This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF9160 multiple UART

Hello,

I am using used uart sample in:

https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples

I was able to:

-change pin locations .

-select uart port (uart0 or uart1).

I require UART0(Console) and UART1(Peripheral device).

'printk' requires 'struct device *uart = device_get_binding("UART_0");'

Is printk the only method for sending through UART? 

I prefer something like 'HAL_UART_Transmit(&uart, "string", 6, 1)'

I think I should either create 'printk2' or change 'struct device *uart = device_get_binding("UART_0");' every time I need  to send to UART 1.

I would really appreciate 

Thank you 

Parents Reply Children
No Data
Related