![]() |
no-OS
|
MAX77985/MAX77986 charger setup for EVAL-POWRMS project. More...
#include "no_os_i2c.h"Macros | |
| #define | MAX77986_I2C_ADDR 0x6B |
| #define | MAX77986_REG_CHG_CNFG_00 0x16 |
| #define | MAX77986_REG_CHG_CNFG_04 0x1A |
| #define | MAX77986_REG_CHG_CNFG_06 0x1C |
| #define | MAX77986_REG_CHG_CNFG_07 0x1D |
| #define | MAX77986_REG_CHG_CNFG_08 0x1E |
| #define | MAX77986_REG_CHG_CNFG_09 0x1F |
| #define | MAX77986_CHG_CNFG_06_UNLOCK 0x0C |
| #define | MAX77986_CHG_CNFG_04_VAL 0xE4 |
| #define | MAX77986_CHG_CNFG_08_VAL 0x50 |
| #define | MAX77986_CHG_CNFG_09_VAL 0x6D |
| #define | MAX77986_CHG_CNFG_07_VAL 0x20 |
| #define | MAX77986_CHG_CNFG_00_VAL 0x14 |
Functions | |
| int | max77986_init (struct no_os_i2c_desc **desc, const struct no_os_i2c_init_param *param) |
| Initialize the MAX77986 over I2C in MODE 6 with maximum current. | |
| int | max77986_remove (struct no_os_i2c_desc *desc) |
| Free the resources allocated by max77986_init(). | |
MAX77985/MAX77986 charger setup for EVAL-POWRMS project.
Copyright 2025(c) Analog Devices, Inc.
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, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 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.
| #define MAX77986_CHG_CNFG_00_VAL 0x14 |
| #define MAX77986_CHG_CNFG_04_VAL 0xE4 |
| #define MAX77986_CHG_CNFG_06_UNLOCK 0x0C |
| #define MAX77986_CHG_CNFG_07_VAL 0x20 |
| #define MAX77986_CHG_CNFG_08_VAL 0x50 |
| #define MAX77986_CHG_CNFG_09_VAL 0x6D |
| #define MAX77986_I2C_ADDR 0x6B |
| #define MAX77986_REG_CHG_CNFG_00 0x16 |
| #define MAX77986_REG_CHG_CNFG_04 0x1A |
| #define MAX77986_REG_CHG_CNFG_06 0x1C |
| #define MAX77986_REG_CHG_CNFG_07 0x1D |
| #define MAX77986_REG_CHG_CNFG_08 0x1E |
| #define MAX77986_REG_CHG_CNFG_09 0x1F |
| int max77986_init | ( | struct no_os_i2c_desc ** | desc, |
| const struct no_os_i2c_init_param * | param ) |
Initialize the MAX77986 over I2C in MODE 6 with maximum current.
Brings up the adapter->SYS synchronous buck (no battery) regulated to a fixed 5.0 V with the adapter input current limit set to its maximum (5.5 A). The charger config registers are unlocked first, the voltage and current limits configured, the BATT-to-SYS FET forced off, and MODE = 0x6 enabled last.
| desc | - Will be set to the allocated I2C descriptor on success. The caller owns it and must release it with max77986_remove(). |
| param | - I2C bus initialization parameters (slave address 0x6B). |
| int max77986_remove | ( | struct no_os_i2c_desc * | desc | ) |
Free the resources allocated by max77986_init().
| desc | - I2C descriptor returned by max77986_init(). |