MAE 3185 - Introduction to Mechatronics

Logo

View the Project on GitHub Abhiricky1992/UTA-MAE3185-Notes

hardware_uart Library Functions

To use this library, add following to the C/C++ file,

#include <hardware/uart.h>

and following to the CMakeLists.txt file.

target_link_libraries(projectName pico_stdlib hardware_gpio hardware_uart)

Following are some of the most commonly used functions for configuring and using the UART peripheral.

uint uart_init(uart_inst_t* uart, uint baudRate)

Initialize a specific instance of UART on the μC.

uart_putc(uart_inst_t* uart, char c)

Transmit a character through the UART instance specified.

char uart_getc(uart_inst_t* uart)

Receive a character through the UART instance specified.