2008-10-29 14:08:07     Driver read function

Document created by Aaronwu Employee on Aug 8, 2013
Version 1Show Document
  • View in full screen mode

2008-10-29 14:08:07     Driver read function

Joao Paulo Bodanese (BRAZIL)

Message: 64378   

 

Hi,

 

 

 

I wrote an user application and driver to write some data in SPI.

 

Before each "read" in user space, i must to pass a data (register) to my driver. In this moment, i am doing this via IOCTL (see the example below)

 

ioctl(app.fd, REGISTER, DATA);

 

read(fd,(int *)&buffer, sizeof(buffer));

 

 

 

Is it the best way to do that? Could i pass the data throught the read?

 

 

 

Thanks

 

 

QuoteReplyEditDelete

 

 

2008-10-29 14:24:34     Re: Driver read function

Mike Frysinger (UNITED STATES)

Message: 64382   

 

first, what exactly are you trying to do ?  you write 1 byte to a spi device and then read back the response ?

Attachments

    Outcomes