fpgafs/fpgafs.h
ben 37bc27371a add basic low level driver managment.
git-svn-id: svn+ssh://en.codiert.org/home/staff/ben/dev/misc.svn/projects/fpgafs@345 766a2236-cff9-0310-b0c0-a81a5f92509a
2007-07-01 21:30:51 +00:00

54 lines
1.0 KiB
C

/*********************************************
* Benjamin Krill <ben@codiert.org>
*********************************************/
#ifndef FPGAFS_H
#define FPGAFS_H
#include <linux/kref.h>
#include <linux/mutex.h>
#include <linux/spinlock.h>
#include <linux/fs.h>
/* magic number the file system */
enum {
FPGAFS_MAGIC = 0x4255AA42,
};
struct fpga_context {
int bla1;
int bla2;
};
struct fpgafs_inode_info {
struct fpga_context *i_ctx;
struct inode vfs_inode;
};
extern struct tree_descr fpgafs_dir_contents[];
#define FPGAFS_I(inode) \
container_of(inode, struct fpgafs_inode_info, vfs_inode)
/* command definitions */
#define BLA 0
/* low level driver */
struct fpgafs_lldrv {
char name[5];
int (*init) (void);
int (*exit) (void);
int (*send) (unsigned char *buf, int len);
int (*recv) (unsigned char *buf, int len);
};
int fpgafs_register_lldrv(struct fpgafs_lldrv *drv);
int fpgafs_unregister_lldrv(struct fpgafs_lldrv *drv);
int fpgafs_send_data(char *buf, int len);
int fpgafs_recv_data(char *buf, int len);
#endif /* FPGAFS_H */