v2.0.0
Functions
pico_stdio_uart
Runtime Infrastructure » pico_stdio

Support for stdin/stdout using UART. More...

## Functions
void | stdio_uart_init (void)
| Explicitly initialize stdin/stdout over UART and add it to the current set of stdin/stdout drivers. More...
void | stdout_uart_init (void)
| Explicitly initialize stdout only (no stdin) over UART and add it to the current set of stdout drivers. More...
void | stdin_uart_init (void)
| Explicitly initialize stdin only (no stdout) over UART and add it to the current set of stdin drivers. More...
void | stdio_uart_init_full (uart_inst_t *uart, uint baud_rate, int tx_pin, int rx_pin)
| Perform custom initialization initialize stdin/stdout over UART and add it to the current set of stdin/stdout drivers. More...
void | stdio_uart_deinit (void)
| Explicitly deinitialize stdin/stdout over UART and remove it from the current set of stdin/stdout drivers. More...
void | stdout_uart_deinit (void)
| Explicitly deinitialize stdout only (no stdin) over UART and remove it from the current set of stdout drivers. More...
void | stdin_uart_deinit (void)
| Explicitly deinitialize stdin only (no stdout) over UART and remove it from the current set of stdin drivers. More...
void | stdio_uart_deinit_full (uart_inst_t *uart, int tx_pin, int rx_pin)
| Perform custom deinitialization deinitialize stdin/stdout over UART and remove it from the current set of stdin/stdout drivers. More...

## Detailed Description

Support for stdin/stdout using UART.

Linking this library or calling `pico_enable_stdio_uart(TARGET ENABLED)` in the CMake (which achieves the same thing) will add UART to the drivers used for standard input/output

## Function Documentation

## ◆ stdin_uart_deinit()

void stdin_uart_deinit | ( | void |  | ) |

Explicitly deinitialize stdin only (no stdout) over UART and remove it from the current set of stdin drivers.

This method disables PICO_DEFAULT_UART_RX_PIN for UART input (if defined), and leaves the pads isolated

## ◆ stdin_uart_init()

void stdin_uart_init | ( | void |  | ) |

Explicitly initialize stdin only (no stdout) over UART and add it to the current set of stdin drivers.

This method sets up PICO_DEFAULT_UART_RX_PIN for UART input (if defined) , and configures the baud rate as PICO_DEFAULT_UART_BAUD_RATE

## ◆ stdio_uart_deinit()

void stdio_uart_deinit | ( | void |  | ) |

Explicitly deinitialize stdin/stdout over UART and remove it from the current set of stdin/stdout drivers.

This method disables PICO_DEFAULT_UART_TX_PIN for UART output (if defined), PICO_DEFAULT_UART_RX_PIN for input (if defined) and leaves the pads isolated.

Note
  this method is automatically called by stdio_deinit_all() if `pico_stdio_uart` is included in the build

## ◆ stdio_uart_deinit_full()

void stdio_uart_deinit_full | ( | uart_inst_t * | uart,
|  | int | tx_pin,
|  | int | rx_pin
| ) |  |

Perform custom deinitialization deinitialize stdin/stdout over UART and remove it from the current set of stdin/stdout drivers.

Parameters

  uart | the uart instance to use, uart0 or uart1
  tx_pin | the UART pin to use for stdout (or -1 for no stdout)
  rx_pin | the UART pin to use for stdin (or -1 for no stdin)

## ◆ stdio_uart_init()

void stdio_uart_init | ( | void |  | ) |

Explicitly initialize stdin/stdout over UART and add it to the current set of stdin/stdout drivers.

This method sets up PICO_DEFAULT_UART_TX_PIN for UART output (if defined), PICO_DEFAULT_UART_RX_PIN for input (if defined) and configures the baud rate as PICO_DEFAULT_UART_BAUD_RATE.

Note
  this method is automatically called by stdio_init_all() if `pico_stdio_uart` is included in the build

## ◆ stdio_uart_init_full()

void stdio_uart_init_full | ( | uart_inst_t * | uart,
|  | uint | baud_rate,
|  | int | tx_pin,
|  | int | rx_pin
| ) |  |

Perform custom initialization initialize stdin/stdout over UART and add it to the current set of stdin/stdout drivers.

Parameters

  uart | the uart instance to use, uart0 or uart1
  baud_rate | the baud rate in Hz
  tx_pin | the UART pin to use for stdout (or -1 for no stdout)
  rx_pin | the UART pin to use for stdin (or -1 for no stdin)

## ◆ stdout_uart_deinit()

void stdout_uart_deinit | ( | void |  | ) |

Explicitly deinitialize stdout only (no stdin) over UART and remove it from the current set of stdout drivers.

This method disables PICO_DEFAULT_UART_TX_PIN for UART output (if defined), and leaves the pad isolated

## ◆ stdout_uart_init()

void stdout_uart_init | ( | void |  | ) |

Explicitly initialize stdout only (no stdin) over UART and add it to the current set of stdout drivers.

This method sets up PICO_DEFAULT_UART_TX_PIN for UART output (if defined) , and configures the baud rate as PICO_DEFAULT_UART_BAUD_RATE