22 lines
651 B
C
22 lines
651 B
C
#ifndef _HP203B_H_
|
||
#define _HP203B_H_
|
||
#include "i2c.h"
|
||
#include "comm_types.h"
|
||
|
||
//#define HP20X_ADDRESSCMD 0xec //CSB PIN = 1,高电平
|
||
#define HP20X_ADDRESSCMD 0xee //CSB PIN = 0,低电平
|
||
#define HP20XX_RDY 0x8d
|
||
|
||
#define HP20X_WR_CONVERT_CMD 0x40
|
||
#define HP20X_CONVERT_OSR4096 0<<2
|
||
#define HP20X_CONVERT_OSR2048 1<<2
|
||
#define HP20X_CONVERT_OSR1024 2<<2 //0x08
|
||
#define HP20X_CONVERT_OSR512 3<<2
|
||
#define HP20X_CONVERT_OSR256 4<<2
|
||
#define HP20X_CONVERT_OSR128 5<<2
|
||
|
||
void HP203_soft_reset(void);
|
||
extern void Hp203bReadPressureTemperature(double *Hp203bPressure,double *Hp203bAltitude,double *Hp203bTemp);
|
||
|
||
#endif
|