13#ifndef CMSIS_PLUS_POSIX_IO_CHAR_DEVICE_H_
14#define CMSIS_PLUS_POSIX_IO_CHAR_DEVICE_H_
18#if defined(__cplusplus)
22#if defined(OS_USE_OS_APP_CONFIG_H)
23#include <cmsis-plus/os-app-config.h>
30#pragma GCC diagnostic push
32#pragma clang diagnostic ignored "-Wc++98-compat"
43 class char_device_impl;
108#pragma GCC diagnostic push
109#if defined(__clang__)
110#pragma clang diagnostic ignored "-Wpadded"
111#elif defined(__GNUC__)
112#pragma GCC diagnostic ignored "-Wpadded"
174#pragma GCC diagnostic pop
196 template<
typename ... Args>
265 inline char_device_impl&
274 template<
typename ... Args>
276 const char* name, Args&&... args) :
278 { impl_instance_,
name },
280 { std::forward<Args>(args)... }
282#if defined(OS_TRACE_POSIX_IO_CHAR_DEVICE)
283 trace::printf (
"char_device_implementable::%s(\"%s\")=@%p\n",
284 __func__, name_,
this);
291#if defined(OS_TRACE_POSIX_IO_CHAR_DEVICE)
292 trace::printf (
"char_device_implementable::%s() @%p %s\n", __func__,
308#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.