PebbleOS v4.47.0-512-g5285d4236
Loading...
Searching...
No Matches
POSIX

UART driver on the host: the terminal, a TCP port or a serial device. More...

Data Structures

struct  pbl_uart_posix
 POSIX serial port. More...
 

Macros

#define PBL_UART_POSIX_CONSOLE   0
 Host end of the console.
 
#define PBL_UART_POSIX_QEMU   1
 Host end of the QEMU serial protocol.
 
#define PBL_UART_POSIX_BT_HCI   2
 Host end of Bluetooth HCI.
 
#define PBL_UART_POSIX_DEFINE(sym, _name, _channel, _baudrate)
 Define a POSIX serial port.
 
#define POSIX_CONSOLE_UART   (&pbl_uart_posix_console.uart)
 The POSIX console port.
 
#define POSIX_QEMU_UART   (&pbl_uart_posix_qemu.uart)
 The POSIX QEMU serial protocol port.
 
#define POSIX_BT_HCI_UART   (&pbl_uart_posix_bt_hci.uart)
 The POSIX Bluetooth HCI port, with CONFIG_UART_POSIX_BT_HCI.
 

Detailed Description

UART driver on the host: the terminal, a TCP port or a serial device.

The port has no line settings: any baud rate is accepted.


Data Structure Documentation

◆ pbl_uart_posix

struct pbl_uart_posix

POSIX serial port.

Data Fields
uint8_t channel Host end, one of PBL_UART_POSIX_*.
struct pbl_uart uart Serial port.

Macro Definition Documentation

◆ PBL_UART_POSIX_BT_HCI

#define PBL_UART_POSIX_BT_HCI   2

Host end of Bluetooth HCI.

◆ PBL_UART_POSIX_CONSOLE

#define PBL_UART_POSIX_CONSOLE   0

Host end of the console.

◆ PBL_UART_POSIX_DEFINE

#define PBL_UART_POSIX_DEFINE (   sym,
  _name,
  _channel,
  _baudrate 
)
Value:
const struct pbl_uart_posix sym = { \
.uart = PBL_UART_INIT(sym, _name, nullptr, &pbl_uart_posix_ops, _baudrate), \
.channel = (_channel), \
}; \
PBL_DEVICE_REGISTER(sym, &sym.uart.dev)
struct pbl_uart uart
Serial port.
Definition posix.h:29
POSIX serial port.
Definition posix.h:27
struct pbl_device dev
Device.
Definition uart.h:137
#define PBL_UART_STATE_DEFINE(sym)
Define the class state of port sym, for the PBL_UART_*_DEFINE() macro of a driver.
Definition uart.h:151
#define PBL_UART_INIT(sym, _name, _parent, _ops, _baudrate)
Initializer for the struct pbl_uart of port sym.
Definition uart.h:164

Define a POSIX serial port.

Parameters
symSymbol of the port.
_nameName.
_channelHost end, one of PBL_UART_POSIX_*.
_baudrateInitial baud rate, in bits per second.

◆ PBL_UART_POSIX_QEMU

#define PBL_UART_POSIX_QEMU   1

Host end of the QEMU serial protocol.

◆ POSIX_BT_HCI_UART

#define POSIX_BT_HCI_UART   (&pbl_uart_posix_bt_hci.uart)

The POSIX Bluetooth HCI port, with CONFIG_UART_POSIX_BT_HCI.

◆ POSIX_CONSOLE_UART

#define POSIX_CONSOLE_UART   (&pbl_uart_posix_console.uart)

The POSIX console port.

◆ POSIX_QEMU_UART

#define POSIX_QEMU_UART   (&pbl_uart_posix_qemu.uart)

The POSIX QEMU serial protocol port.