Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
717e84f7
Commit
717e84f7
authored
6 years ago
by
Hauke Petersen
Browse files
Options
Downloads
Patches
Plain Diff
sys/stdio: factor out STDIO abstraction
parent
463b04aa
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sys/include/stdio_base.h
+63
-0
63 additions, 0 deletions
sys/include/stdio_base.h
with
63 additions
and
0 deletions
sys/include/stdio_base.h
0 → 100644
+
63
−
0
View file @
717e84f7
/*
* Copyright (C) 2015 Kaspar Schleiser <kaspar@schleiser.de>
* 2018 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.
*/
/**
* @defgroup sys_stdio STDIO abstraction
* @ingroup sys
*
* @brief Simple standard input/output (STDIO) abstraction for RIOT
*
* @{
* @file
*
* @author Kaspar Schleiser <kaspar@schleiser.de>
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
*/
#ifndef STDIO_BASE_H
#define STDIO_BASE_H
#include
<unistd.h>
#ifdef __cplusplus
extern
"C"
{
#endif
/**
* @brief initialize the module
*/
void
stdio_init
(
void
);
/**
* @brief read @p len bytes from stdio uart into @p buffer
*
* @param[out] buffer buffer to read into
* @param[in] max_len nr of bytes to read
*
* @return nr of bytes read
* @return <0 on error
*/
ssize_t
stdio_read
(
void
*
buffer
,
size_t
max_len
);
/**
* @brief write @p len bytes from @p buffer into uart
*
* @param[in] buffer buffer to read from
* @param[in] len nr of bytes to write
*
* @return nr of bytes written
* @return <0 on error
*/
ssize_t
stdio_write
(
const
void
*
buffer
,
size_t
len
);
#ifdef __cplusplus
}
#endif
/** @} */
#endif
/* STDIO_BASE_H */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment