Karg  v0.2.0
The kernel of CargOS
dev.h File Reference
#include <driver.h>
#include <utils/compiler.h>

Go to the source code of this file.

Classes

struct  dev_t
 
struct  dev_node_t
 
struct  dev_init_t
 

Macros

#define make_dev(driver, num)   ((dev_t){&(driver), num})
 
#define dev_init(compat, func)
 

Functions

isize dev_read (dev_t dev, u8 *buf, usize size)
 
isize dev_write (dev_t dev, const u8 *buf, usize size)
 

Variables

const dev_node_t DEV_TABLE []
 

Macro Definition Documentation

◆ dev_init

#define dev_init (   compat,
  func 
)
Value:
section(.init.dev) \
used static const dev_init_t _DEV_INIT = {_MODULE_NAME, compat, func}
#define section(name)
Definition: compiler.h:3
Definition: dev.h:25

◆ make_dev

#define make_dev (   driver,
  num 
)    ((dev_t){&(driver), num})

Function Documentation

◆ dev_read()

isize dev_read ( dev_t  dev,
u8 buf,
usize  size 
)

◆ dev_write()

isize dev_write ( dev_t  dev,
const u8 buf,
usize  size 
)

Variable Documentation

◆ DEV_TABLE

const dev_node_t DEV_TABLE[]
extern