Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Fork of LIS3MDL by
Diff: lis3mdl_class.cpp
- Revision:
- 6:308889c4d074
- Parent:
- 4:00493226e59f
--- a/lis3mdl_class.cpp	Fri Oct 06 12:17:06 2017 +0000
+++ b/lis3mdl_class.cpp	Wed Oct 18 11:14:26 2017 +0200
@@ -90,9 +90,9 @@
 {
   uint8_t tmp1 = 0x00;
   MAGNETO_InitTypeDef *initStructure = LIS3MDL_Init;
+  MAGNETO_InitTypeDef tempInit;  
   
   if (initStructure == NULL) {// default params   
-    MAGNETO_InitTypeDef tempInit;
     tempInit.M_FullScale = LIS3MDL_M_FS_4;
     tempInit.M_OperatingMode = LIS3MDL_M_MD_CONTINUOUS;
     tempInit.M_XYOperativeMode = LIS3MDL_M_OM_HP;
    