@@ -56,13 +56,14 @@ extern "C" {
56
56
* \code
57
57
* int main() {
58
58
*
59
- * // Initialise UART 0
60
- * uart_init(uart0, 115200);
61
- *
62
59
* // Set the GPIO pin mux to the UART - 0 is TX, 1 is RX
60
+ * // Do this before calling uart_init to avoid losing data
63
61
* gpio_set_function(0, GPIO_FUNC_UART);
64
62
* gpio_set_function(1, GPIO_FUNC_UART);
65
63
*
64
+ * // Initialise UART 0
65
+ * uart_init(uart0, 115200);
66
+ *
66
67
* uart_puts(uart0, "Hello world!");
67
68
* }
68
69
* \endcode
@@ -310,7 +311,7 @@ static inline bool uart_is_readable(uart_inst_t *uart) {
310
311
/*! \brief Write to the UART for transmission.
311
312
* \ingroup hardware_uart
312
313
*
313
- * This function will block until all the data has been sent to the UART
314
+ * This function will block until all the data has been sent to the UART transmit buffer
314
315
*
315
316
* \param uart UART instance. \ref uart0 or \ref uart1
316
317
* \param src The bytes to send
@@ -347,7 +348,7 @@ static inline void uart_read_blocking(uart_inst_t *uart, uint8_t *dst, size_t le
347
348
/*! \brief Write single character to UART for transmission.
348
349
* \ingroup hardware_uart
349
350
*
350
- * This function will block until the entire character has been sent
351
+ * This function will block until the entire character has been sent to the UART transmit buffer
351
352
*
352
353
* \param uart UART instance. \ref uart0 or \ref uart1
353
354
* \param c The character to send
@@ -359,7 +360,7 @@ static inline void uart_putc_raw(uart_inst_t *uart, char c) {
359
360
/*! \brief Write single character to UART for transmission, with optional CR/LF conversions
360
361
* \ingroup hardware_uart
361
362
*
362
- * This function will block until the character has been sent
363
+ * This function will block until the character has been sent to the UART transmit buffer
363
364
*
364
365
* \param uart UART instance. \ref uart0 or \ref uart1
365
366
* \param c The character to send
@@ -376,7 +377,7 @@ static inline void uart_putc(uart_inst_t *uart, char c) {
376
377
/*! \brief Write string to UART for transmission, doing any CR/LF conversions
377
378
* \ingroup hardware_uart
378
379
*
379
- * This function will block until the entire string has been sent
380
+ * This function will block until the entire string has been sent to the UART transmit buffer
380
381
*
381
382
* \param uart UART instance. \ref uart0 or \ref uart1
382
383
* \param s The null terminated string to send
0 commit comments