38#define MAX6642_UPDATE_RATE 500
40#define MAX6642_CMD_READ_LOCAL 0x00
41#define MAX6642_CMD_READ_REMOTE 0x01
42#define MAX6642_CMD_READ_STATUS 0x02
43#define MAX6642_CMD_READ_CONFIG 0x03
44#define MAX6642_CMD_READ_LOCAL_LIMIT 0x05
45#define MAX6642_CMD_READ_REMOTE_LIMIT 0x07
46#define MAX6642_CMD_WRITE_CONFIG 0x09
47#define MAX6642_CMD_WRITE_LOCAL_LIMIT 0x0B
48#define MAX6642_CMD_WRITE_REMOTE_LIMIT 0x0D
49#define MAX6642_CMD_SINGLESHOT 0x0D
50#define MAX6642_CMD_READ_REMOTE_EXTD 0x10
51#define MAX6642_CMD_READ_LOCAL_EXTD 0x11
52#define MAX6642_CMD_READ_MANUF_ID 0xFE
55#define MAX6642_CFG_ALERT_MASK (1 << 7)
56#define MAX6642_CFG_STOP_RUN_MASK (1 << 6)
57#define MAX6642_CFG_EXT_ONLY_MASK (1 << 5)
58#define MAX6642_CFG_FAULT_QUEUE_MASK (1 << 4)
61#define MAX6642_STATUS_BUSY_MASK (1 << 7)
62#define MAX6642_STATUS_LOCAL_HIGH_MASK (1 << 6)
63#define MAX6642_STATUS_REMOTE_HIGH_MASK (1 << 5)
64#define MAX6642_STATUS_OPEN_MASK (1 << 4)
void max6642_write_cfg(sensor_t *sensor, uint8_t cfg)
Writes MAX6642 configuration byte.
Definition max6642.c:183
const SDR_type_01h_t SDR_MAX6642_FPGA
void max6642_write_local_limit(sensor_t *sensor, uint8_t limit)
Sets internal high temperature limit that asserts 'ALERT.
Definition max6642.c:195
uint8_t max6642_read_status(sensor_t *sensor)
Reads MAX6642 status byte.
Definition max6642.c:153
Bool max6642_read_remote_extd(sensor_t *sensor, uint8_t *temp)
Reads MAX6642's remote extended temperature value.
Definition max6642.c:135
Bool max6642_read_remote(sensor_t *sensor, uint8_t *temp)
Reads MAX6642's remote temperature value.
Definition max6642.c:99
void max6642_write_remote_limit(sensor_t *sensor, uint8_t limit)
Sets external high temperature limit that asserts 'ALERT.
Definition max6642.c:207
TaskHandle_t vTaskMAX6642_Handle
MAX6642 monitor Task Handle.
Definition max6642.c:44
Bool max6642_read_local(sensor_t *sensor, uint8_t *temp)
Reads MAX6642's local temperature value.
Definition max6642.c:82
Bool max6642_read_local_extd(sensor_t *sensor, uint8_t *temp)
Reads MAX6642's local extended temperature value.
Definition max6642.c:117
void vTaskMAX6642(void *Parameters)
MAX6642 Monitor Task.
Definition max6642.c:46
void MAX6642_init(void)
Initializes MAX6642 sensor and creates vTaskMAX6642.
Definition max6642.c:77
uint8_t max6642_read_cfg(sensor_t *sensor)
Reads MAX6642 configuration byte.
Definition max6642.c:168