From b28c62685d857b55dd8bc7e759a9f93ab0a51632 Mon Sep 17 00:00:00 2001 From: Rocco Marco Guglielmi Date: Sun, 14 Jan 2018 11:19:39 +0000 Subject: Updated EX demos to be compliant with latest ChibiOS/HAL edit git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11273 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- testex/STM32/STM32F4xx/SPI-LIS3DSH/main.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'testex/STM32/STM32F4xx/SPI-LIS3DSH/main.c') diff --git a/testex/STM32/STM32F4xx/SPI-LIS3DSH/main.c b/testex/STM32/STM32F4xx/SPI-LIS3DSH/main.c index b3a818137..2bb7799ef 100644 --- a/testex/STM32/STM32F4xx/SPI-LIS3DSH/main.c +++ b/testex/STM32/STM32F4xx/SPI-LIS3DSH/main.c @@ -38,23 +38,24 @@ static char axisID[LIS3DSH_NUMBER_OF_AXES] = {'X', 'Y', 'Z'}; static uint32_t i; static const SPIConfig spicfg = { + FALSE, NULL, - GPIOE, /* port of LIS3DSH CS.*/ - GPIOE_CS_SPI, /* pin of LIS3DSH CS.*/ - SPI_CR1_BR_0 | SPI_CR1_CPOL | SPI_CR1_CPHA,/* CR1 register.*/ - 0 /* CR2 register.*/ + GPIOE, + GPIOE_CS_SPI, + SPI_CR1_BR_0 | SPI_CR1_CPOL | SPI_CR1_CPHA, + 0 }; static LIS3DSHConfig lis3dshcfg = { - &SPID1, /* Pointer to SPI Driver.*/ - &spicfg, /* Pointer to SPI Configuration.*/ - NULL, /* Use default sensitivity.*/ - NULL, /* Use default bias.*/ - LIS3DSH_FS_2G, /* Full scale value.*/ - LIS3DSH_ODR_100HZ, /* Output data rate.*/ -#if LIS3DSH_USE_ADVANCED || defined(__DOXYGEN__) - LIS3DSH_BW_400HZ, /* AA filter bandwidth.*/ - LIS3DSH_BDU_CONTINUOUS, /* Block data update continuous.*/ + &SPID1, + &spicfg, + NULL, + NULL, + LIS3DSH_FS_2G, + LIS3DSH_ODR_100HZ, +#if LIS3DSH_USE_ADVANCED + LIS3DSH_BW_400HZ, + LIS3DSH_BDU_CONTINUOUS, #endif }; -- cgit v1.2.3