95 Serial.println(F(
"Initializing LTC4155"));
102 Serial.println(F(
"Press any key to arm ship-and-store mode."));
103 while (Serial.available() == 0);
104 while (Serial.available() > 0)
107 Serial.println(F(
"Ship-and-store mode armed.\n"));
109 Serial.println(F(
"Press any key to disarm ship-and-store mode."));
110 while (Serial.available() == 0);
111 while (Serial.available() > 0)
115 Serial.println(F(
"Ship-and-store mode disarmed.\n"));
122 *data = smbus->
readByte(addr, command_code);
130 smbus->
writeByte(addr, command_code, data);
#define LTC4155_ADDR_09
LTC4155 I2C address in 7-bit format.
int LTC4155_read_register(LTC4155 chip_handle, uint16_t registerinfo, uint8_t *data)
Retrieves a bit field data into *data.
Header File for Linduino Libraries and Demo Code.
#define LTC4155_ARM_SHIPMODE_PRESET_ARM
LTC4155 LTC4155_init(LTC4155_chip_cfg_t *cfg)
Returns a pointer to a LTC4155 structure used by LTC4155_write_register and LTC4155_read_register.
static int read_register(uint8_t addr, uint8_t command_code, uint8_t *data, port_configuration_t *port_configuration)
read_register function wraps C++ method LT_SMBus::readByte and places the returned data in *data...
Information required to access hardware SMBus port.
static int write_register(uint8_t addr, uint8_t command_code, uint8_t data, port_configuration_t *port_configuration)
write_register function wraps C++ method LT_SMBus::writeByte.
#define LTC4155_ARM_SHIPMODE
LT_I2CBus: Routines to communicate to I2C by Wire Library.
int LTC4155_write_register(LTC4155 chip_handle, uint16_t registerinfo, uint8_t data)
Function to modify a bit field within a register while preserving the unaddressed bit fields...
virtual void writeByte(uint8_t address, uint8_t command, uint8_t data)=0
SMBus write byte command.
virtual uint8_t readByte(uint8_t address, uint8_t command)=0
SMBus read byte command.
LTC4155: Dual-Input Power Manager / 3.5A Li-Ion Battery Charger with I²C Control and USB OTG...
LTC SMBus Support: Implementation for a shared SMBus layer.
Hardware port information.