opensubscriber
   Find in this group all groups
 
Unknown more information…

f : fpc-devel@lists.freepascal.org 19 June 2012 • 9:17PM -0400

Re: [fpc-devel] Problems with fpioctl on ARM debian linux and FPC2.6
by Jonas Maebe

REPLY TO AUTHOR
 
REPLY TO GROUP





Stefan Fischer wrote on Tue, 19 Jun 2012:

> My code snipet is below:
>
> spi_ioc_transfer_t = record
>     tx_buf_ptr   : pointer;
>     rx_buf_ptr   : pointer;
>     len    : longword;
>     delay_usec  : word;
>     speed_hz     : longword;
>     bits_per_word : byte;
>     cs_change  : byte;
>     pad    : longword;
>   end;

The speed_hz and delay_usec fields are switched around. Furthermore,  
make sure to add add {$packrecords C} to guarantee the same alignment  
as in a C compiler.


Jonas

_______________________________________________
fpc-devel maillist  -  fpc-devel@list...
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.