Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board

Library for LTM9100 Anyside™ High Voltage Isolated Switch Controller with I²C Command and Telemetry. More...

Detailed Description

Library for LTM9100 Anyside™ High Voltage Isolated Switch Controller with I²C Command and Telemetry.

Definition in file LTM9100.cpp.

Go to the source code of this file.

Functions

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. More...
 
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 console. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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 the bus. More...
 
int8_t LTM9100_print_all_registers (uint8_t i2c_address)
 Read all LTM9100 registers and output to the serial console. More...
 
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 detected. More...
 
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. More...
 

Variables

uint8_t reg_read_list [10] = {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09}
 
uint8_t reg_write_list [9] = {0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09}
 

Function Documentation

◆ LTM9100_adc_read()

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 console.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 80 of file LTM9100.cpp.

◆ LTM9100_alert_read()

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 the bus.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 155 of file LTM9100.cpp.

◆ LTM9100_bit_clear()

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.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 133 of file LTM9100.cpp.

◆ LTM9100_bit_read()

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.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 146 of file LTM9100.cpp.

◆ LTM9100_bit_set()

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.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 120 of file LTM9100.cpp.

◆ LTM9100_continuous_read_all_registers()

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 detected.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 188 of file LTM9100.cpp.

◆ LTM9100_print_all_registers()

int8_t LTM9100_print_all_registers ( uint8_t  i2c_address)

Read all LTM9100 registers and output to the serial console.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 163 of file LTM9100.cpp.

◆ LTM9100_register_read()

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.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 72 of file LTM9100.cpp.

◆ LTM9100_register_write()

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.

Returns
Returns the state of the acknowledge bit after the I2C address write. 0=acknowledge, 1=no acknowledge.

Definition at line 112 of file LTM9100.cpp.

◆ valid_register()

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.

Returns
Returns the validity of user_register against the the supplied register set.

Definition at line 212 of file LTM9100.cpp.

Variable Documentation

◆ reg_read_list

uint8_t reg_read_list[10] = {0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09}

Definition at line 68 of file LTM9100.cpp.

◆ reg_write_list

uint8_t reg_write_list[9] = {0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09}

Definition at line 69 of file LTM9100.cpp.