diff options
4 files changed, 22 insertions, 13 deletions
diff --git a/demos/STM32/RT-STM32F207ZG-NUCLEO144/debug/RT-STM32F207ZG-NUCLEO144 (OpenOCD, Flash and Run).launch b/demos/STM32/RT-STM32F207ZG-NUCLEO144/debug/RT-STM32F207ZG-NUCLEO144 (OpenOCD, Flash and Run).launch index 4d8bf462b..20ebc6f3e 100644 --- a/demos/STM32/RT-STM32F207ZG-NUCLEO144/debug/RT-STM32F207ZG-NUCLEO144 (OpenOCD, Flash and Run).launch +++ b/demos/STM32/RT-STM32F207ZG-NUCLEO144/debug/RT-STM32F207ZG-NUCLEO144 (OpenOCD, Flash and Run).launch @@ -39,7 +39,7 @@ <stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="RT-STM32F207ZG-NUCLEO144"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
-<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="0.1984968159"/>
+<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="0.114656749"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/RT-STM32F207ZG-NUCLEO144"/>
</listAttribute>
diff --git a/demos/STM32/RT-STM32F746ZG-NUCLEO144/debug/RT-STM32F746ZE-NUCLEO144 (OpenOCD, Flash and Run).launch b/demos/STM32/RT-STM32F746ZG-NUCLEO144/debug/RT-STM32F746ZE-NUCLEO144 (OpenOCD, Flash and Run).launch index 8d70020ed..5614c6b13 100644 --- a/demos/STM32/RT-STM32F746ZG-NUCLEO144/debug/RT-STM32F746ZE-NUCLEO144 (OpenOCD, Flash and Run).launch +++ b/demos/STM32/RT-STM32F746ZG-NUCLEO144/debug/RT-STM32F746ZE-NUCLEO144 (OpenOCD, Flash and Run).launch @@ -28,7 +28,7 @@ <stringAttribute key="org.eclipse.cdt.debug.mi.core.DEBUG_NAME" value="arm-none-eabi-gdb"/>
<stringAttribute key="org.eclipse.cdt.debug.mi.core.commandFactory" value="Standard"/>
<stringAttribute key="org.eclipse.cdt.debug.mi.core.protocol" value="mi"/>
-<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="false"/>
+<booleanAttribute key="org.eclipse.cdt.debug.mi.core.verboseMode" value="true"/>
<stringAttribute key="org.eclipse.cdt.dsf.gdb.DEBUG_NAME" value="arm-none-eabi-gdb"/>
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
@@ -39,7 +39,7 @@ <stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="RT-STM32F746ZG-NUCLEO144"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
-<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="0.114656749"/>
+<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="0.603687198"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/RT-STM32F746ZG-NUCLEO144"/>
</listAttribute>
diff --git a/os/ex/ST/lsm303dlhc.c b/os/ex/ST/lsm303dlhc.c index a86885b27..f538b559c 100644 --- a/os/ex/ST/lsm303dlhc.c +++ b/os/ex/ST/lsm303dlhc.c @@ -472,6 +472,12 @@ static msg_t acc_set_full_scale(void *ip, lsm303dlhc_acc_fs_t fs) { scale = newfs / ((LSM303DLHCDriver *)ip)->accfullscale;
((LSM303DLHCDriver *)ip)->accfullscale = newfs;
+#if LSM303DLHC_SHARED_I2C
+ i2cAcquireBus(((LSM303DLHCDriver *)ip)->config->i2cp);
+ i2cStart(((LSM303DLHCDriver *)ip)->config->i2cp,
+ ((LSM303DLHCDriver *)ip)->config->i2ccfg);
+#endif /* LSM303DLHC_SHARED_I2C */
+
/* Updating register.*/
msg = lsm303dlhcI2CReadRegister(((LSM303DLHCDriver *)ip)->config->i2cp,
LSM303DLHC_SAD_ACC,
@@ -486,6 +492,9 @@ static msg_t acc_set_full_scale(void *ip, lsm303dlhc_acc_fs_t fs) { LSM303DLHC_SAD_ACC, buff, 1);
if(msg != MSG_OK)
return msg;
+#if LSM303DLHC_SHARED_I2C
+ i2cReleaseBus(((LSM303DLHCDriver *)ip)->config->i2cp);
+#endif /* LSM303DLHC_SHARED_I2C */
/* Scaling sensitivity and bias. Re-calibration is suggested anyway. */
for(i = 0; i < LSM303DLHC_ACC_NUMBER_OF_AXES; i++) {
diff --git a/os/ex/ST/lsm303dlhc.h b/os/ex/ST/lsm303dlhc.h index 470d8b77e..0fae07b50 100644 --- a/os/ex/ST/lsm303dlhc.h +++ b/os/ex/ST/lsm303dlhc.h @@ -41,7 +41,7 @@ /**
* @brief LSM303DLHC driver version string.
*/
-#define EX_LSM303DLHC_VERSION "1.0.0"
+#define EX_LSM303DLHC_VERSION "1.0.1"
/**
* @brief LSM303DLHC driver version major number.
@@ -56,7 +56,7 @@ /**
* @brief LSM303DLHC driver version patch number.
*/
-#define EX_LSM303DLHC_PATCH 0
+#define EX_LSM303DLHC_PATCH 1
/** @} */
/**
@@ -176,14 +176,14 @@ * @{
*/
#define LSM303DLHC_CTRL_REG1_A_MASK 0xFF
-#define LSM303DLHC_CTRL_REG1_A_XEN (1 << 0)
-#define LSM303DLHC_CTRL_REG1_A_YEN (1 << 1)
-#define LSM303DLHC_CTRL_REG1_A_ZEN (1 << 2)
-#define LSM303DLHC_CTRL_REG1_A_LPEN (1 << 3)
-#define LSM303DLHC_CTRL_REG1_A_ODR0 (1 << 4)
-#define LSM303DLHC_CTRL_REG1_A_ODR1 (1 << 5)
-#define LSM303DLHC_CTRL_REG1_A_ODR2 (1 << 6)
-#define LSM303DLHC_CTRL_REG1_A_ODR3 (1 << 7)
+#define LSM303DLHC_CTRL_REG1_A_XEN (1 << 0)
+#define LSM303DLHC_CTRL_REG1_A_YEN (1 << 1)
+#define LSM303DLHC_CTRL_REG1_A_ZEN (1 << 2)
+#define LSM303DLHC_CTRL_REG1_A_LPEN (1 << 3)
+#define LSM303DLHC_CTRL_REG1_A_ODR0 (1 << 4)
+#define LSM303DLHC_CTRL_REG1_A_ODR1 (1 << 5)
+#define LSM303DLHC_CTRL_REG1_A_ODR2 (1 << 6)
+#define LSM303DLHC_CTRL_REG1_A_ODR3 (1 << 7)
/** @} */
/**
|