aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-08-28 14:06:07 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-08-28 14:06:07 +0000
commit0e0dc7418ea9f11fa61a9288a3ce10b5cfe7bc6f (patch)
tree7e239f45e008aab37bb0b2d1391466a0cb1b0b5e /os
parentac6f72603a6b5d3b1ba071b3224ed225cdffb5a3 (diff)
downloadChibiOS-0e0dc7418ea9f11fa61a9288a3ce10b5cfe7bc6f.tar.gz
ChibiOS-0e0dc7418ea9f11fa61a9288a3ce10b5cfe7bc6f.tar.bz2
ChibiOS-0e0dc7418ea9f11fa61a9288a3ce10b5cfe7bc6f.zip
Small optimization.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8253 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-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;