Hello,
I have a project, where I have to write a driver for /dev/spidev0.0, but
I have problems with fpioctl.
I believe that I have problems with the parameter passing or type
casting of fpioctl.
In some forums, I've found mysterios Pointer(PtrInt(xx) syntax like
that: fpioctl(fd,funcnum,
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:
On 19 June 2012 14:17, Jonas Maebe jonas.ma...@elis.ugent.be 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 :
Henry Vermaak wrote on Tue, 19 Jun 2012:
Also, the buffers need to be u64. Is the pointer type in pascal
always 64 bit?
u64 is defined as unsigned long. unsigned long is the same size as
a pointer on Linux.
Jonas
___
fpc-devel maillist -
I've changed to following:
added packrecord c
flipped speed_hz and delay_usec fields
same problem.
I don't know whats really wrong.
Is there any debug possibility?
Am 19.06.2012 um 15:24 schrieb Jonas Maebe:
Henry Vermaak wrote on Tue, 19 Jun 2012:
Also, the buffers need to be u64. Is
On 19 June 2012 18:04, Stefan Fischer sfisc...@basis.biz wrote:
I've changed to following:
added packrecord c
flipped speed_hz and delay_usec fields
same problem.
I don't know whats really wrong.
Is there any debug possibility?
Have you tried looking at errno? Do any of the other ioctls
On 19 June 2012 18:20, Henry Vermaak henry.verm...@gmail.com wrote:
Have you tried looking at errno? Do any of the other ioctls succeed
Sorry, errno - GetLastOSError()
Henry
___
fpc-devel maillist - fpc-devel@lists.freepascal.org
I've changed to following:
added packrecord c
flipped speed_hz and delay_usec fields
same problem.
I don't know whats really wrong.
Is there any debug possibility?
Are you sure about the conversion (*SPI_IOC_MESSAGE(1)*) 1075866368? That is
40206B00 hex. 6B is the letter 'k'
On 19 June 2012 18:37, Ludo Brands ludo.bra...@free.fr wrote:
Are you sure about the conversion (*SPI_IOC_MESSAGE(1)*) 1075866368? That is
I can confirm that a c program spits out this number for SPI_IOC_MESSAGE(1).
Henry
___
fpc-devel maillist -
Are you sure about the conversion (*SPI_IOC_MESSAGE(1)*)
1075866368?
That is
I can confirm that a c program spits out this number for
SPI_IOC_MESSAGE(1).
And what is sizeof (struct spi_ioc_transfer) in c?
Because that would indicate that u64 needs to be indeed 64 bits. I have seen
Hi,
I periodically build FPC trunk on WinXP (using make clean all + make
install).
I then build the arm-wince cross-compiler (using make clean all install
CROSSCOMPILE=1).
In both cases the instantfpc executable ends up the bin directory, leaving
me effectively only with the WinCE version.
Would
On 19 June 2012 19:02, Ludo Brands ludo.bra...@free.fr wrote:
And what is sizeof (struct spi_ioc_transfer) in c?
32.
Because that would indicate that u64 needs to be indeed 64 bits. I have seen
u64 defined as typedef unsigned long long for ARM.
long is 32 bits on my arm laptop, so that
32.
Because that would indicate that u64 needs to be indeed 64 bits. I
have seen u64 defined as typedef unsigned long long for ARM.
long is 32 bits on my arm laptop, so that makes sense.
So the struct should be translated as
spi_ioc_transfer_t = record
tx_buf_ptr : qword;
On 19 June 2012 19:42, Ludo Brands ludo.bra...@free.fr wrote:
So the struct should be translated as
spi_ioc_transfer_t = record
tx_buf_ptr : qword;
rx_buf_ptr : qword;
len : longword;
speed_hz : longword;
delay_usec : word;
bits_per_word : byte;
cs_change
after some experiments, tx.. and rx_buf_ptr has to be 64 bits. On fps on arm,
the pointer type is translated to 32 Bits.
Ludo's suggestions to use qword (64Bit) is correct.
Is there a possibility to use pointer type with 64 Bits? How ?
spi_ioc_transfer_t = record
tx_buf_ptr,dummytx:
On 19 June 2012 14:21, Henry Vermaak henry.verm...@gmail.com wrote:
Also, the buffers need to be u64. Is the pointer type in pascal always 64
bit?
The answer to this is no, so you can't use pascal pointer types for the buffers.
Henry
___
fpc-devel
Hello,
with reference to http://bugs.freepascal.org/view.php?id=12742 about random
crash with Windows OpenDialog Box only on Win7 64bit.
Today I compile trunk-fpc with TEST_WIN64_SEH support and it seems that
this bug is resolved with SEH.
I checked a few times to make sure that this is due to
19.06.2012 23:43, tomek пишет:
Hello,
with reference to http://bugs.freepascal.org/view.php?id=12742 about random
crash with Windows
OpenDialog Box only on Win7 64bit.
Today I compile trunk-fpc with TEST_WIN64_SEH support and it seems that this
bug is resolved with SEH.
I checked a few times
18 matches
Mail list logo