Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 18146

Re: mraa_spi_bit_per_word Problem

$
0
0

If your code it looks like you're sending 4 bytes (32 bits).  I assume the CS line should remain low for all 4 bytes.

 

Are you saying that you need to send 16 bits for each byte?  I.e. does your device expect 16 bits for each of address, reg, port_a, and port_b?  If so, you should probably make your array 8 bytes and pad with zeros between each element:

 

data[0] = 0;

data[1] = address;

data[2] = 0;

data[3] = red;

...

 

Note, the padding might need to be reversed if the device expects little-endian byte order.


Viewing all articles
Browse latest Browse all 18146

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>