Open stuartpb opened 2 years ago
There should probably be further tests with this to ensure that multi-char values from strings get read and sent properly - there could be endianness issues with the string layout.
Alternately, trying to send a string value with a databits value of anything other than 8 could be an error, or ignore the databits
value and always use a width of 8 for strings, transmitted character-by-character (this override should probably be documented in that case).
I don't see how platform_spi_send( id, spi_databits[id], pdata[ i ] );
would work with >8 bits? The pdata[i]
would only pass 8 bits of data through to the function, given that pdata
is of const char *
type. Am I missing something?
The iteration in the loop in the prior version of spi.send assumes that the value of databits is the width of
char
when sending any string value.dev
branch rather than for therelease
branch.docs/*
. (This only fixes the function to more closely match the expected documented behavior.)