I want to make 2 UARTs data pass-through by the way of two instance of app_uart_init() func.
I want to make 2 UARTs data pass-through by the way of two instance of app_uart_init() func.
There's only one UART on the chip so you can't have two instances at the same time. And if you look at the app_uart code you'll see all the variables are static and are set up on init to whatever the init values are.
You can init() it then close() it again and re-init() with new values but that's about it.
What are you trying to do?
app_uart_init(): Function for initializing the UART module. Use this initialization when several instances of the UART module are needed.
Hi, I have one quesiton. How many uart instances can be initialized? Are there any limits?
@Yelun: Yes you can have several instances of uart but not at the same time. As menetioned by RK, you need to close the previous one, and then init() the new one.
@jizh1000: I don't think there is a limit. But note: only one works at a time.