aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2020-12-03 22:45:47 -0700
committerJosh Rahm <joshuarahm@gmail.com>2020-12-03 22:45:47 -0700
commit9e349913f728e47e09852a20a7e16c405d30cd7b (patch)
treef8204d07b4712e9e876fffc2284658e132e8ac8e /include
parent4466725d3facb939f60f598caa684766b50a4235 (diff)
downloadstm32l4-9e349913f728e47e09852a20a7e16c405d30cd7b.tar.gz
stm32l4-9e349913f728e47e09852a20a7e16c405d30cd7b.tar.bz2
stm32l4-9e349913f728e47e09852a20a7e16c405d30cd7b.zip
Double the SPI bandwith by writing only 8 bits to the spi data register instead of 16 (with 8 leading 0's).
Diffstat (limited to 'include')
-rw-r--r--include/arch/stm32l4xxx/peripherals/spi.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/arch/stm32l4xxx/peripherals/spi.h b/include/arch/stm32l4xxx/peripherals/spi.h
index e5b44fe..478664e 100644
--- a/include/arch/stm32l4xxx/peripherals/spi.h
+++ b/include/arch/stm32l4xxx/peripherals/spi.h
@@ -92,7 +92,15 @@ typedef __IO struct {
/* spi data register. Really only the least-significant 16 bits are used.
* reading from this register reads from the Rx FIFO while writing to it
* writes to the Tx FIFO. */
- __IO uint32_t d_r;
+ union {
+ /* The lower 8 its of the spi data register. */
+ __IO uint8_t dl_r;
+
+ /* The data register. */
+ __IO uint16_t d_r;
+ };
+
+ __IO uint16_t unused;
/* spi CRC polynomial register. */
uint32_t crcp_r;