In addition to spi3, spi1 and spi2 also have alternate pins. Add them as
spi1a and spi2a, similar to spi3.
Signed-off-by: Arne Jansen <arne@die-jansens.de>
The stm32 has a small queue for spi tx/rx. The current code only uses the
spi with a single byte buffer, effectively waiting for each byte to complete
before starting the next transfer.
This patch changes the structure of spi_transfer() to make use of the queue
and achieve back-to-back transfer of bytes on spi.
Signed-off-by: Arne Jansen <arne@die-jansens.de>
The current code accesses the DR as 32 bit. This enabled data packing mode,
effectively adding a 00 byte between each sent byte. The receive side had
similar problems.
To prevent this, all accesses are 8 bit now, even though this is not
necessary on stmf[14].
Signed-off-by: Arne Jansen <arne@die-jansens.de>
Now that the code in stm32f4/ can handle both stm32f1 and stm32f4
chips, rename the directory to just "stm32".
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>