72 lines
1.8 KiB
C
72 lines
1.8 KiB
C
|
|
/**
|
||
|
|
******************************************************************************
|
||
|
|
* @file IMU.h
|
||
|
|
* @author Waveshare Team
|
||
|
|
* @version V1.0
|
||
|
|
* @date 29-August-2014
|
||
|
|
* @brief This file contains all the functions prototypes for the IMU firmware
|
||
|
|
* library.
|
||
|
|
|
||
|
|
******************************************************************************
|
||
|
|
* @attention
|
||
|
|
*
|
||
|
|
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
|
||
|
|
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
|
||
|
|
* TIME. AS A RESULT, WAVESHARE SHALL NOT BE HELD LIABLE FOR ANY
|
||
|
|
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
|
||
|
|
* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
|
||
|
|
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
|
||
|
|
*
|
||
|
|
******************************************************************************
|
||
|
|
*/
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
#ifndef __MS5525DS_H
|
||
|
|
#define __MS5525DS_H
|
||
|
|
|
||
|
|
#include "SPIDevice.h"
|
||
|
|
|
||
|
|
typedef enum{
|
||
|
|
pp001DS,
|
||
|
|
pp015DS
|
||
|
|
} MS5525DSO_t;
|
||
|
|
|
||
|
|
typedef struct Baro_MS5525DS{
|
||
|
|
const char *name;
|
||
|
|
SPI_DEV_t *_dev;
|
||
|
|
MS5525DSO_t _type;
|
||
|
|
int Q1;
|
||
|
|
int Q2;
|
||
|
|
int Q3;
|
||
|
|
int Q4;
|
||
|
|
int Q5;
|
||
|
|
int Q6;
|
||
|
|
int32_t T_ref;
|
||
|
|
int64_t OFF_T1;
|
||
|
|
int64_t SENS_T1;
|
||
|
|
|
||
|
|
uint16_t C[8];
|
||
|
|
int32_t D1,D2;
|
||
|
|
int32_t dT;
|
||
|
|
uint8_t stage;
|
||
|
|
|
||
|
|
int32_t pressure; /* Pa */
|
||
|
|
int16_t temp; /*0.01*degC -50~150 */
|
||
|
|
int16_t ext_temp; /*0.01*degC -50~150 */
|
||
|
|
|
||
|
|
// statics
|
||
|
|
int cnt;
|
||
|
|
int last_cnt;
|
||
|
|
int pps;
|
||
|
|
} Baro_MS5525DS_t;
|
||
|
|
|
||
|
|
extern int Baro_MS5525DS_init(Baro_MS5525DS_t *baro, const char *name, SPI_DEV_t *dev, MS5525DSO_t type);
|
||
|
|
extern bool Baro_MS5525S_update(Baro_MS5525DS_t *baro);
|
||
|
|
void Baro_MS5525S_stats(Baro_MS5525DS_t *baro);
|
||
|
|
|
||
|
|
#endif
|
||
|
|
|
||
|
|
/******************* (C) COPYRIGHT 2014 Waveshare *****END OF FILE*******************/
|
||
|
|
|