/*
 * mcp9808.h
 *
 *  Created on: 31 mar 2024
 *      Author: user
 *
 *      https://www.microchip.com/en-us/product/mcp9808
 *      https://www.adafruit.com/product/1782
 *      https://github.com/adafruit/Adafruit_MCP9808_Library
 *
 */

#ifndef INC_MCP9808_H_
#define INC_MCP9808_H_

#define MCP9808_REG_RESOLUTION (0x08)

#define MCP9808_I2C_ADDRESS (0x1F << 1)
#define MCP9808_I2C_BUS (&hi2c3)

void Mcp9808SetResolution(uint8_t);
float Mcp9808GetTemperature(void);
uint8_t hysteresis_controller(float control_error, float hysteresis_width);

#endif /* INC_MCP9808_H_ */
