![]() |
no-OS
|
Classes | |
| struct | ltc3350_init_param |
| Structure holding the parameters for LTC3350 device initialization. More... | |
| struct | ltc3350_dev |
| LTC3350 Device structure. More... | |
Functions | |
| int | ltc3350_init (struct ltc3350_dev **device, struct ltc3350_init_param *init_param) |
| Initializes the communication peripheral and checks if the LTC3350 part is present. | |
| int | ltc3350_remove (struct ltc3350_dev *dev) |
| Free the resources allocated by ltc3350_init(). | |
| int | ltc3350_read_device_data (struct ltc3350_dev *dev, uint8_t base_address, uint16_t *read_data) |
| Reads data from the device (I2C). | |
| int | ltc3350_write_device_data (struct ltc3350_dev *dev, uint8_t base_address, uint16_t write_data) |
| Writes data to the device (I2C) | |
| #define LTC3350_AD_ALARM_REG 0x1D |
| #define LTC3350_AD_CAP_ESR_PER 0x04 |
| #define LTC3350_AD_CAP_LO_LVL 0x16 |
| #define LTC3350_AD_CAP_OV_LVL 0x08 |
| #define LTC3350_AD_CAP_UV_LVL 0x07 |
| #define LTC3350_AD_CHRG_STATUS 0x1B |
| #define LTC3350_AD_CLR_ALARMS 0x00 |
| #define LTC3350_AD_CTL_REG 0x17 |
| #define LTC3350_AD_DTEMP_COLD_LVL 0x13 |
| #define LTC3350_AD_DTEMP_HOT_LVL 0x14 |
| #define LTC3350_AD_ESR_HI_LVL 0x15 |
| #define LTC3350_AD_GPI_OV_LVL 0x0A |
| #define LTC3350_AD_GPI_UV_LVL 0x09 |
| #define LTC3350_AD_ICHG_UC_LVL 0x12 |
| #define LTC3350_AD_IIN_OC_LVL 0x11 |
| #define LTC3350_AD_MEAS_CAP 0x1E |
| #define LTC3350_AD_MEAS_DTEMP 0x2A |
| #define LTC3350_AD_MEAS_ESR 0x1F |
| #define LTC3350_AD_MEAS_GPI 0x24 |
| #define LTC3350_AD_MEAS_ICHG 0x29 |
| #define LTC3350_AD_MEAS_IIN 0x28 |
| #define LTC3350_AD_MEAS_VCAP 0x26 |
| #define LTC3350_AD_MEAS_VCAP1 0x20 |
| #define LTC3350_AD_MEAS_VCAP2 0x21 |
| #define LTC3350_AD_MEAS_VCAP3 0x22 |
| #define LTC3350_AD_MEAS_VCAP4 0x23 |
| #define LTC3350_AD_MEAS_VIN 0x25 |
| #define LTC3350_AD_MEAS_VOUT 0x27 |
| #define LTC3350_AD_MON_STATUS 0x1C |
| #define LTC3350_AD_MSK_ALARMS 0x01 |
| #define LTC3350_AD_MSK_MON_STATUS 0x02 |
| #define LTC3350_AD_NUM_CAPS 0x1A |
| #define LTC3350_AD_VCAP_OV_LVL 0x0E |
| #define LTC3350_AD_VCAP_UV_LVL 0x0D |
| #define LTC3350_AD_VCAPFB_DAC 0x05 |
| #define LTC3350_AD_VIN_OV_LVL 0x0C |
| #define LTC3350_AD_VIN_UV_LVL 0x0B |
| #define LTC3350_AD_VOUT_OV_LVL 0x10 |
| #define LTC3350_AD_VOUT_UV_LVL 0x0F |
| #define LTC3350_AD_VSHUNT 0x06 |
| #define LTC3350_USE_ALARMS 0 |
LTC3350 alarms configuration switch.
If set to TRUE more configurations are available.
FALSE. | #define LTC3350_USE_MEASUREMENTS 1 |
LTC3350 measurements configuration switch.
If set to TRUE more configurations are available.
TRUE. | enum ltc3350_enum_alarms |
| int ltc3350_init | ( | struct ltc3350_dev ** | device, |
| struct ltc3350_init_param * | init_param ) |
Initializes the communication peripheral and checks if the LTC3350 part is present.
NO OS Requirements
Initialize the device driver before use.
| device | - The device structure. |
| init_param | - The structure that contains the device initial parameters. |
| int ltc3350_read_device_data | ( | struct ltc3350_dev * | dev, |
| uint8_t | base_address, | ||
| uint16_t * | read_data ) |
Reads data from the device (I2C).
General functions
Read a device register through the I2C interface.
| dev | - The device structure. |
| base_address | - Address of the base register. |
| read_data | - The read data value |
| int ltc3350_remove | ( | struct ltc3350_dev * | dev | ) |
Free the resources allocated by ltc3350_init().
Free memory allocated by ltc3350_init().
| dev | - The device structure. |
| int ltc3350_write_device_data | ( | struct ltc3350_dev * | dev, |
| uint8_t | base_address, | ||
| uint16_t | write_data ) |
Writes data to the device (I2C)
Write a device register through the I2C interface.
| dev | - The device structure. |
| base_address | - Address of the base register. |
| write_data | - The data which is going to be written. |