GeekIMU/2.Firmware/STM32/Firmware/sensor/lis3mdl.h

67 lines
2.6 KiB
C
Raw Normal View History

2024-11-09 21:39:20 +08:00
/******************** (C) COPYRIGHT 2020 GEEKIMU *******************************
* File Name : LIS3MDL.h
* Current Version : V2.0 & ST 3.5.0
* Author : zhanli 719901725@qq.com & JustFeng.
* Date of Issued : 2019.5.26 zhanli : Create
* Comments : LIS3MDL
********************************************************************************/
#ifndef _LIS3MDL_H_
#define _LIS3MDL_H_
#include "stm32f10x.h"
#include "calibrate.h"
typedef struct{
int16_t Mag[3];
}LIS3MDL_Data;
/**----------------------------------------------------------------------
* Function : LIS3MDL_IO_Init
* Description : LIS3MDL()IO
* Author : zhanli&719901725@qq.com
* Date : 2019/5/26 zhanli
*---------------------------------------------------------------------**/
void LIS3MDL_IO_Init(void);
/**----------------------------------------------------------------------
* Function : LIS3MDL_Init
* Description : LIS3MDL()
* Author : zhanli&719901725@qq.com
* Date : 2019/5/26 zhanli
*---------------------------------------------------------------------**/
void LIS3MDL_Init(void);
/**----------------------------------------------------------------------
* Function : LIS3MDL_GetData
* Description : LIS3MDL()
* Author : zhanli&719901725@qq.com
* Date : 2019/5/26 zhanli
*---------------------------------------------------------------------**/
void LIS3MDL_GetData(float *mx,float *my,float *mz);
/**----------------------------------------------------------------------
* Function : Magnet_Calibrate
* Description :
* Author : zhanli&719901725@qq.com
* Date : 2019/5/26 zhanli
*---------------------------------------------------------------------**/
void Magnet_Calibrate(float *mx, float *my, float *mz, Calibrate_Info mCali_Info);
/**----------------------------------------------------------------------
* Function : LIS3MDL_Write_Byte
* Description : MPU6500
* Author : zhanli&719901725@qq.com
* Date : 2019/5/26 zhanli
*---------------------------------------------------------------------**/
uint8_t LIS3MDL_Write_Byte(uint8_t reg,uint8_t data);
/**----------------------------------------------------------------------
* Function : LIS3MDL_Read_Byte
* Description : MPU6500
* Author : zhanli&719901725@qq.com
* Date : 2019/5/26 zhanli
*---------------------------------------------------------------------**/
uint8_t LIS3MDL_Read_Byte(uint8_t reg);
#endif