109 #define LTC4261_I2C_Address 0x10 117 #define LTC4261_I2C_ALERT_RESPONSE 0x0C 118 #define LTC4261_I2C_MASS_WRITE 0x3E 124 #define LTC4261_STATUS_REG 0x00 125 #define LTC4261_FAULT_REG 0x01 126 #define LTC4261_ALERT_REG 0x02 127 #define LTC4261_CONTROL_REG 0x03 128 #define LTC4261_SENSE_MSB_REG 0x04 129 #define LTC4261_SENSE_LSB_REG 0x05 130 #define LTC4261_ADIN2_MSB_REG 0x06 131 #define LTC4261_ADIN2_LSB_REG 0x07 132 #define LTC4261_ADIN_MSB_REG 0x08 133 #define LTC4261_ADIN_LSB_REG 0x09 138 #define LTC4261_PGIO_POWER_GOODX 0x00 139 #define LTC4261_PGIO_POWER_GOOD 0x80 140 #define LTC4261_PGIO_GENERAL_PURPOSE_OUTPUT 0x40 141 #define LTC4261_PGIO_GENERAL_PURPOSE_INPUT 0xC0 143 #define LTC4261_TEST_MODE_ENABLE 0x20 144 #define LTC4261_TEST_MODE_DISABLE 0xDF 146 #define LTC4261_POWER_BAD_AUTO_RETRY_ENABLE 0x10 147 #define LTC4261_POWER_BAD_AUTO_RETRY_DISABLE 0xEF 149 #define LTC4261_FET_ON 0x08 150 #define LTC4261_FET_OFF 0xF7 152 #define LTC4261_OVERCURRENT_AUTO_RETRY_ENABLE 0x04 153 #define LTC4261_OVERCURRENT_AUTO_RETRY_DISABLE 0xFB 155 #define LTC4261_UNDERVOLTAGE_AUTO_RETRY_ENABLE 0x02 156 #define LTC4261_UNDERVOLTAGE_AUTO_RETRY_DISABLE 0xFD 158 #define LTC4261_OVERVOLTAGE_AUTO_RETRY_ENABLE 0x01 159 #define LTC4261_OVERVOLTAGE_AUTO_RETRY_DISABLE 0xFE 164 #define LTC4261_EXTERNAL_FAULT 0x80 165 #define LTC4261_PGIO_INPUT_HIGH 0x40 166 #define LTC4261_FET_SHORT_FAULT 0x20 167 #define LTC4261_EN_STATE_CHANGE 0x10 168 #define LTC4261_POWER_BAD_FAULT 0x08 169 #define LTC4261_OVERCURRENT_FAULT 0x04 170 #define LTC4261_UNDERVOLTAGE_FAULT 0x02 171 #define LTC4261_OVERVOLTAGE_FAULT 0x01 176 #define LTC4261_EXTERNAL_FAULT_ENABLE 0x80 177 #define LTC4261_EXTERNAL_FAULT_DISABLE 0x7F 178 #define LTC4261_PGIO_OUTPUT_ENABLE 0x40 179 #define LTC4261_PGIO_OUTPUT_DISABLE 0xBF 180 #define LTC4261_FET_SHORT_ENABLE 0x20 181 #define LTC4261_FET_SHORT_DISABLE 0xDF 182 #define LTC4261_EN_STATE_ENABLE 0x10 183 #define LTC4261_EN_STATE_DISABLE 0xEF 184 #define LTC4261_POWER_BAD_ENABLE 0x08 185 #define LTC4261_POWER_BAD_DISABLE 0xF7 186 #define LTC4261_OVERCURRENT_ENABLE 0x04 187 #define LTC4261_OVERCURRENT_DISABLE 0xFB 188 #define LTC4261_UNDERVOLTAGE_ENABLE 0x02 189 #define LTC4261_UNDERVOLTAGE_DISABLE 0xFD 190 #define LTC4261_OVERVOLTAGE_ENABLE 0x01 191 #define LTC4261_OVERVOLTAGE_DISABLE 0xFE 224 float LTC4261_ADIN_lsb,
225 float resistor_divider_ratio
231 float LTC4261_DELTA_SENSE_lsb
static uint8_t adc_command
int8_t LTC4261_read_10_bits(uint8_t i2c_address, uint8_t adc_command, uint16_t *adc_code)
Reads a 10-bit adc_code from LTC4261.
const float resistor
resistor value on demo board
int8_t LTC4261_read(uint8_t i2c_address, uint8_t command, uint8_t *code)
Reads an 8-bit adc_code from LTC4261.
int8_t LTC4261_ARA(uint8_t alert_response_address, uint8_t *i2c_address)
SMBus Alert Response Protocol: Sends an alert response command and releases /ALERT pin...
float LTC4261_ADIN_code_to_voltage(uint16_t adc_code, float LTC4261_ADIN_lsb, float resistor_divider_ratio)
Calculate the LTC4261 ADIN voltage.
int8_t LTC4261_write(uint8_t i2c_address, uint8_t command, uint8_t code)
Write an 8-bit code to the LTC4261.
float LTC4261_code_to_current(uint16_t adc_code, float resistor, float LTC4261_DELTA_SENSE_lsb)
Calculate the LTC4261 current with a sense resistor.