version 1.6, 2011/06/20 20:18:44 |
version 1.7, 2012/04/11 06:05:43 |
|
|
}; |
}; |
|
|
void miofile_close(struct file *); |
void miofile_close(struct file *); |
unsigned miofile_read(struct file *, unsigned char *, unsigned); |
unsigned int miofile_read(struct file *, unsigned char *, unsigned int); |
unsigned miofile_write(struct file *, unsigned char *, unsigned); |
unsigned int miofile_write(struct file *, unsigned char *, unsigned int); |
void miofile_start(struct file *); |
void miofile_start(struct file *); |
void miofile_stop(struct file *); |
void miofile_stop(struct file *); |
int miofile_nfds(struct file *); |
int miofile_nfds(struct file *); |
|
|
* open the device |
* open the device |
*/ |
*/ |
struct miofile * |
struct miofile * |
miofile_new(struct fileops *ops, char *path, unsigned mode) |
miofile_new(struct fileops *ops, char *path, unsigned int mode) |
{ |
{ |
char *siopath; |
char *siopath; |
struct mio_hdl *hdl; |
struct mio_hdl *hdl; |
|
|
return NULL; |
return NULL; |
} |
} |
|
|
unsigned |
unsigned int |
miofile_read(struct file *file, unsigned char *data, unsigned count) |
miofile_read(struct file *file, unsigned char *data, unsigned int count) |
{ |
{ |
struct miofile *f = (struct miofile *)file; |
struct miofile *f = (struct miofile *)file; |
unsigned n; |
unsigned int n; |
|
|
n = mio_read(f->hdl, data, count); |
n = mio_read(f->hdl, data, count); |
if (n == 0) { |
if (n == 0) { |
|
|
|
|
} |
} |
|
|
unsigned |
unsigned int |
miofile_write(struct file *file, unsigned char *data, unsigned count) |
miofile_write(struct file *file, unsigned char *data, unsigned int count) |
{ |
{ |
struct miofile *f = (struct miofile *)file; |
struct miofile *f = (struct miofile *)file; |
unsigned n; |
unsigned int n; |
|
|
n = mio_write(f->hdl, data, count); |
n = mio_write(f->hdl, data, count); |
if (n == 0) { |
if (n == 0) { |