On 19 June 2012 14:17, Jonas Maebe <[email protected]> wrote:
>
> 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.

Also, the buffers need to be u64.  Is the pointer type in pascal always 64 bit?

Henry
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to