Search:

Type: Posts; User: Coens

Search: Search took 0.02 seconds.

  1. Thread: tuncated uint8_t

    by Coens
    Replies
    14
    Views
    3,251

    Let's hope so, because this hang up is killing...

    Let's hope so, because this hang up is killing me:(

    Either way thank you very much for your help, I really appreciated it!
  2. Thread: tuncated uint8_t

    by Coens
    Replies
    14
    Views
    3,251

    I didn't write the dll, so I don't have access to...

    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?
  3. Thread: tuncated uint8_t

    by Coens
    Replies
    14
    Views
    3,251

    Of course, that's what you ment :rolleyes: sorry...

    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.
  4. Thread: tuncated uint8_t

    by Coens
    Replies
    14
    Views
    3,251

    I've written a testprogram, it shows the data...

    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:...
  5. Thread: tuncated uint8_t

    by Coens
    Replies
    14
    Views
    3,251

    But it does send out 8 bits, only shifted 1 bit...

    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.
  6. Thread: tuncated uint8_t

    by Coens
    Replies
    14
    Views
    3,251

    The function looks like this: typedef...

    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...
  7. Thread: tuncated uint8_t

    by Coens
    Replies
    14
    Views
    3,251

    Thanks for the reply, DATA_LENGTH_ is indeed...

    Thanks for the reply,

    DATA_LENGTH_ is indeed 20.
    Instead of sending 0x26 (00100110), it sends 0x4C (01001100).
    So the MSB is truncated off.
  8. Thread: tuncated uint8_t

    by Coens
    Replies
    14
    Views
    3,251

    tuncated uint8_t

    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...
Results 1 to 8 of 8