PebbleOS v4.43.0-162-g4f874566a
Loading...
Searching...
No Matches
pbl_uart_ops Struct Reference

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.
 

Detailed Description

Port driver operations.

Called with interrupts locked, except init().

Field Documentation

◆ configure

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.

◆ early_init

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.

◆ flush

void(* pbl_uart_ops::flush) (const struct pbl_uart *uart)

Optional.

Wait until the bytes sent have left the port.

◆ init

int(* pbl_uart_ops::init) (const struct pbl_uart *uart)

Set the port up.

Returns 0 or a negative errno.

◆ poll_out

void(* pbl_uart_ops::poll_out) (const struct pbl_uart *uart, uint8_t c)

Send a byte, waiting for room.

◆ rx_disable

void(* pbl_uart_ops::rx_disable) (const struct pbl_uart *uart)

Stop reception.

May be called from the port's interrupt.

◆ rx_enable

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.


The documentation for this struct was generated from the following file: