mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 00:32:04 +02:00
sandbox: Improve sandbox serial port keyboard interface
Implements the tstc() interface for the serial driver. Multiplexing the console between the serial port and a keyboard uses a polling method of checking if characters are available; this means that the serial console must be non-blocking when attempting to read characters. Signed-off-by: Taylor Hutt <thutt@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
10
include/os.h
10
include/os.h
@@ -39,6 +39,16 @@ struct sandbox_state;
|
||||
*/
|
||||
ssize_t os_read(int fd, void *buf, size_t count);
|
||||
|
||||
/**
|
||||
* Access to the OS read() system call with non-blocking access
|
||||
*
|
||||
* \param fd File descriptor as returned by os_open()
|
||||
* \param buf Buffer to place data
|
||||
* \param count Number of bytes to read
|
||||
* \return number of bytes read, or -1 on error
|
||||
*/
|
||||
ssize_t os_read_no_block(int fd, void *buf, size_t count);
|
||||
|
||||
/**
|
||||
* Access to the OS write() system call
|
||||
*
|
||||
|
Reference in New Issue
Block a user