micro_climate/Drivers/HP203B/hp203b.h

37 lines
855 B
C
Raw Normal View History

2024-07-18 08:31:44 +00:00
#ifndef __HP203B_H__
#define __HP203B_H__
2024-07-18 08:31:44 +00:00
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "comm_types.h"
2024-07-18 08:31:44 +00:00
#define IIC_SDA_PIN GPIO_PIN_4
#define IIC_SDA_PORT GPIOB
#define IIC_SCL_PIN GPIO_PIN_7
#define IIC_SCL_PORT GPIOA
2024-07-18 10:15:50 +00:00
#define HP20X_ADDRESSCMD 0x77<<1 //CSB PIN = 0<><30><EFBFBD>͵<EFBFBD>ƽ
2024-07-18 08:31:44 +00:00
#define HP20X_READ_P 0x30 //read_p command
#define HP20X_READ_A 0x31 //read_a command
#define HP20X_READ_T 0x32 //read_t command
#define HP20X_READ_PT 0x10 //read_pt command
#define HP20X_READ_AT 0x11 //read_at command
2024-07-18 08:31:44 +00:00
#define HP20X_CONVERT_OSR1024 0x48
void hp203_set_mode();
float Hp203bReadPressure(void);
BOOL get_press_data(void);
2024-07-18 08:31:44 +00:00
#ifdef __cplusplus
}
#endif
2024-07-18 08:31:44 +00:00
#endif /*__ __HP203B_H__ */