Let's hope so, because this hang up is killing me:(
Either way thank you very much for your help, I really appreciated it!
Type: Posts; User: Coens
Let's hope so, because this hang up is killing me:(
Either way thank you very much for your help, I really appreciated it!
I didn't write the dll, so I don't have access to the function itself. But my code is fine as far as you can see?
Of course, that's what you ment :rolleyes: sorry about that... That function is part of an dll, that's why I posted the description of it.
I've written a testprogram, it shows the data what it should be and what it has send. This is what I get:
00: Send: 00 Received: 00
01: Send: 00 Received: 00
02: Send: 26 Received: 4c
03:...
But it does send out 8 bits, only shifted 1 bit to the left. This causes the MSB to be truncated off, and causes the LSB to be 0.
The function looks like this:
typedef uint8_t __stdcall SpiTransfer_type(uint8_t LsbFirst, uint8_t SPIMode, uint8_t speed, uint8_t *pwrite, uint8_t *pread, uint16_t len);
extern...
Thanks for the reply,
DATA_LENGTH_ is indeed 20.
Instead of sending 0x26 (00100110), it sends 0x4C (01001100).
So the MSB is truncated off.
Hi all!
I need to set a SPI which is 159 bits long. This is the code:
SpiTransfer(FALSE, SPI_SETTING_, F_1KHZ_, Spi_Word, Spi_Readback, DATA_LENGTH_);
And this is the array which keeps...