Skip to content

Commit aef93ca

Browse files
authored
Merge pull request #14020 from pea-pod/stm-spi-more-bits
Add SPI bitwidths to ST targets where supported
2 parents 2e905a0 + e1c754b commit aef93ca

File tree

16 files changed

+350
-33
lines changed

16 files changed

+350
-33
lines changed

drivers/include/drivers/SPI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class SPI : private NonCopyable<SPI> {
164164

165165
/** Configure the data transmission format.
166166
*
167-
* @param bits Number of bits per SPI frame (4 - 16).
167+
* @param bits Number of bits per SPI frame (4 - 32, target dependent).
168168
* @param mode Clock polarity and phase mode (0 - 3).
169169
*
170170
* @code

targets/TARGET_STM/TARGET_STM32F0/spi_device.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@
1818

1919
#include "stm32f0xx_ll_spi.h"
2020

21+
// Defines the word length capability of the device where Nth bit allows for N window size
22+
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x0000FFF8)
23+
2124
#endif

targets/TARGET_STM/TARGET_STM32F1/spi_device.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@
3232

3333
#include "stm32f1xx_ll_spi.h"
3434

35+
// Defines the word length capability of the device where Nth bit allows for N window size
36+
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x00008080)
37+
3538
#endif

targets/TARGET_STM/TARGET_STM32F2/spi_device.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@
3232

3333
#include "stm32f2xx_ll_spi.h"
3434

35+
// Defines the word legnth capability of the device where Nth bit allows for N window size
36+
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x00008080)
37+
3538
#endif

targets/TARGET_STM/TARGET_STM32F3/spi_device.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@
3232

3333
#include "stm32f3xx_ll_spi.h"
3434

35+
// Defines the word legnth capability of the device where Nth bit allows for N window size
36+
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x0000FFF8)
37+
3538
#endif

targets/TARGET_STM/TARGET_STM32F4/spi_device.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@
3232

3333
#include "stm32f4xx_ll_spi.h"
3434

35+
// Defines the word legnth capability of the device where Nth bit allows for N window size
36+
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x00008080)
37+
3538
#endif

targets/TARGET_STM/TARGET_STM32F7/spi_device.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@
3232

3333
#include "stm32f7xx_ll_spi.h"
3434

35+
// Defines the word legnth capability of the device where Nth bit allows for N window size
36+
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x0000FFF8)
37+
3538
#endif

targets/TARGET_STM/TARGET_STM32G0/spi_device.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@
1717

1818
#include "stm32g0xx_ll_spi.h"
1919

20+
// Defines the word legnth capability of the device where Nth bit allows for N window size
21+
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x0000FFF8)
22+
2023
#endif

targets/TARGET_STM/TARGET_STM32G4/spi_device.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@
1818

1919
#include "stm32g4xx_ll_spi.h"
2020

21+
// Defines the word legnth capability of the device where Nth bit allows for N window size
22+
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x0000FFF8)
23+
2124
#endif

targets/TARGET_STM/TARGET_STM32H7/spi_device.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@
1919
#include "stm32h7xx_ll_rcc.h"
2020
#include "stm32h7xx_ll_spi.h"
2121

22+
// Defines the word legnth capability of the device where Nth bit allows for N window size
23+
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0xFFFFFFF8)
24+
2225
#endif

targets/TARGET_STM/TARGET_STM32L0/spi_device.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@
1717

1818
#include "stm32l0xx_ll_spi.h"
1919

20+
// Defines the word legnth capability of the device where Nth bit allows for N window size
21+
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x00008080)
22+
2023
#endif

targets/TARGET_STM/TARGET_STM32L1/spi_device.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@
3232

3333
#include "stm32l1xx_ll_spi.h"
3434

35+
// Defines the word legnth capability of the device where Nth bit allows for N window size
36+
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x00008080)
37+
3538
#endif

targets/TARGET_STM/TARGET_STM32L4/spi_device.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@
2020

2121
#include "stm32l4xx_ll_spi.h"
2222

23+
// Defines the word legnth capability of the device where Nth bit allows for N window size
24+
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x0000FFF8)
25+
2326
#endif

targets/TARGET_STM/TARGET_STM32L5/spi_device.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@
1818

1919
#include "stm32l5xx_ll_spi.h"
2020

21+
// Defines the word legnth capability of the device where Nth bit allows for N window size
22+
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x0000FFF8)
23+
2124
#endif

targets/TARGET_STM/TARGET_STM32WB/spi_device.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@
2020

2121
#include "stm32wbxx_ll_spi.h"
2222

23+
// Defines the word legnth capability of the device where Nth bit allows for N window size
24+
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x0000FFF8)
25+
2326
#endif

0 commit comments

Comments
 (0)