13#ifndef CMSIS_PLUS_POSIX_IO_BLOCK_H_
14#define CMSIS_PLUS_POSIX_IO_BLOCK_H_
18#if defined(__cplusplus)
22#if defined(OS_USE_OS_APP_CONFIG_H)
23#include <cmsis-plus/os-app-config.h>
32#if ! defined(OS_STRING_POSIX_DEVICE_PREFIX)
33#define OS_STRING_POSIX_DEVICE_PREFIX "/dev/"
38#pragma GCC diagnostic push
40#pragma clang diagnostic ignored "-Wc++98-compat"
41#pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
61#pragma GCC diagnostic push
63#elif defined(__GNUC__)
64#pragma GCC diagnostic ignored "-Wsuggest-final-methods"
65#pragma GCC diagnostic ignored "-Wsuggest-final-types"
88 operator= (
const device&) =
delete;
90 operator= (
device&&) =
delete;
117 open (
const char* path =
nullptr,
int oflag = 0, ...);
126 vopen (
const char* path,
int oflag, std::va_list args);
129 close (
void)
override;
132 ioctl (
int request, ...);
135 vioctl (
int request, std::va_list args);
168 const char* name_ =
nullptr;
189#pragma GCC diagnostic pop
193#pragma GCC diagnostic push
194#if defined(__clang__)
195#pragma clang diagnostic ignored "-Wpadded"
196#elif defined(__GNUC__)
197#pragma GCC diagnostic ignored "-Wpadded"
198#pragma GCC diagnostic ignored "-Wsuggest-final-methods"
199#pragma GCC diagnostic ignored "-Wsuggest-final-types"
261 do_vopen (
const char* path,
int oflag, std::va_list args) = 0;
292#pragma GCC diagnostic pop
336#pragma GCC diagnostic pop
virtual int do_vioctl(int request, std::va_list args)=0
virtual ~device_impl() override
virtual bool do_is_opened(void) override
virtual void do_sync(void)=0
virtual int do_vopen(const char *path, int oflag, std::va_list args)=0
device_impl & impl(void) const
static const char * device_prefix(void)
virtual int close(void) override
virtual bool match_name(const char *name) const
int vopen(const char *path, int oflag, std::va_list args)
virtual int vioctl(int request, std::va_list args)
int ioctl(int request,...)
virtual ~device() override
int open(const char *path=nullptr, int oflag=0,...)
const char * name(void) const
The core of a double linked list, pointers to next, previous.
#define OS_STRING_POSIX_DEVICE_PREFIX