micro_climate/Drivers/HP203B/hp203b.h

22 lines
651 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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