1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/stdio_nimble: implementation of stdio_available

This commit is contained in:
Hendrik van Essen 2021-12-27 14:57:35 +01:00
parent e840b61091
commit f91751ee08
2 changed files with 8 additions and 0 deletions

View File

@ -31,6 +31,7 @@ ifneq (,$(filter stdio_ethos,$(USEMODULE)))
endif
ifneq (,$(filter stdio_nimble,$(USEMODULE)))
USEMODULE += stdio_available
USEPKG += nimble
USEMODULE += tsrb
USEMODULE += isrpipe

View File

@ -319,6 +319,13 @@ void stdio_init(void)
_send_stdout, NULL);
}
#if IS_USED(MODULE_STDIO_AVAILABLE)
int stdio_available(void)
{
return tsrb_avail(&_isrpipe_stdin.tsrb);
}
#endif
ssize_t stdio_read(void *buffer, size_t count)
{
/* blocks until at least one character was read */