Skip to content
Commit 7d4cb73b authored by Gregory Nutt's avatar Gregory Nutt
Browse files

STM32 and EFM32 SPI drivers adopted an incompatible conventions somewhere...

STM32 and EFM32 SPI drivers adopted an incompatible conventions somewhere along the line.  The set the number of bits to negative when calling SPI_SETBITS which had the magical side-effect of setting LSB first order of bit transmission.  This is not only a hokey way to pass control information but is supported by no other SPI drivers.

This change three things:  (1) It adds HWFEAT_LSBFIRST as a new H/W feature.  (2) It changes the implementations of SPI_SETBITS in the STM32 and EFM32 derivers so that negated bit numbers are simply errors and it adds the SPI_HWFEATURES method that can set the LSB bit order, and (3) It changes all calls with negative number of bits from all drivers: The number of bits is now always positive and SPI_HWFEATUREs is called with HWFEAT_LSBFIRST to set the bit order.
parent 986c568d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment