1
Dependencies: sMotor LIS3MDL X_NUCLEO_53L0A1
Diff: lis3mdl_class.h
- Revision:
- 0:ed3e71232bc7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lis3mdl_class.h Thu May 23 05:55:34 2019 +0000 @@ -0,0 +1,23 @@ +#ifndef lis3mdl_class_h +#define lis3mdl_class_h + +class lis3mdl{ +public: + virtual int set_m_axes_offset(uint8_t axe, int16_t offset) {//my + return LIS3MDL_M_SetAxeOffset(axe, offset); + } + virtual int set_BDU() { //my + uint8_t tmp; + if(LIS3MDL_IO_Read(&tmp,LIS3MDL_M_CTRL_REG5_M,1)!= + MAGNETO_OK) + return MAGNETO_ERROR; + tmp=0x40; + return LIS3MDL_IO_Write(&tmp, LIS3MDL_M_CTRL_REG5_M, 1); + } + +protected: + MAGNETO_StatusTypeDef LIS3MDL_M_SetAxeOffset(uint8_t axe,int16_t offset);//my + +}; + +#endif \ No newline at end of file