59 #define LTM_9100_STATUS_A_REG 0x00 60 #define LTM_9100_FAULT_B_REG 0x01 61 #define LTM_9100_ALERT_C_REG 0x02 62 #define LTM_9100_CTRL_D_REG 0x03 63 #define LTM_9100_SENSE_E_REG 0x04 64 #define LTM_9100_SENSE_F_REG 0x05 65 #define LTM_9100_ADIN2_G_REG 0x06 66 #define LTM_9100_ADIN2_H_REG 0x07 67 #define LTM_9100_ADIN_I_REG 0x08 68 #define LTM_9100_ADIN_J_REG 0x09 70 #define LTM_9100_STATUS_GATE 0x07 71 #define LTM_9100_STATUS_PGI 0x06 72 #define LTM_9100_STATUS_FET 0x05 73 #define LTM_9100_STATUS_OC 0x02 74 #define LTM_9100_STATUS_UV 0x01 75 #define LTM_9100_STATUS_OV 0x00 77 #define LTM_9100_FAULT_PGI 0x06 78 #define LTM_9100_FAULT_FET 0x05 79 #define LTM_9100_FAULT_OC 0x02 80 #define LTM_9100_FAULT_UV 0x01 81 #define LTM_9100_FAULT_OV 0x00 83 #define LTM_9100_ALERT_PGO LTM_9100_FAULT_PGI 84 #define LTM_9100_ALERT_FET LTM_9100_FAULT_FET 85 #define LTM_9100_ALERT_OC LTM_9100_FAULT_OC 86 #define LTM_9100_ALERT_UV LTM_9100_FAULT_UV 87 #define LTM_9100_ALERT_OV LTM_9100_FAULT_OV 89 #define LTM_9100_CTRL_PGIO_CFG 0x06 90 #define LTM_9100_CTRL_PGIO_CFG_MASK 0xC0 91 #define LTM_9100_CTRL_ADC_WRITE 0x05 92 #define LTM_9100_CTRL_GATE_CTRL 0x03 93 #define LTM_9100_CTRL_OC 0x02 94 #define LTM_9100_CTRL_UV 0x01 95 #define LTM_9100_CTRL_OV 0x00 97 #define LTM_9100_SENSE_mV_PER_TICK 0.0625 98 #define LTM_9100_ADIN_V_PER_TICK 0.0025 99 #define LTM_9100_ADIN2_V_PER_TICK 0.0025 148 boolean valid_register(uint8_t user_register, uint8_t register_array[], uint8_t array_length);
uint8_t reg_write_list[9]
int8_t LTM9100_print_all_registers(uint8_t i2c_address)
Read all LTM9100 registers and output to the serial console.
int8_t LTM9100_bit_read(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number, uint8_t *register_data)
Read the bit specified by bit_number from the LTM9100.
uint8_t reg_read_list[10]
int8_t LTM9100_register_read(uint8_t i2c_address, uint8_t register_address, uint8_t *register_data)
Reads an 8-bit register from the LTM9100 using the standard repeated start format.
int8_t LTM9100_alert_read(uint8_t *register_data)
Attempts to read a byte from the I2C bus using the alert address (0xC) to ascertain pending alerts on...
int8_t LTM9100_adc_read(uint8_t i2c_address, uint8_t base_address, float *register_data)
Read the specified ADC value (SENSE, ADIN, ADIN2) and output in human readable format to the serial c...
int8_t LTM9100_continuous_read_all_registers(uint8_t i2c_address)
Read all LTM9100 registers and output to the serial console every second until a key press is detecte...
int8_t LTM9100_register_write(uint8_t i2c_address, uint8_t register_address, uint8_t register_data)
Writes to an 8-bit register inside the LTM9100 using the standard I2C repeated start format...
int8_t LTM9100_bit_clear(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number)
Clears any bit inside the LTM9100 using the standard I2C repeated start format.
boolean valid_register(uint8_t user_register, uint8_t register_array[], uint8_t array_length)
Check if user_register is a valid register for the LTM9100.
int8_t LTM9100_bit_set(uint8_t i2c_address, uint8_t register_address, uint8_t bit_number)
Sets any bit inside the LTM9100 using the standard I2C repeated start format.