28#ifndef CMSIS_PLUS_POSIX_IO_TTY_H_
29#define CMSIS_PLUS_POSIX_IO_TTY_H_
33#if defined (__cplusplus)
37#if defined(OS_USE_OS_APP_CONFIG_H)
38#include <cmsis-plus/os-app-config.h>
47#pragma GCC diagnostic push
50#pragma clang diagnostic ignored "-Wc++98-compat"
86 operator= (
const tty&) =
delete;
88 operator= (
tty&&) =
delete;
95 ~tty ()
noexcept override;
138#pragma GCC diagnostic push
139#pragma GCC diagnostic ignored "-Wpadded"
164 operator= (
const tty_impl&) =
delete;
210#pragma GCC diagnostic pop
232 template<
typename ... Args>
304 return static_cast<tty_impl&
> (impl_);
310 template<
typename ... Args>
314 { impl_instance_,
name },
316 { std::forward<Args>(args)... }
318#if defined(OS_TRACE_POSIX_IO_TTY)
319 trace::printf (
"tty_implementable::%s(\"%s\")=@%p\n", __func__, name_,
327#if defined(OS_TRACE_POSIX_IO_TTY)
328 trace::printf (
"tty_implementable::%s() @%p %s\n", __func__,
this,
344#pragma GCC diagnostic pop
const char * name(void) const
virtual ~tty_impl() override
virtual int do_tcsendbreak(int duration)=0
virtual int do_tcsetattr(int options, const struct termios *ptio)=0
virtual int do_tcflush(int queue_selector)=0
virtual int do_isatty(void) final
virtual int do_tcdrain(void)=0
virtual int do_tcgetattr(struct termios *ptio)=0
tty_implementable(const char *name, Args &&... args)
virtual ~tty_implementable()
value_type & impl(void) const
virtual int tcdrain(void)
virtual int tcsendbreak(int duration)
virtual int tcsetattr(int options, const struct termios *ptio)
virtual int tcflush(int queue_selector)
tty_impl & impl(void) const
virtual int tcgetattr(struct termios *ptio)
virtual ~tty() noexcept override
int printf(const char *format,...)
Write a formatted string to the trace device.
Single file µOS++ RTOS definitions.