mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/usb/cdc/acm: implementation of stdio_available
This commit is contained in:
parent
0ffad24112
commit
af621ec91b
@ -17,6 +17,7 @@ endif
|
||||
ifneq (,$(filter stdio_cdc_acm,$(USEMODULE)))
|
||||
USEMODULE += usbus_cdc_acm
|
||||
USEMODULE += isrpipe
|
||||
USEMODULE += stdio_available
|
||||
endif
|
||||
|
||||
ifneq (,$(filter stdio_rtt,$(USEMODULE)))
|
||||
|
@ -58,5 +58,6 @@ config MODULE_STDIO_CDC_ACM
|
||||
bool "CDC ACM"
|
||||
depends on MODULE_USBUS_CDC_ACM
|
||||
select MODULE_ISRPIPE
|
||||
select MODULE_STDIO_AVAILABLE
|
||||
|
||||
endchoice
|
||||
|
@ -51,6 +51,13 @@ void stdio_init(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if IS_USED(MODULE_STDIO_AVAILABLE)
|
||||
int stdio_available(void)
|
||||
{
|
||||
return tsrb_avail(&_cdc_stdio_isrpipe.tsrb);
|
||||
}
|
||||
#endif
|
||||
|
||||
ssize_t stdio_read(void* buffer, size_t len)
|
||||
{
|
||||
(void)buffer;
|
||||
|
Loading…
Reference in New Issue
Block a user