///Copyright (c) 2022, 四川汇源光通信有限公司 
///All rights reserved. 
///@file        tmp75.h 
///@brief       tmp75驱动程序
///
///@details     
///@note        
///@author      lqc
///@date        2022/05/23 
///
///@version		v1.0 2022/05/23 初始版本

#ifndef __TMP75_H_
#define __TMP75_H_

#include "gd32f4xx_gpio.h"

#define TMP75_ADDRESS   0x90
#define TEMP_REGISTER_ADDRESS  0x00  //温度寄存器地址

#define TMP75_SCL_HIGH  gpio_bit_set(GPIOB, GPIO_PIN_6)
#define TMP75_SCL_LOW   gpio_bit_reset(GPIOB, GPIO_PIN_6)

#define TMP75_SDA_HIGH  gpio_bit_set(GPIOB, GPIO_PIN_7)
#define TMP75_SDA_LOW   gpio_bit_reset(GPIOB, GPIO_PIN_7)
#define TMP75_SDA_GET   gpio_input_bit_get(GPIOB, GPIO_PIN_7)

void temp75_gpio_init();
float tmp75_read_temp(void);

#endif