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

50 lines
2.1 KiB
C
Raw Permalink Normal View History

2024-11-09 21:39:20 +08:00
/******************** (C) COPYRIGHT 2020 GEEKIMU *******************************
* File Name : senddata.h
* Current Version : V2.0 & ST 3.5.0
* Author : zhanli 719901725@qq.com & JustFeng.
* Date of Issued : 2015.2.22 zhanli : Create
* Comments : IMU<EFBFBD><EFBFBD><EFBFBD>ݴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>ļ<EFBFBD>
********************************************************************************/
#ifndef _SENDDATA__H_
#define _SENDDATA__H_
#include <stdint.h>
#define DATA_PACKET_SIZE 62
#define SAMPLE_SIZE 16
#define SAMPLE_START 8
/**----------------------------------------------------------------------
* Function : Data_Packet_Sensor
* Description : <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Oculus<EFBFBD>ֲ<EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD>IMU<EFBFBD><EFBFBD><EFBFBD>ݽ<EFBFBD><EFBFBD>д<EFBFBD><EFBFBD><EFBFBD>
* Author : zhanli&719901725@qq.com
* Date : 2015/2/13 zhanli
*---------------------------------------------------------------------**/
void Data_Packet_Sensor(uint8_t *buf, int32_t x, int32_t y, int32_t z);
/**----------------------------------------------------------------------
* Function : Data_Unpack_Sensor
* Description : <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Oculus<EFBFBD>ֲ<EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD>IMU<EFBFBD><EFBFBD><EFBFBD>ݽ<EFBFBD><EFBFBD>н<EFBFBD><EFBFBD><EFBFBD>
* Author : zhanli&719901725@qq.com
* Date : 2015/2/13 zhanli
*---------------------------------------------------------------------**/
void Data_Unpack_Sensor(const uint8_t *buf, int32_t *x, int32_t *y, int32_t *z);
/**----------------------------------------------------------------------
* Function : SensorData_Packet
* Description : <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݴ<EFBFBD><EFBFBD><EFBFBD>
* Author : zhanli&719901725@qq.com
* Date : 2015/2/13 zhanli
*---------------------------------------------------------------------**/
void SensorData_Packet(float ax,float ay,float az,float gx,float gy,float gz,
float mx,float my,float mz,float temp,float timestamp);
/**----------------------------------------------------------------------
* Function : Get_Sensor_Data
* Description : <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ٶȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٶȡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
* Author : zhanli&719901725@qq.com
* Date : 2015/2/13 zhanli
*---------------------------------------------------------------------**/
void Get_Sensor_Data(void);
#endif