/* Copyright 2025 by COG9 Enterprises LLC
 * All rights reserved.
 * Title: mcp9808.h
 * Author: Jed Marti KI7NNP
 * Description: Temperature sensor.
 * Created: Sun Oct  5 11:51:09 2025
 * Revision History:
 */


#ifndef mcp9808_h
#define mcp9808_h

// Internal register names.
enum {
      mcp9808_CONFIG = 0x01,
      mcp9808_TA     = 0x05,
};



#define TEMPA   0x18
#define TEMPB   0x19
#define TEMPC   0x1A
#define TEMPAUX 0x1C

// Default minimum/maximum temperature in degrees fahrenheit.
#define DEFAULTMINF  0
#define DEFAULTMAXF  110



// Initialize all 4. Note: check addresses later on.
void initTempSensors(void);

// Get one of the temperatures.
int16_t getCelcius(uint8_t i2caddr);
int16_t getFahrenheit(uint8_t i2caddr);
uint8_t checkTempLimits(void);
void tempPageScreen(void);

#endif
