Module tty_ctl

Module tty_ctl 

Source
Expand description

Scarlet-private, OS-agnostic control opcodes for TTY devices. These are stable only within Scarlet and must be mapped by ABI adapters.

Constants§

SCTL_TTY_FLUSH_INPUT
Flush input buffer (arg ignored)
SCTL_TTY_GET_CANONICAL
SCTL_TTY_GET_DEBUG
Get debug logging state (ret=0/1)
SCTL_TTY_GET_ECHO
SCTL_TTY_GET_KBMODE
Get keyboard mode (0=XLATE, 1=MEDIUMRAW, 2=RAW)
SCTL_TTY_GET_READ_POLICY
Get read policy in the same packed format as SET_READ_POLICY
SCTL_TTY_GET_WINSIZE
ret = (cols<<16 | rows)
SCTL_TTY_SET_CANONICAL
SCTL_TTY_SET_DEBUG
Enable/disable debug logging of received bytes (arg!=0 enable)
SCTL_TTY_SET_ECHO
Magic ‘ST’ (0x53, 0x54) followed by sequential IDs to avoid collisions.
SCTL_TTY_SET_KBMODE
Set keyboard mode (0=XLATE, 1=MEDIUMRAW, 2=RAW)
SCTL_TTY_SET_READ_POLICY
Set read policy as a neutral abstraction: arg = ((timeout_ms as u32) << 16) | (min_ready_bytes as u32)
SCTL_TTY_SET_WINSIZE
arg = (cols<<16 | rows)