13#ifndef _ADT7XXX_SUPPORT_H 
   14#define _ADT7XXX_SUPPORT_H 
   21#define ADT7420_LSB_MASK                0x00FF 
   22#define ADT7420_MSB_MASK                0xFF00 
   23#define ADT7420_LSB_OFFSET              0 
   24#define ADT7420_MSB_OFFSET                  8 
   25#define ADT7420_CONFIG_CT_POL           NO_OS_BIT(2) 
   26#define ADT7420_CONFIG_FAULT_QUEUE(x)       ((x) & 0x3) 
   27#define ADT7420_CONFIG_INT_POL          NO_OS_BIT(3) 
   28#define ADT7420_CONFIG_INT_CT_MODE      NO_OS_BIT(4) 
   29#define ADT7420_MASK_SET_PT_REGISTER        0x00 
   32#define ADT7420_FAULT_QUEUE_1_FAULT     0 
   33#define ADT7420_FAULT_QUEUE_2_FAULTS        1 
   34#define ADT7420_FAULT_QUEUE_3_FAULTS        2 
   35#define ADT7420_FAULT_QUEUE_4_FAULTS        3 
   38#define ADT7320_DEFAULT_ID          0xC3 
   39#define ADT7420_DEFAULT_ID          0xCB 
   75                uint16_t register_value,
 
   80                    uint16_t register_address);
 
   84        uint16_t register_address, uint16_t *reg_val);
 
struct ad5933_dev * device
Definition main.c:90
 
int32_t adt7420_get_register_address_and_value(struct adt7420_dev *dev, uint16_t register_address, uint16_t *reg_val)
Reads the value of a register SPI/I2C.
Definition adt7xxx_support.c:39
 
int32_t adt7420_wr_setpoint_reg(struct adt7420_dev *device, uint16_t register_value, uint16_t data)
Write to a setpoint register.
Definition adt7xxx_support.c:225
 
int32_t adt7420_set_ct_int_polarity(struct adt7420_dev *dev, uint8_t polarity)
Sets output polarity for the pins CT/INT (Critical Temp - Over/Under Temp).
Definition adt7xxx_support.c:330
 
int32_t adt7420_set_ct_int_mode(struct adt7420_dev *dev, uint8_t setting)
Sets comparator/interrupt (CT/INT) mode for ADT7420/ADT7320.
Definition adt7xxx_support.c:298
 
registers_e
Definition adt7xxx_support.h:45
 
@ REG_CONFIG
Definition adt7xxx_support.h:48
 
@ REG_T_HIGH
Definition adt7xxx_support.h:51
 
@ REG_TEMP
Definition adt7xxx_support.h:46
 
@ REG_ID
Definition adt7xxx_support.h:53
 
@ REG_RESET
Definition adt7xxx_support.h:54
 
@ REG_T_LOW
Definition adt7xxx_support.h:52
 
@ REG_T_CRIT
Definition adt7xxx_support.h:49
 
@ REG_HIST
Definition adt7xxx_support.h:50
 
@ REG_STATUS
Definition adt7xxx_support.h:47
 
int32_t adt7420_set_fault_queue(struct adt7420_dev *dev, uint8_t mode)
Sets the Fault Queue option for ADT7420/ADT7320.
Definition adt7xxx_support.c:265
 
uint16_t configure_write_type_registers(struct adt7420_dev *dev, uint16_t register_address)
Configure write typev register based on communication interface.
Definition adt7xxx_support.c:152