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:
parent
e840b61091
commit
f91751ee08
@ -31,6 +31,7 @@ ifneq (,$(filter stdio_ethos,$(USEMODULE)))
|
||||
endif
|
||||
|
||||
ifneq (,$(filter stdio_nimble,$(USEMODULE)))
|
||||
USEMODULE += stdio_available
|
||||
USEPKG += nimble
|
||||
USEMODULE += tsrb
|
||||
USEMODULE += isrpipe
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user