Skip to content

Add SPI bitwidths to ST targets where supported #14020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/include/drivers/SPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class SPI : private NonCopyable<SPI> {

/** Configure the data transmission format.
*
* @param bits Number of bits per SPI frame (4 - 16).
* @param bits Number of bits per SPI frame (4 - 32, target dependent).
* @param mode Clock polarity and phase mode (0 - 3).
*
* @code
Expand Down
3 changes: 3 additions & 0 deletions targets/TARGET_STM/TARGET_STM32F0/spi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@

#include "stm32f0xx_ll_spi.h"

// Defines the word length capability of the device where Nth bit allows for N window size
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x0000FFF8)

#endif
3 changes: 3 additions & 0 deletions targets/TARGET_STM/TARGET_STM32F1/spi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@

#include "stm32f1xx_ll_spi.h"

// Defines the word length capability of the device where Nth bit allows for N window size
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x00008080)

#endif
3 changes: 3 additions & 0 deletions targets/TARGET_STM/TARGET_STM32F2/spi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@

#include "stm32f2xx_ll_spi.h"

// Defines the word legnth capability of the device where Nth bit allows for N window size
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x00008080)

#endif
3 changes: 3 additions & 0 deletions targets/TARGET_STM/TARGET_STM32F3/spi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@

#include "stm32f3xx_ll_spi.h"

// Defines the word legnth capability of the device where Nth bit allows for N window size
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x0000FFF8)

#endif
3 changes: 3 additions & 0 deletions targets/TARGET_STM/TARGET_STM32F4/spi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@

#include "stm32f4xx_ll_spi.h"

// Defines the word legnth capability of the device where Nth bit allows for N window size
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x00008080)

#endif
3 changes: 3 additions & 0 deletions targets/TARGET_STM/TARGET_STM32F7/spi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@

#include "stm32f7xx_ll_spi.h"

// Defines the word legnth capability of the device where Nth bit allows for N window size
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x0000FFF8)

#endif
3 changes: 3 additions & 0 deletions targets/TARGET_STM/TARGET_STM32G0/spi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@

#include "stm32g0xx_ll_spi.h"

// Defines the word legnth capability of the device where Nth bit allows for N window size
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x0000FFF8)

#endif
3 changes: 3 additions & 0 deletions targets/TARGET_STM/TARGET_STM32G4/spi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@

#include "stm32g4xx_ll_spi.h"

// Defines the word legnth capability of the device where Nth bit allows for N window size
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x0000FFF8)

#endif
3 changes: 3 additions & 0 deletions targets/TARGET_STM/TARGET_STM32H7/spi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@
#include "stm32h7xx_ll_rcc.h"
#include "stm32h7xx_ll_spi.h"

// Defines the word legnth capability of the device where Nth bit allows for N window size
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0xFFFFFFF8)

#endif
3 changes: 3 additions & 0 deletions targets/TARGET_STM/TARGET_STM32L0/spi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@

#include "stm32l0xx_ll_spi.h"

// Defines the word legnth capability of the device where Nth bit allows for N window size
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x00008080)

#endif
3 changes: 3 additions & 0 deletions targets/TARGET_STM/TARGET_STM32L1/spi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@

#include "stm32l1xx_ll_spi.h"

// Defines the word legnth capability of the device where Nth bit allows for N window size
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x00008080)

#endif
3 changes: 3 additions & 0 deletions targets/TARGET_STM/TARGET_STM32L4/spi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@

#include "stm32l4xx_ll_spi.h"

// Defines the word legnth capability of the device where Nth bit allows for N window size
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x0000FFF8)

#endif
3 changes: 3 additions & 0 deletions targets/TARGET_STM/TARGET_STM32L5/spi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@

#include "stm32l5xx_ll_spi.h"

// Defines the word legnth capability of the device where Nth bit allows for N window size
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x0000FFF8)

#endif
3 changes: 3 additions & 0 deletions targets/TARGET_STM/TARGET_STM32WB/spi_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@

#include "stm32wbxx_ll_spi.h"

// Defines the word legnth capability of the device where Nth bit allows for N window size
#define STM32_SPI_CAPABILITY_WORD_LENGTH (0x0000FFF8)

#endif
Loading