串口ok
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
#ifndef __MS5607_H
|
||||
#define __MS5607_H
|
||||
|
||||
#include "SPIDevice.h"
|
||||
|
||||
#define MS5607_D1_CONVERTING 1
|
||||
#define MS5607_D2_CONVERTING 2
|
||||
|
||||
typedef struct Baro_MS5607{
|
||||
const char *name;
|
||||
SPI_DEV_t *_dev;
|
||||
|
||||
uint16_t Ms5607_Cof[6];
|
||||
uint16_t Ms5607_Setup;
|
||||
|
||||
uint32_t Ms5607_Raw_Temp;
|
||||
uint32_t Ms5607_Raw_Pressure;
|
||||
int PresurReadFlag;
|
||||
|
||||
int32_t pressure; /* Pa */
|
||||
int16_t temp; /*0.01*degC -50~150 */
|
||||
uint8_t status;
|
||||
|
||||
// statics
|
||||
int cnt;
|
||||
int last_cnt;
|
||||
int pps;
|
||||
uint8_t seq;
|
||||
} Baro_MS5607_t;
|
||||
|
||||
int MS5607_Pressure_init(Baro_MS5607_t *Baro, const char *name, SPI_DEV_t *dev);
|
||||
|
||||
int MS5607_Pressure_update(Baro_MS5607_t *Baro);
|
||||
|
||||
void MS5607_Pressure_stats(Baro_MS5607_t *Baro);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user