43 lines
853 B
C
43 lines
853 B
C
/*
|
|
* user_iam20680.h
|
|
*
|
|
* Created on: Dec 7, 2022
|
|
* Author: FizeC
|
|
*/
|
|
|
|
#ifndef USER_IAM20680_H_
|
|
#define USER_IAM20680_H_
|
|
#include <string.h>
|
|
#include <stdio.h>
|
|
#include "rtklib.h"
|
|
//#include "iam20680.h"
|
|
#include "IMU_IAM20680.h"
|
|
#include "stm32f1xx_hal.h"
|
|
|
|
void user_dev_init1();
|
|
void tdk_sample();
|
|
uint8_t iam_write(uint8_t reg_addr, uint8_t *reg_data, uint16_t len);
|
|
uint8_t iam_read(uint8_t reg_addr, uint8_t *reg_data, uint16_t len);
|
|
|
|
|
|
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;
|
|
} tdk_value;
|
|
extern tdk_value iam20680;
|
|
|
|
extern IAM20680_t spi2_dev;
|
|
|
|
#endif /* USER_IAM20680_H_ */
|