TTY¶
API for emulated serial teriminals.
Functions
-
int
metal_tty_putc
(int c)¶ Write a character to the default output device.
Write a character to the default output device, which for most targets is the UART serial port.
- Return
0 on success, or -1 on failure.
- Parameters
c
: The character to write to the terminal
-
int
metal_tty_getc
(int *c)¶ Get a byte from the default output device.
The default output device, is typically the UART serial port.
This call is non-blocking, if nothing is ready c==-1 if something is ready, then c=[0x00 to 0xff] byte value.
- Return
0 on success, or -1 on failure.