|
PebbleOS v4.43.0-162-g4f874566a
|
Port driver operations. More...
#include <uart.h>
Data Fields | |
| int(* | init )(const struct pbl_uart *uart) |
| Set the port up. | |
| int(* | early_init )(const struct pbl_uart *uart) |
| Set the port up for polled transmission, before the device model is initialized. | |
| int(* | configure )(const struct pbl_uart *uart, const struct pbl_uart_config *cfg) |
| Apply line settings. | |
| void(* | poll_out )(const struct pbl_uart *uart, uint8_t c) |
| Send a byte, waiting for room. | |
| void(* | flush )(const struct pbl_uart *uart) |
| Optional. | |
| int(* | rx_enable )(const struct pbl_uart *uart) |
| Start reception, handing bytes to pbl_uart_receive(). | |
| void(* | rx_disable )(const struct pbl_uart *uart) |
| Stop reception. | |
Port driver operations.
Called with interrupts locked, except init().
| int(* pbl_uart_ops::configure) (const struct pbl_uart *uart, const struct pbl_uart_config *cfg) |
Apply line settings.
Returns 0 or a negative errno.
| int(* pbl_uart_ops::early_init) (const struct pbl_uart *uart) |
Set the port up for polled transmission, before the device model is initialized.
Returns 0 or a negative errno.
| void(* pbl_uart_ops::flush) (const struct pbl_uart *uart) |
Optional.
Wait until the bytes sent have left the port.
| int(* pbl_uart_ops::init) (const struct pbl_uart *uart) |
Set the port up.
Returns 0 or a negative errno.
| void(* pbl_uart_ops::poll_out) (const struct pbl_uart *uart, uint8_t c) |
Send a byte, waiting for room.
| void(* pbl_uart_ops::rx_disable) (const struct pbl_uart *uart) |
Stop reception.
May be called from the port's interrupt.
| int(* pbl_uart_ops::rx_enable) (const struct pbl_uart *uart) |
Start reception, handing bytes to pbl_uart_receive().
Returns 0 or a negative errno. May be called from the port's interrupt.