os/linux-2.6-tag--devboard-R2_10-4/arch/cris/arch-v32/drivers/elphel/fpga_io.h

Go to the documentation of this file.
00001 //fpga_io.h
00002 
00003 int fpga_io_ioctl(struct inode *inode, struct file *file,  unsigned int cmd, unsigned long arg);
00004 
00005 int fpga_io_open(void);
00006 int fpga_io_close (void);
00007 
00008 /* added read/write/lseek to read and write FPGA registers
00009  * write fromat (6 bytes per write):
00010  * byte 0 - address LSB
00011  * byte 1 - address MSB (high bit - 0 - ~=writereg, 1 -~=writereg4)
00012  * byte 2 - data LSB
00013  * ...
00014  * byte 5 - data MSB
00015  *
00016  * for reading registers - use lseek to 16-bit address (high bit readreg/readreg4)
00017  * byte address (for write - 32-bit address)
00018  * read data - 4 bytes (LSB first), reading again will not autoincrement registers
00019  *
00020  */
00027 ssize_t fpga_io_write  (struct file * file, const char * buf, size_t count, loff_t *off);
00028 loff_t  fpga_io_lseek  (struct file * file, loff_t offset, int orig);
00029 ssize_t fpga_io_read   (struct file * file, char * buf, size_t count, loff_t *off);
00030 
00031 extern void fpga_table_write(unsigned long fpga_addr, unsigned long *data, int length);

Generated on Thu Aug 7 16:19:00 2008 for elphel by  doxygen 1.5.1