Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ ifneq (,$(filter newlib,$(USEMODULE)))
ifeq (,$(filter newlib_syscalls_%,$(USEMODULE)))
USEMODULE += newlib_syscalls_default
endif
ifeq (,$(filter stdio_rtt stdio_cdc_acm,$(USEMODULE)))
ifeq (,$(filter stdio_rtt stdio_cdc_acm stdio_none,$(USEMODULE)))
USEMODULE += stdio_uart
endif
endif
Expand Down
1 change: 1 addition & 0 deletions sys/stdio_none/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include $(RIOTBASE)/Makefile.base
39 changes: 39 additions & 0 deletions sys/stdio_none/stdio_none.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (C) 2019 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/

/**
* @ingroup sys
* @{
*
* @file
* @brief Dummy STDIO implementation that does nothing to preserve energy
*
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*
* @}
*/

#include "stdio_base.h"

void stdio_init(void)
{
/* do nothing */
}

ssize_t stdio_read(void* buffer, size_t count)
{
(void)buffer;
(void)count;
return 0;
}

ssize_t stdio_write(const void* buffer, size_t len)
{
(void)buffer;
return (ssize_t)len;
}