mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
arm: smh: Add some functions for working with the host console
This adds three wrappers around the semihosting commands for reading and writing to the host console. We use the more standard getc/putc/puts names instead of readc/writec/write0 for familiarity. Signed-off-by: Sean Anderson <sean.anderson@seco.com>
This commit is contained in:
parent
dcc4f9623e
commit
3ea744e873
2 changed files with 37 additions and 0 deletions
|
@ -86,4 +86,23 @@ long smh_flen(long fd);
|
|||
*/
|
||||
long smh_seek(long fd, long pos);
|
||||
|
||||
/**
|
||||
* smh_getc() - Read a character from stdin
|
||||
*
|
||||
* Return: The character read, or a negative error on failure
|
||||
*/
|
||||
int smh_getc(void);
|
||||
|
||||
/**
|
||||
* smh_putc() - Print a character on stdout
|
||||
* @ch: The character to print
|
||||
*/
|
||||
void smh_putc(char ch);
|
||||
|
||||
/**
|
||||
* smh_write0() - Print a nul-terminated string on stdout
|
||||
* @s: The string to print
|
||||
*/
|
||||
void smh_puts(const char *s);
|
||||
|
||||
#endif /* _SEMIHOSTING_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue