IMU_DUAL/ASM330LHH/user_asm330lhh.h

38 lines
736 B
C
Raw Normal View History

2022-12-06 17:34:02 +08:00
#ifndef USER_ASM330LHH
#define USER_ASM330LHH
#define SPI1_CS_PORT GPIOA
#define SPI1_CS_PIN GPIO_PIN_4
#include <string.h>
#include <stdio.h>
#include "asm330lhh_reg.h"
#include "stm32f1xx_hal.h"
#include "rtklib.h"
#define IMU_READY 1
#define IMU_NOT_READY 1
#define IMU_LOCK 1
#define IMU_UNLOCK 0
2022-12-12 15:05:54 +08:00
typedef struct{
int16_t x_a; //加速度值原始数据
int16_t y_a;
int16_t z_a;
int16_t x_g; //角速度值原始数据
int16_t y_g;
int16_t z_g;
float x_acc; //转换为真实加速度
float y_acc;
float z_acc;
float x_gyro; //转换为真实角速度
float y_gyro;
float z_gyro;
}asm_value;
extern asm_value asm330;
2022-12-06 17:34:02 +08:00
void user_dev_init();
extern stmdev_ctx_t spi1_dev;
#endif