mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
pkg/tinyusb/cdc_acm_stdio: only enable RX callback if stdin is active
This commit is contained in:
parent
2d22cc8f49
commit
018b7321ed
@ -44,6 +44,7 @@ static ssize_t _write(const void* buffer, size_t len)
|
||||
return (char *)buffer - start;
|
||||
}
|
||||
|
||||
#ifdef MODULE_STDIN
|
||||
void tud_cdc_rx_cb(uint8_t itf)
|
||||
{
|
||||
(void)itf;
|
||||
@ -52,5 +53,6 @@ void tud_cdc_rx_cb(uint8_t itf)
|
||||
unsigned res = tud_cdc_read(buffer, sizeof(buffer));
|
||||
isrpipe_write(&stdin_isrpipe, buffer, res);
|
||||
}
|
||||
#endif
|
||||
|
||||
STDIO_PROVIDER(STDIO_TINYUSB_CDC_ACM, NULL, NULL, _write)
|
||||
|
Loading…
Reference in New Issue
Block a user