28#ifndef CMSIS_PLUS_POSIX_IO_CHAR_DEVICE_H_
29#define CMSIS_PLUS_POSIX_IO_CHAR_DEVICE_H_
33#if defined(__cplusplus)
37#if defined(OS_USE_OS_APP_CONFIG_H)
38#include <cmsis-plus/os-app-config.h>
45#pragma GCC diagnostic push
48#pragma clang diagnostic ignored "-Wc++98-compat"
59 class char_device_impl;
124#pragma GCC diagnostic push
125#pragma GCC diagnostic ignored "-Wpadded"
186#pragma GCC diagnostic pop
208 template<
typename ... Args>
277 inline char_device_impl&
286 template<
typename ... Args>
288 const char* name, Args&&... args) :
290 { impl_instance_,
name },
292 { std::forward<Args>(args)... }
294#if defined(OS_TRACE_POSIX_IO_CHAR_DEVICE)
295 trace::printf (
"char_device_implementable::%s(\"%s\")=@%p\n",
296 __func__, name_,
this);
303#if defined(OS_TRACE_POSIX_IO_CHAR_DEVICE)
304 trace::printf (
"char_device_implementable::%s() @%p %s\n", __func__,
320#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.