36#ifndef _FREERTOS_DRIVERS_COMMON_DEVTAB_H_
37#define _FREERTOS_DRIVERS_COMMON_DEVTAB_H_
53 int (*open)(
file_t *,
const char *, int, int);
57 ssize_t (*read)(
file_t *,
void *, size_t);
59 ssize_t (*write)(
file_t *,
const void *, size_t);
69 int (*init)(
struct devtab *);
99#define __string(_x) #_x
101#define __xstring(_x) __string(_x)
111#define DEVOPS(_label, _open, _close, _read, _write, _ioctl) \
124#define TABLE_ENTRY(_name) \
125 __attribute__((section((".device.table." __xstring(_name) ".data")))) \
126 __attribute__((used))
135#define DEVTAB_ENTRY(_label, _name, _init, _devops, _priv) \
136 devtab_t _label TABLE_ENTRY(devtab) = \
int ioctl(int fd, unsigned long int key,...)
Request and ioctl transaction.
devtab_t DEVTAB_END
Linker generated device table end.
devtab_t DEVTAB[]
Linker generated device table.
Device operations pointer structure.
devops_t * devops
device operations
const char * name
device name
void * priv
device private data
devtab_t * dev
file operations
char inuse
is this file in use
off_t offset
current offset within file
node_t * node
node this file information refers to
void * priv
node private data
unsigned int references
number of open references