nrfcxx
0.1.0
C++-17 Framework for Nordic nRF5 Devices
nrfcxx
console
cstdio.hpp
Go to the documentation of this file.
1
/* SPDX-License-Identifier: Apache-2.0 */
2
/* Copyright 2018-2019 Peter A. Bigot */
3
11
#ifndef NRFCXX_CONSOLE_HPP
12
#define NRFCXX_CONSOLE_HPP
13
#pragma once
14
15
#include <cstdio>
16
17
namespace
{
18
22
inline
void
csetvbuf ()
23
{
24
setvbuf(stdout, NULL, _IONBF, 0);
25
}
26
28
template
<
typename
...Args>
29
inline
void
cprintf (
const
char
* format, Args... args)
30
{
31
printf(format, args...);
32
}
33
35
inline
void
cputs (
const
char
* text)
36
{
37
puts(text);
38
}
39
41
inline
int
cputchar (
int
ch)
42
{
43
return
putchar(ch);
44
}
45
47
inline
bool
cisstdio ()
48
{
49
return
true
;
50
}
51
52
}
// ns anonymous
53
54
#endif
/* NRFCXX_CONSOLE_HPP */
Generated by
1.8.16