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

What is the difference between app_uart.c and app_uart_fifo.c?

They both seem to implement the same interface in app_uart.h.

regards, //Elm

Parents
  • Hi

    Basically when you want to senddata over UART, the app_uart_fifo.c stores data into fifo, but app_uart.c transfers a byte directly.

    The effect is with app_uart.fifo.c, the application can push characters continuously with calls to app_uart_put, e.g. in a while loop, and the application will get a APP_UART_TX_EMPTY event when the string transfer is complete (when the TX fifo buffer is empty).

    If you call app_uart_put with app_uart.c, the first call to app_uart_put will be successful, but subsequent calls might just return NRF_ERROR_NO_MEM if the UART is busy sending the previous byte.

Reply
  • Hi

    Basically when you want to senddata over UART, the app_uart_fifo.c stores data into fifo, but app_uart.c transfers a byte directly.

    The effect is with app_uart.fifo.c, the application can push characters continuously with calls to app_uart_put, e.g. in a while loop, and the application will get a APP_UART_TX_EMPTY event when the string transfer is complete (when the TX fifo buffer is empty).

    If you call app_uart_put with app_uart.c, the first call to app_uart_put will be successful, but subsequent calls might just return NRF_ERROR_NO_MEM if the UART is busy sending the previous byte.

Children
Related