/********************************************* * Benjamin Krill *********************************************/ #ifndef FPGAFS_H #define FPGAFS_H #include #include #include #include /* 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) (const char __user *buf, int len); int (*recv) (unsigned char *buf, int len); int (*read_load) (unsigned char *buf, int len); int (*write_load) (const char __user *buf, int len); }; int fpgafs_register_lldrv(struct fpgafs_lldrv *drv); int fpgafs_unregister_lldrv(struct fpgafs_lldrv *drv); ssize_t fpgafs_send_data(struct file *file, const char __user *buf, size_t len, loff_t *pos); ssize_t fpgafs_recv_data(struct file *file, char __user *buf, size_t len, loff_t *pos); int fpgafs_read_load(char *buf, int len); int fpgafs_write_load(char *buf, int len); #endif /* FPGAFS_H */