On 23 avr. 2013, at 13:25, Gilles Chanteperdrix 
<[email protected]> wrote:
> 
> This is wrong. The "abstraction layer" used by an application should be
> the usual driver interface open/read/write/ioctl and mmap if there are
> high volumes of data to exchange with the application. Access to the
> registers should be confined to the driver implementation.
> 

The hardware is a FPGA which expose 1024 registers. Currently to read or write 
in a register, we use mmap. How use them with read/write file operations of 
this registers? i.e. in userspace, once mmaped on an ptr, we do : ptr[addr] = 
value. 
How achieve this with write operation, because write accepts only a value ?


> This way, in order to simulate the real hardware you only have to
> implement another driver with the same interface (but with an
> implementation not using registers). And when you decide to use another
> hardware with a completely different registers interface, you do not
> have to emulate the first device registers using the second one, you
> simply implement another driver with the same interface.
> 
> This is the way, the interface between Linux drivers and applications is
> done, and the way it can be done with Xenomai RTDM skin.
> 
> 
> -- 
>                                                                Gilles.
_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai

Reply via email to