Files
Simba-OmniInfantry/云台/modules/sensor/ist8310.h
T

28 lines
781 B
C

#ifndef IST8310_H
#define IST8310_H
#include <stdint.h>
extern float ist8310_magnetic_field[3];//三轴磁场强度(uT)
extern float ist8310_temperature; //温度(℃)
extern uint8_t ist8310_online; //在线标志(1=初始化成功,0=检测失败)
extern uint8_t ist8310_last_who; //最近读取到的WHO_AM_I(正常0x10)
/*
*函数简介:初始化IST8310磁力计(硬件I2C3)
*参数说明:无
*返回类型:无
*备注:在任务上下文调用,有界重试失败后放弃并保持系统运行
*/
extern void ist8310_init(void);
/*
*函数简介:周期轮询读取IST8310三轴磁场数据
*参数说明:无
*返回类型:无
*备注:在IMU_Task 1kHz循环中调用,内部按5ms(200Hz)分频阻塞读取
*/
extern void ist8310_poll(void);
#endif