uc-sdk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
fio.h File Reference
#include <stdio.h>

Go to the source code of this file.

Classes

struct  fddef_t
 

Macros

#define MAX_FDS   32
 

Typedefs

typedef ssize_t(* fdread_t )(void *opaque, void *buf, size_t count)
 
typedef ssize_t(* fdwrite_t )(void *opaque, const void *buf, size_t count)
 
typedef off_t(* fdseek_t )(void *opaque, off_t offset, int whence)
 
typedef int(* fdclose_t )(void *opaque)
 

Functions

int fio_is_open (int fd)
 
int fio_open (fdread_t, fdwrite_t, fdseek_t, fdclose_t, void *opaque)
 
ssize_t fio_read (int fd, void *buf, size_t count)
 
ssize_t fio_write (int fd, const void *buf, size_t count)
 
off_t fio_seek (int fd, off_t offset, int whence)
 
int fio_close (int fd)
 
void fio_set_opaque (int fd, void *opaque)
 
void register_devfs ()
 

Macro Definition Documentation

#define MAX_FDS   32

Definition at line 6 of file fio.h.

Typedef Documentation

typedef int(* fdclose_t)(void *opaque)

Definition at line 11 of file fio.h.

typedef ssize_t(* fdread_t)(void *opaque, void *buf, size_t count)

Definition at line 8 of file fio.h.

typedef off_t(* fdseek_t)(void *opaque, off_t offset, int whence)

Definition at line 10 of file fio.h.

typedef ssize_t(* fdwrite_t)(void *opaque, const void *buf, size_t count)

Definition at line 9 of file fio.h.

Function Documentation

int fio_close ( int  fd)

Definition at line 141 of file fio.c.

int fio_is_open ( int  fd)

Definition at line 70 of file fio.c.

int fio_open ( fdread_t  ,
fdwrite_t  ,
fdseek_t  ,
fdclose_t  ,
void *  opaque 
)

Definition at line 78 of file fio.c.

ssize_t fio_read ( int  fd,
void *  buf,
size_t  count 
)

Definition at line 96 of file fio.c.

off_t fio_seek ( int  fd,
off_t  offset,
int  whence 
)

Definition at line 126 of file fio.c.

void fio_set_opaque ( int  fd,
void *  opaque 
)

Definition at line 156 of file fio.c.

ssize_t fio_write ( int  fd,
const void *  buf,
size_t  count 
)

Definition at line 111 of file fio.c.

void register_devfs ( )

Definition at line 188 of file fio.c.