aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
authorRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2016-09-27 23:29:24 +0000
committerRocco Marco Guglielmi <roccomarco.guglielmi@live.com>2016-09-27 23:29:24 +0000
commita736f4dd7758d31c56290b0c436fb742e90724c7 (patch)
tree5bc2d0ec6feab9f45183b629e2e47e76415ec9c7 /testhal
parentb1eb97df6169e083d044acb32c0a3762d56b14fa (diff)
downloadChibiOS-a736f4dd7758d31c56290b0c436fb742e90724c7.tar.gz
ChibiOS-a736f4dd7758d31c56290b0c436fb742e90724c7.tar.bz2
ChibiOS-a736f4dd7758d31c56290b0c436fb742e90724c7.zip
Improved LIS3MDL driver and related demo: added multiple register read/write.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9813 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal')
-rw-r--r--testhal/STM32/STM32F4xx/I2C-LIS3MLD/Makefile4
-rw-r--r--testhal/STM32/STM32F4xx/I2C-LIS3MLD/debug/STM32F4xx-I2C-LIS3MDL (OpenOCD, Flash and Run).launch2
-rw-r--r--testhal/STM32/STM32F4xx/I2C-LIS3MLD/main.c16
3 files changed, 11 insertions, 11 deletions
diff --git a/testhal/STM32/STM32F4xx/I2C-LIS3MLD/Makefile b/testhal/STM32/STM32F4xx/I2C-LIS3MLD/Makefile
index 7a8776579..227b708bd 100644
--- a/testhal/STM32/STM32F4xx/I2C-LIS3MLD/Makefile
+++ b/testhal/STM32/STM32F4xx/I2C-LIS3MLD/Makefile
@@ -201,8 +201,8 @@ CPPWARN = -Wall -Wextra -Wundef
# List all user C define here, like -D_DEBUG=1
UDEFS = -DCHPRINTF_USE_FLOAT=1 -DSHELL_CMD_TEST_ENABLED=0 \
- -DLIS3MDL_USE_ADVANCED=0
-
+ -DLIS3MDL_USE_ADVANCED=0 -DLIS3MDL_SHARED_I2C=0
+
# Define ASM defines here
UADEFS =
diff --git a/testhal/STM32/STM32F4xx/I2C-LIS3MLD/debug/STM32F4xx-I2C-LIS3MDL (OpenOCD, Flash and Run).launch b/testhal/STM32/STM32F4xx/I2C-LIS3MLD/debug/STM32F4xx-I2C-LIS3MDL (OpenOCD, Flash and Run).launch
index 48d2c9465..b82cd6efd 100644
--- a/testhal/STM32/STM32F4xx/I2C-LIS3MLD/debug/STM32F4xx-I2C-LIS3MDL (OpenOCD, Flash and Run).launch
+++ b/testhal/STM32/STM32F4xx/I2C-LIS3MLD/debug/STM32F4xx-I2C-LIS3MDL (OpenOCD, Flash and Run).launch
@@ -33,7 +33,7 @@
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
-<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content id=&quot;sr-i2c_lld_serve_error_interrupt-(format)&quot; val=&quot;2&quot;/&gt;&lt;content id=&quot;null-read_raw-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;SR2-i2c-null-main-(format)&quot; val=&quot;2&quot;/&gt;&lt;content id=&quot;i2c-null-main-(format)&quot; val=&quot;0&quot;/&gt;&lt;/contentList&gt;"/>
+<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;contentList&gt;&lt;content id=&quot;SR2-i2c-null-main-(format)&quot; val=&quot;2&quot;/&gt;&lt;content id=&quot;null-read_raw-(format)&quot; val=&quot;1&quot;/&gt;&lt;content id=&quot;sr-i2c_lld_serve_error_interrupt-(format)&quot; val=&quot;2&quot;/&gt;&lt;content id=&quot;i2c-null-main-(format)&quot; val=&quot;0&quot;/&gt;&lt;/contentList&gt;"/>
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;globalVariableList/&gt;&#13;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList/&gt;&#13;&#10;"/>
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/>
diff --git a/testhal/STM32/STM32F4xx/I2C-LIS3MLD/main.c b/testhal/STM32/STM32F4xx/I2C-LIS3MLD/main.c
index a1c148c88..a4a86a226 100644
--- a/testhal/STM32/STM32F4xx/I2C-LIS3MLD/main.c
+++ b/testhal/STM32/STM32F4xx/I2C-LIS3MLD/main.c
@@ -44,18 +44,18 @@ static const I2CConfig i2ccfg = {
static LIS3MDLConfig LIS3MDLcfg = {
&I2CD1, /* Pointer to I2C Driver.*/
&i2ccfg, /* Pointer to I2C Configuration.*/
- {0, 0, 0}, /* Use default sensitivity.*/
- {0, 0, 0}, /* Use default bias.*/
+ NULL, /* Use default sensitivity.*/
+ NULL, /* Use default bias.*/
LIS3MDL_SAD_VCC, /* Slave address.*/
LIS3MDL_FS_4GA, /* Full scale value.*/
LIS3MDL_ODR_40HZ, /* Output data rate.*/
#if LIS3MDL_USE_ADVANCED || defined(__DOXYGEN__)
- LIS3MDL_LP_T,
- LIS3MDL_MD_T,
- LIS3MDL_OMXY_T,
- LIS3MDL_OMZ_T,
- LIS3MDL_BDU_T,
- LIS3MDL_END_T
+ LIS3MDL_LP_ENABLED,
+ LIS3MDL_MD_CONTINUOUS,
+ LIS3MDL_OMXY_LOW_POWER,
+ LIS3MDL_OMZ_LOW_POWER,
+ LIS3MDL_BDU_CONTINUOUS,
+ LIS3MDL_END_LITTLE
#endif
};