aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/ports/STM32/LLD/SPIv2/spi_lld.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/os/hal/ports/STM32/LLD/SPIv2/spi_lld.c b/os/hal/ports/STM32/LLD/SPIv2/spi_lld.c
index a31563ef4..ca869c551 100644
--- a/os/hal/ports/STM32/LLD/SPIv2/spi_lld.c
+++ b/os/hal/ports/STM32/LLD/SPIv2/spi_lld.c
@@ -116,7 +116,7 @@ SPIDriver SPID6;
/* Driver local variables and types. */
/*===========================================================================*/
-static uint16_t dummytx;
+static const uint16_t dummytx = 0xFFFFU;
static uint16_t dummyrx;
/*===========================================================================*/
@@ -184,8 +184,6 @@ static void spi_lld_serve_tx_interrupt(SPIDriver *spip, uint32_t flags) {
*/
void spi_lld_init(void) {
- dummytx = 0xFFFF;
-
#if STM32_SPI_USE_SPI1
spiObjectInit(&SPID1);
SPID1.spi = SPI1;