100 portENTER_CRITICAL();
108 portENTER_CRITICAL();
virtual int fstat(File *file, struct stat *stat) override
Get the status information of a file or device.
virtual void enable()=0
This will be called once when reference-count goes from 0 to positive.
unsigned int references_
number of open references
int close(File *) OVERRIDE
Close method.
virtual void disable()=0
This will be called when reference count goes from non-zero to 0.
int open(File *, const char *, int, int) OVERRIDE
Open method.
OSMutex lock_
protects internal structures.
mode_t mode_
File open mode, such as O_NONBLOCK.
virtual bool has_rx_buffer_data()=0
Called under a critical section.
int ioctl(File *file, unsigned long int key, unsigned long data) OVERRIDE
Request an ioctl transaction.
Notifiable * readableNotify_
This will be notified if the device has data avilable for read.
Notifiable * writableNotify_
This will be notified if the device has buffer avilable for write.
virtual bool has_tx_buffer_space()=0
Called under a critical section.
An object that can schedule itself on an executor to run.
virtual void notify()=0
Generic callback.
Class to allow convenient locking and unlocking of mutexes in a C context.
#define CAN_IOC_READ_ACTIVE
read active ioctl.
#define NOTIFIABLE_TYPE
ioctl minor type used for the read/write active notifiable integration.
#define CAN_IOC_WRITE_ACTIVE
write active ioctl.
#define CAN_IOC_MAGIC
Magic number for this driver's ioctl calls.
#define IOC_SIZE(_num)
Decode ioctl size.
#define IOC_TYPE(_num)
Decode ioctl type.
#define HASSERT(x)
Checks that the value of expression x is true, else terminates the current process.
static int stat(struct _reent *reent, const char *path, struct stat *stat)
Get the status information of a file or device.