1

Dependencies:   sMotor LIS3MDL X_NUCLEO_53L0A1

Revision:
0:ed3e71232bc7
diff -r 000000000000 -r ed3e71232bc7 lis3mdl_class.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lis3mdl_class.cpp	Thu May 23 05:55:34 2019 +0000
@@ -0,0 +1,12 @@
+#include <lis3mdl_class.h> 
+
+MAGNETO_StatusTypeDef LIS3MDL::LIS3MDL_M_SetAxeOffset(uint8_t axe,int16_t offset)
+{
+  uint8_t tmp[2];
+  tmp[0]=offset;
+  tmp[1]=offset>>8;
+  if(LIS3MDL_IO_Write(tmp, 5+2*axe, 2)!= MAGNETO_OK)
+    return MAGNETO_ERROR;
+  else  
+    return MAGNETO_OK;
+}