12#ifndef CMSIS_PLUS_POSIX_IO_CHAR_DEVICE_H_
13#define CMSIS_PLUS_POSIX_IO_CHAR_DEVICE_H_
17#if defined(__cplusplus)
21#if defined(OS_USE_OS_APP_CONFIG_H)
22#include <cmsis-plus/os-app-config.h>
29#pragma GCC diagnostic push
31#pragma clang diagnostic ignored "-Wc++98-compat"
42 class char_device_impl;
106#pragma GCC diagnostic push
107#if defined(__clang__)
108#pragma clang diagnostic ignored "-Wpadded"
109#elif defined(__GNUC__)
110#pragma GCC diagnostic ignored "-Wpadded"
171#pragma GCC diagnostic pop
175 template <
typename T>
191 template <
typename... Args>
259 inline char_device_impl&
267 template <
typename T>
268 template <
typename... Args>
272 impl_instance_{
std::forward<Args> (args)... }
274#if defined(OS_TRACE_POSIX_IO_CHAR_DEVICE)
275 trace::printf (
"char_device_implementable::%s(\"%s\")=@%p\n", __func__,
280 template <
typename T>
283#if defined(OS_TRACE_POSIX_IO_CHAR_DEVICE)
284 trace::printf (
"char_device_implementable::%s() @%p %s\n", __func__,
289 template <
typename T>
300#pragma GCC diagnostic pop
virtual off_t do_lseek(off_t offset, int whence) override
virtual ~char_device_impl() override
virtual void do_sync(void) override
virtual ~char_device_implementable() override
value_type & impl(void) const
char_device_implementable(const char *name, Args &&... args)
char_device_impl & impl(void) const
virtual ~char_device() override
const char * name(void) const
int printf(const char *format,...)
Write a formatted string to the trace device.