![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
LTC4155: Dual-Input Power Manager / 3.5A Li-Ion Battery Charger with I²C Control and USB OTG. More...
LTC4155: Dual-Input Power Manager / 3.5A Li-Ion Battery Charger with I²C Control and USB OTG.
The LTC®4155 is a 15 watt I²C controlled power manager with PowerPath™ instant- on operation, high efficiency switching battery charging and USB compatibility. The LTC4155 seamlessly manages power distribution from two 5V sources, such as a USB port and a wall adapter, to a single-cell rechargeable Lithium-Ion/Polymer battery and a system load.
http://www.linear.com/product/LTC4155
http://www.linear.com/product/LTC4155#demoboards
Copyright 2018(c) Analog Devices, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Generated on: 2016-01-19
LTC4155 communication library core header file defining prototypes, data structures and constants used by LTC4155.c
Functions matching the prototypes of smbus_write_register and smbus_read_register must be provided to this API. They will implement the SMBus read and write transactions on your hardware. If the register size of the LTC4155 is 8 bits, functions should be provided that implement SMBus read byte and write byte. If the register size of the LTC4155 is 16 bits, functions should be provided that implement SMBus read word and write word. smbus_read_register needs to store the value read from the LTC4155 into the variable data. Both functions should return 0 on success and a non-0 error code on failure. The API functions will return your error codes on failure and a 0 on success.
Definition in file LTC4155.h.
Go to the source code of this file.
Data Structures | |
struct | port_configuration_t |
Hardware port information. More... | |
struct | LTC4155_chip_cfg_t |
Information required to access hardware SMBus port. More... | |
Functions | |
LTC4155 | LTC4155_init (LTC4155_chip_cfg_t *cfg) |
Returns a pointer to a LTC4155 structure used by LTC4155_write_register and LTC4155_read_register. More... | |
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. More... | |
int | LTC4155_read_register (LTC4155 chip_handle, uint16_t registerinfo, uint8_t *data) |
Retrieves a bit field data into *data. More... | |
Macros | |
#define | MAX_NUM_LTC4155_INSTANCES 1 |
Multiple LTC4155 use. More... | |
Typedefs | |
typedef int(* | smbus_write_register) (uint8_t addr, uint8_t command_code, uint8_t data, port_configuration_t *port_configuration) |
Prototype of user supplied SMBus write_byte or write_word function. More... | |
typedef int(* | smbus_read_register) (uint8_t addr, uint8_t command_code, uint8_t *data, port_configuration_t *port_configuration) |
Prototype of user supplied SMBus read_byte or read_word function. More... | |
typedef void * | LTC4155 |
LTC4155 LTC4155_init | ( | LTC4155_chip_cfg_t * | cfg | ) |
int LTC4155_read_register | ( | LTC4155 | chip_handle, |
uint16_t | registerinfo, | ||
uint8_t * | data | ||
) |
int LTC4155_write_register | ( | LTC4155 | chip_handle, |
uint16_t | registerinfo, | ||
uint8_t | data | ||
) |
#define MAX_NUM_LTC4155_INSTANCES 1 |
Multiple LTC4155 use.
Multiple LTC4155s can be used with this API. Each one must be initialized. The LTC4155_init requires some memory for each LTC4155. This memory can be statically allocated by defining MAX_NUM_LTC4155_INSTANCES to the number of LTC4155s required. Alternatively it can be dynamically allocated by defining LTC4155_USE_MALLOC. The default is to not use malloc and statically allocate one LTC4155.
typedef int(* smbus_read_register) (uint8_t addr, uint8_t command_code, uint8_t *data, port_configuration_t *port_configuration) |
typedef int(* smbus_write_register) (uint8_t addr, uint8_t command_code, uint8_t data, port_configuration_t *port_configuration) |