#ifndef __HP203B_H__ #define __HP203B_H__ #ifdef __cplusplus extern "C" { #endif /* Includes ------------------------------------------------------------------*/ #include "main.h" #define IIC_SDA_PIN GPIO_PIN_4 #define IIC_SDA_PORT GPIOB #define IIC_SCL_PIN GPIO_PIN_7 #define IIC_SCL_PORT GPIOA #define HP20X_ADDRESSCMD_WRITE 0xee //CSB PIN = 0£¬µÍµçƽ #define HP20X_ADDRESSCMD_READ 0xef //CSB PIN = 0£¬µÍµçƽ #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 #define HP20X_CONVERT_OSR1024 0x48 void SOFT_IIC_Init(void); void HAL_Delay_us(uint32_t us); void hp203_set_mode(); void Hp203bReadPressure(void); #ifdef __cplusplus } #endif #endif /*__ __HP203B_H__ */