am335x通过gpmc总线与RAM连接,通信没有问题。但系统的读写函数
ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
使用时,参数太少。比如我要写地址:0x10地址开始的1K数据,无法将地址和读写数据个数同事传到底层驱动。
有没有好的方法解决这个问题
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
am335x通过gpmc总线与RAM连接,通信没有问题。但系统的读写函数
ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
使用时,参数太少。比如我要写地址:0x10地址开始的1K数据,无法将地址和读写数据个数同事传到底层驱动。
有没有好的方法解决这个问题
通过size_t这个参数应该就可以知道读写的数据有多大了
http://www.cnblogs.com/Blue-Moon/archive/2012/09/25/2702028.html