Added an option for the SPI transmit pattern.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@14963 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2021-10-27 07:58:28 +00:00
parent 23175533dd
commit c7cff40230
2 changed files with 8 additions and 1 deletions

View File

@ -433,7 +433,7 @@ msg_t spi_lld_start(SPIDriver *spip) {
msg_t msg;
/* Resetting TX pattern source.*/
spip->txsource = 0xFFFFFFFFU;
spip->txsource = (uint32_t)STM32_SPI_FILLER_PATTERN;
/* If in stopped state then enables the SPI and DMA clocks.*/
if (spip->state == SPI_STOP) {

View File

@ -103,6 +103,13 @@
#define STM32_SPI_USE_SPI6 FALSE
#endif
/**
* @brief Filler pattern used when there is nothing to transmit.
*/
#if !defined(STM32_SPI_FILLER_PATTERN) || defined(__DOXYGEN__)
#define STM32_SPI_FILLER_PATTERN 0xFFFFFFFFU
#endif
/**
* @brief SPI1 interrupt priority level setting.
*/