/*
 *** author: zhouchao
 *** date: 2019-03-28
 *** version: 1.00
 *** e-mail:  zhouchao@storlead.com  1959353124@qq.com
 *** brief: LM73 driver
 ***
 *
*/



#include "bmc_main.h"
#include "bmc_conf.h"
#include "bmc_type.h"
#include "i2c_api.h"
#include "stm32f429xx.h"
#include "sensor_sdr_init.h"

void sensor_sdr_init(void)
{
	char Sensor3V3Calibration[2]={0x08,0x00};//resistance==2 4096/resistance=0x0800
	char Sensor12V0Calibration[2]={0x03,0x33};//resistance==5 4096/resistance=0x0333
	char Sensor5V0Calibration[2]={0x01,0x99};//resistance==10 4096/resistance=0x0199

	I2C_DEV_T i2c_dev;
	i2c_dev.bus = I2C3;
	//3.3V
	I2C_Master_Transmit(&i2c_dev,0x88,Sensor3V3Calibration,0x05,0x02);
	I2C_Master_Transmit(&i2c_dev,0x82,Sensor5V0Calibration,0x05,0x02);
	I2C_Master_Transmit(&i2c_dev,0x80,Sensor12V0Calibration,0x05,0x02);
}




