Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
MAX77659 Class Reference
MAX77659 SIMO PMIC with 300mA Switching Charger. More...
#include <MAX77659.h>
Public Types | |
| enum | reg_bit_int_glbl_t |
Register Configuration All Interrupt Flags combined from INT_GLBL0, INT_GLBL1 and INT_CHG. More... | |
| enum | reg_bit_ercflag_t |
Register Configuration. More... | |
| enum | reg_bit_stat_glbl_t |
Register Configuration. More... | |
| enum | reg_bit_int_mask_t |
Register Configuration. More... | |
| enum | reg_bit_cnfg_glbl_t |
Register Configuration. More... | |
| enum | reg_bit_cnfg_gpio_t |
Register Configuration. More... | |
| enum | reg_bit_cnfg_wdt_t |
Register Configuration. More... | |
| enum | reg_bit_stat_chg_a_t |
Register Configuration. More... | |
| enum | decode_thm_dtls_t |
Register Configuration. More... | |
| enum | reg_bit_stat_chg_b_t |
Register Configuration. More... | |
| enum | decode_chg_dtls_t |
Register Configuration. More... | |
| enum | decode_thm_hot_t |
Register Configuration. More... | |
| enum | decode_thm_warm_t |
Register Configuration. More... | |
| enum | decode_thm_cool_t |
Register Configuration. More... | |
| enum | decode_thm_cold_t |
Register Configuration. More... | |
| enum | reg_bit_cnfg_chg_b_t |
Register Configuration. More... | |
| enum | decode_vsys_hdrm_t |
Register Configuration. More... | |
| enum | decode_vsys_min_t |
Register Configuration. More... | |
| enum | decode_t_fast_chg_t |
Register Configuration. More... | |
| enum | decode_thm_en_t |
Register Configuration. More... | |
| enum | decode_usbs_t |
Register Configuration. More... | |
| enum | decode_mux_sel_t |
Register Configuration. More... | |
| enum | decode_op_mode_t |
Register Configuration. More... | |
| enum | decode_ade_sbb_t |
Register Configuration. More... | |
| enum | decode_en_sbb_t |
Register Configuration. More... | |
| enum | decode_op_mode_chg_t |
Register Configuration. More... | |
| enum | decode_drv_sbb_t |
Register Configuration. More... | |
| enum | decode_ip_chg_t |
Register Configuration. More... | |
| enum | decode_ip_sbb_t |
Register Configuration. More... | |
| enum | decode_tv_ldo_offset_t |
Register Configuration. More... | |
| enum | decode_en_ldo_t |
Register Configuration. More... | |
| enum | decode_ade_ldo_t |
Register Configuration. More... | |
| enum | decode_ldo_md_t |
Register Configuration. More... | |
| typedef void(* | interrupt_handler_function )(void *) |
| Function pointer type to interrupt handler function. | |
Public Member Functions | |
| MAX77659 (I2C *i2c, PinName IRQPin=NC) | |
| MAX77659 constructor. | |
| ~MAX77659 () | |
| MAX77659 destructor. | |
| int | read_register (uint8_t reg, uint8_t *value) |
| Read from a register. | |
| int | write_register (uint8_t reg, const uint8_t *value) |
| Write to a register. | |
| int | get_ercflag (reg_bit_ercflag_t bit_field, uint8_t *flag) |
| Get bit field of ERCFLAG (0x05) register. | |
| int | get_stat_glbl (reg_bit_stat_glbl_t bit_field, uint8_t *status) |
| Get bit field of STAT_GLBL (0x06) register. | |
| int | set_interrupt_mask (reg_bit_int_mask_t bit_field, uint8_t maskBit) |
| Set bit field of INT_M_CHG (0x07), INTM_GLBL1 (0x08) or INTM_GLBL0 (0x09) register. | |
| int | get_interrupt_mask (reg_bit_int_mask_t bit_field, uint8_t *maskBit) |
| Get bit field of INT_M_CHG (0x07), INTM_GLBL0 (0x08) or INTM_GLBL1 (0x09) register. | |
| int | set_cnfg_glbl (reg_bit_cnfg_glbl_t bit_field, uint8_t config) |
| Set CNFG_GLBL (0x10) register. | |
| int | get_cnfg_glbl (reg_bit_cnfg_glbl_t bit_field, uint8_t *config) |
| Get CNFG_GLBL (0x10) register. | |
| int | set_cnfg_gpio (reg_bit_cnfg_gpio_t bit_field, uint8_t channel, uint8_t config) |
| Set either CNFG_GPIO0 (0x11) or CNFG_GPIO1 (0x12). | |
| int | get_cnfg_gpio (reg_bit_cnfg_gpio_t bit_field, uint8_t channel, uint8_t *config) |
| Get either CNFG_GPIO0 (0x11) or CNFG_GPIO1 (0x12). | |
| int | get_cid (void) |
| Get bit field of CID (0x14) register. | |
| int | set_cnfg_wdt (reg_bit_cnfg_wdt_t bit_field, uint8_t config) |
| Set CNFG_WDT (0x17) register. | |
| int | get_cnfg_wdt (reg_bit_cnfg_wdt_t bit_field, uint8_t *config) |
| Get CNFG_WDT (0x17) register. | |
| int | get_stat_chg_a (reg_bit_stat_chg_a_t bit_field, uint8_t *status) |
| Get STAT_CHG_A (0x02) register. | |
| int | get_thm_dtls (decode_thm_dtls_t *thm_dtls) |
| Get Battery Temperature Details. | |
| int | get_stat_chg_b (reg_bit_stat_chg_b_t bit_field, uint8_t *status) |
| Get STAT_CHG_B (0x03) register. | |
| int | get_chg_dtls (decode_chg_dtls_t *chg_dtls) |
| Get Charger Details. | |
| int | set_thm_hot (decode_thm_hot_t thm_hot) |
| Set the VHOT JEITA Temperature Threshold. | |
| int | get_thm_hot (decode_thm_hot_t *thm_hot) |
| Get the VHOT JEITA Temperature Threshold. | |
| int | set_thm_warm (decode_thm_warm_t thm_warm) |
| Set the VWARM JEITA Temperature Threshold. | |
| int | get_thm_warm (decode_thm_warm_t *thm_warm) |
| Get the VWARM JEITA Temperature Threshold. | |
| int | set_thm_cool (decode_thm_cool_t thm_cool) |
| Set the VCOOL JEITA Temperature Threshold. | |
| int | get_thm_cool (decode_thm_cool_t *thm_cool) |
| Get the VCOOL JEITA Temperature Threshold. | |
| int | set_thm_cold (decode_thm_cold_t thm_cold) |
| Set the VCOLD JEITA Temperature Threshold. | |
| int | get_thm_cold (decode_thm_cold_t *thm_cold) |
| Get the VCOLD JEITA Temperature Threshold. | |
| int | set_cnfg_chg_b (reg_bit_cnfg_chg_b_t bit_field, uint8_t config) |
| Set CNFG_CHG_B (0x21) register. | |
| int | get_cnfg_chg_b (reg_bit_cnfg_chg_b_t bit_field, uint8_t *config) |
| Get CNFG_CHG_B (0x21) register. | |
| int | set_chg_pq (float voltV) |
| Set Battery Prequalification Voltage Threshold (VPQ). | |
| int | get_chg_pq (float *voltV) |
| Get Battery Prequalification Voltage Threshold (VPQ). | |
| int | set_i_term (float percent) |
| Set Charger Termination Current (ITERM). | |
| int | get_i_term (float *percent) |
| Get Charger Termination Current (ITERM). | |
| int | set_t_topoff (uint8_t minute) |
| Set Top-off Timer Value. | |
| int | get_t_topoff (uint8_t *minute) |
| Get Top-off Timer Value. | |
| int | set_tj_reg (uint8_t tempDegC) |
| Set the Die Junction Temperature Regulation Point, TJ-REG. | |
| int | get_tj_reg (uint8_t *tempDegC) |
| Get the Die Junction Temperature Regulation Point, TJ-REG. | |
| int | set_vsys_hdrm (decode_vsys_hdrm_t vsys_hdrm) |
| Set SYS Headroom Voltage Regulation. | |
| int | get_vsys_hdrm (decode_vsys_hdrm_t *vsys_hdrm) |
| Get SYS Headroom Voltage Regulation. | |
| int | set_vsys_min (decode_vsys_min_t vsys_min) |
| Set Minimum SYS Voltage. | |
| int | get_vsys_min (decode_vsys_min_t *vsys_min) |
| Get Minimum SYS Voltage. | |
| int | set_chg_cc (float currentmA) |
| Set the Fast-Charge Constant Current Value, IFAST-CHG. | |
| int | get_chg_cc (float *currentmA) |
| Get the Fast-Charge Constant Current Value, IFAST-CHG. | |
| int | set_t_fast_chg (decode_t_fast_chg_t t_fast_chg) |
| Set the Fast-charge Safety timer, tFC. | |
| int | get_t_fast_chg (decode_t_fast_chg_t *t_fast_chg) |
| Get the Fast-charge Safety timer, tFC. | |
| int | set_chg_cc_jeita (float currentmA) |
| Set IFAST-CHG-JEITA when the battery is either cool or warm as defined by the VCOOL and VWARM temperature thresholds. | |
| int | get_chg_cc_jeita (float *currentmA) |
| Get IFAST-CHG-JEITA when the battery is either cool or warm as defined by the VCOOL and VWARM temperature thresholds. | |
| int | set_thm_en (decode_thm_en_t thm_en) |
| Set Thermistor Enable Bit. | |
| int | get_thm_en (decode_thm_en_t *thm_en) |
| Get Thermistor Enable Bit. | |
| int | set_chg_cv (float voltV) |
| Set Fast-Charge Battery Regulation Voltage, VFAST-CHG. | |
| int | get_chg_cv (float *voltV) |
| Get Fast-Charge Battery Regulation Voltage, VFAST-CHG. | |
| int | set_usbs (decode_usbs_t usbs) |
| Set USB Suspend Mode Bit. | |
| int | get_usbs (decode_usbs_t *usbs) |
| Get USB Suspend Mode Bit. | |
| int | set_chg_cv_jeita (float voltV) |
| Set the modified VFAST-CHG-JEITA for when the battery is either cool or warm as defined by the VCOOL and VWARM temperature thresholds. | |
| int | get_chg_cv_jeita (float *voltV) |
| Get the modified VFAST-CHG-JEITA for when the battery is either cool or warm as defined by the VCOOL and VWARM temperature thresholds. | |
| int | set_imon_dischg_scale (float currentmA) |
| Set the Battery Discharge Current Full-Scale Current Value. | |
| int | get_imon_dischg_scale (float *currentmA) |
| Get the Battery Discharge Current Full-Scale Current Value. | |
| int | set_mux_sel (decode_mux_sel_t selection) |
| Set the analog channel to connect to AMUX. | |
| int | get_mux_sel (decode_mux_sel_t *selection) |
| Get the analog channel to connect to AMUX. | |
| int | set_tv_sbb (uint8_t channel, float voltV) |
| Set SIMO Buck-Boost Channel x Target Output Voltage. | |
| int | get_tv_sbb (uint8_t channel, float *voltV) |
| Get SIMO Buck-Boost Channel x Target Output Voltage. | |
| int | set_op_mode (uint8_t channel, decode_op_mode_t mode) |
| Set Operation mode of SBBx. | |
| int | get_op_mode (uint8_t channel, decode_op_mode_t *mode) |
| Get Operation mode of SBBx. | |
| int | set_ade_sbb (uint8_t channel, decode_ade_sbb_t ade_sbb) |
| Set SIMO Buck-Boost Channel x Active-Discharge Enable. | |
| int | get_ade_sbb (uint8_t channel, decode_ade_sbb_t *ade_sbb) |
| Get SIMO Buck-Boost Channel x Active-Discharge Enable. | |
| int | set_en_sbb (uint8_t channel, decode_en_sbb_t en_sbb) |
| Set Enable Control for SIMO Buck-Boost Channel x. | |
| int | get_en_sbb (uint8_t channel, decode_en_sbb_t *en_sbb) |
| Get Enable Control for SIMO Buck-Boost Channel x. | |
| int | set_op_mode_chg (decode_op_mode_chg_t op_mode_chg) |
| Set Operation mode of the charging channel of SIMO. | |
| int | get_op_mode_chg (decode_op_mode_chg_t *op_mode_chg) |
| Get Operation mode of the charging channel of SIMO. | |
| int | set_drv_sbb (decode_drv_sbb_t drv_sbb) |
| Set SIMO Buck-Boost (all channels) Drive Strength Trim. | |
| int | get_drv_sbb (decode_drv_sbb_t *drv_sbb) |
| Get SIMO Buck-Boost (all channels) Drive Strength Trim. | |
| int | set_ip_chg (decode_ip_chg_t ip_chg) |
| Set SIMO Buck-Boost Charging Channel Peak Current Limit. | |
| int | get_ip_chg (decode_ip_chg_t *ip_chg) |
| Get SIMO Buck-Boost Charging Channel Peak Current Limit. | |
| int | set_ip_sbb (uint8_t channel, decode_ip_sbb_t ip_sbb) |
| Set SIMO Buck-Boost Channel 0, 1 or 2 Peak Current Limit. | |
| int | get_ip_sbb (uint8_t channel, decode_ip_sbb_t *ip_sbb) |
| Get SIMO Buck-Boost Channel 0, 1 or 2 Peak Current Limit. | |
| int | set_tv_ldo_offset (decode_tv_ldo_offset_t offset) |
| Set LDO Output Channel 0 Target Output Voltage. | |
| int | get_tv_ldo_offset (decode_tv_ldo_offset_t *offset) |
| Get LDO Output Channel 0 Target Output Voltage. | |
| int | set_tv_ldo_volt (float voltV) |
| Set LDO Output Channel 0 Target Output Voltage. | |
| int | get_tv_ldo_volt (float *voltV) |
| Get LDO Output Channel 0 Target Output Voltage. | |
| int | set_en_ldo (decode_en_ldo_t en_ldo) |
| Set Enable Control for LDO Channel0. | |
| int | get_en_ldo (decode_en_ldo_t *en_ldo) |
| Get Enable Control for LDO Channel x. | |
| int | set_ade_ldo (decode_ade_ldo_t ade_ldo) |
| Set LDO0 Active-Discharge Enable. | |
| int | get_ade_ldo (decode_ade_ldo_t *ade_ldo) |
| Get LDO0 Active-Discharge Enable. | |
| int | set_ldo_md (decode_ldo_md_t mode) |
| Set Operation mode of LDOx. | |
| int | get_ldo_md (decode_ldo_md_t *mode) |
| Get Operation mode of LDOx. | |
| int | irq_disable_all () |
| Disable all interrupts. | |
| void | set_interrupt_handler (reg_bit_int_glbl_t id, interrupt_handler_function func, void *cb) |
| Set Interrupt Handler for a Specific Interrupt ID. | |
Detailed Description
MAX77659 SIMO PMIC with 300mA Switching Charger.
The MAX77659 provides highly-efficient integrated battery charging and power supply solutions for low-power applications where size and efficiency are critical. https://www.maximintegrated.com/en/products/power/power-management-ics/MAX77659.html
Definition at line 61 of file MAX77659.h.
Member Typedef Documentation
| typedef void(* interrupt_handler_function)(void *) |
Function pointer type to interrupt handler function.
Definition at line 177 of file MAX77659.h.
Member Enumeration Documentation
| enum decode_ade_ldo_t |
Register Configuration.
- Register : CNFG_LDO0_B (0x39)
- Bit Fields : [3]
- Default : 0x0
- Description : LDO0 Active-Discharge Enable.
Definition at line 1565 of file MAX77659.h.
| enum decode_ade_sbb_t |
Register Configuration.
- Register : CNFG_SBB0_B (0x2A), CNFG_SBB1_B (0x2C) and CNFG_SBB2_B (0x2E)
- Bit Fields : [3]
- Default : 0x0
- Description : SIMO Buck-Boost Channel 0, 1 or 2 Active-Discharge Enable.
Definition at line 1244 of file MAX77659.h.
| enum decode_chg_dtls_t |
Register Configuration.
- Register : STAT_CHG_B (0x03)
- Bit Fields : [7:4]
- Default : 0x0
- Description : CHG_DTLS[3:0] Charger Details.
Definition at line 532 of file MAX77659.h.
| enum decode_drv_sbb_t |
Register Configuration.
- Register : CNFG_SBB_TOP (0x2F)
- Bit Fields : [1:0]
- Default : 0x0
- Description : SIMO Buck-Boost (all channels) Drive Strength Trim.
Definition at line 1350 of file MAX77659.h.
| enum decode_en_ldo_t |
Register Configuration.
- Register : CNFG_LDO0_B (0x39)
- Bit Fields : [2:0]
- Default : 0x0
- Description : Enable Control for LDO0.
Definition at line 1527 of file MAX77659.h.
| enum decode_en_sbb_t |
Register Configuration.
- Register : CNFG_SBB0_B (0x2A), CNFG_SBB1_B (0x2C) and CNFG_SBB2_B (0x2E)
- Bit Fields : [2:0]
- Default : 0x0
- Description : Enable Control for SIMO Buck-Boost Channel 0, 1 or 2.
Definition at line 1278 of file MAX77659.h.
| enum decode_ip_chg_t |
Register Configuration.
- Register : CNFG_SBB_TOP_B (0x30)
- Bit Fields : [7:6]
- Default : 0x0
- Description : SIMO Buck-Boost Charging Channel Peak Current Limit
Definition at line 1384 of file MAX77659.h.
| enum decode_ip_sbb_t |
Register Configuration.
- Register : CNFG_SBB_TOP_B (0x30)
- Bit Fields : [5:4], [3:2] and [1:0]
- Default : 0x0
- Description : SIMO Buck-Boost Channel 0, 1 or 2 Peak Current Limit
Definition at line 1418 of file MAX77659.h.
| enum decode_ldo_md_t |
Register Configuration.
- Register : CNFG_LDO0_B (0x39)
- Bit Fields : [4]
- Default : 0x0
- Description : Operation mode of LDO0.
Definition at line 1597 of file MAX77659.h.
| enum decode_mux_sel_t |
Register Configuration.
- Register : CNFG_CHG_I (0x28)
- Bit Fields : [3:0]
- Default : 0x0
- Description : Analog channel to connect to AMUX.
Definition at line 1134 of file MAX77659.h.
| enum decode_op_mode_chg_t |
Register Configuration.
- Register : CNFG_SBB_TOP (0x2F)
- Bit Fields : [7]
- Default : 0x0
- Description : Operation mode of the charging channel of SIMO
Definition at line 1318 of file MAX77659.h.
| enum decode_op_mode_t |
Register Configuration.
- Register : CNFG_SBB0_B (0x2A), CNFG_SBB1_B (0x2C) and CNFG_SBB2_B (0x2E)
- Bit Fields : [6]
- Default : 0x0
- Description : Operation mode of SBB0, 1 or 2.
Definition at line 1210 of file MAX77659.h.
| enum decode_t_fast_chg_t |
Register Configuration.
- Register : CNFG_CHG_E (0x24)
- Bit Fields : [1:0]
- Default : 0x0
- Description : Fast-charge Safety timer, tFC.
Definition at line 929 of file MAX77659.h.
| enum decode_thm_cold_t |
Register Configuration.
- Register : CNFG_CHG_A (0x20)
- Bit Fields : [1:0]
- Default : 0x0
- Description : VCOLD JEITA Temperature Threshold.
Definition at line 671 of file MAX77659.h.
| enum decode_thm_cool_t |
Register Configuration.
- Register : CNFG_CHG_A (0x20)
- Bit Fields : [3:2]
- Default : 0x0
- Description : VCOOL JEITA Temperature Threshold.
Definition at line 637 of file MAX77659.h.
| enum decode_thm_dtls_t |
Register Configuration.
- Register : STAT_CHG_A (0x02)
- Bit Fields : [2:0]
- Default : 0x0
- Description : Battery Temperature Details.
Definition at line 476 of file MAX77659.h.
| enum decode_thm_en_t |
Register Configuration.
- Register : CNFG_CHG_F (0x25)
- Bit Fields : [1]
- Default : 0x0
- Description : Thermistor Enable Bit
Definition at line 992 of file MAX77659.h.
| enum decode_thm_hot_t |
Register Configuration.
- Register : CNFG_CHG_A (0x20)
- Bit Fields : [7:6]
- Default : 0x0
- Description : VHOT JEITA Temperature Threshold.
Definition at line 569 of file MAX77659.h.
| enum decode_thm_warm_t |
Register Configuration.
- Register : CNFG_CHG_A (0x20)
- Bit Fields : [5:4]
- Default : 0x0
- Description : VWARM JEITA Temperature Threshold.
Definition at line 603 of file MAX77659.h.
Register Configuration.
- Register : CNFG_LDO0_A (0x38)
- Bit Fields : [7]
- Default : 0x0
- Description : LDO Output Voltage. This bit applies a 1.325V offset to the output voltage of the LDO.
Definition at line 1454 of file MAX77659.h.
| enum decode_usbs_t |
Register Configuration.
- Register : CNFG_CHG_G (0x26)
- Bit Fields : [1]
- Default : 0x0
- Description : Setting this bit places CHGIN in USB suspend mode.
Definition at line 1049 of file MAX77659.h.
| enum decode_vsys_hdrm_t |
Register Configuration.
- Register : CNFG_CHG_D (0x23)
- Bit Fields : [4]
- Default : 0x0
- Description : SYS Headroom Voltage Regulation.
Definition at line 838 of file MAX77659.h.
| enum decode_vsys_min_t |
Register Configuration.
- Register : CNFG_CHG_D (0x23)
- Bit Fields : [1:0]
- Default : 0x0
- Description : Minimum SYS Voltage.
Definition at line 870 of file MAX77659.h.
| enum reg_bit_cnfg_chg_b_t |
Register Configuration.
- Register : CNFG_CHG_B (0x21)
- Bit Fields : [7:0]
- Default : 0x0
- Description : Watchdog Timer Configuration.
Definition at line 705 of file MAX77659.h.
| enum reg_bit_cnfg_glbl_t |
Register Configuration.
- Register : CNFG_GLBL (0x10)
- Bit Fields : [7:0]
- Default : 0x0
- Description : Event Recorder Flags.
Definition at line 322 of file MAX77659.h.
| enum reg_bit_cnfg_gpio_t |
Register Configuration.
- Register : CNFG_GPIO0 (0x11) or CNFG_GPIO1 (0x12)
- Bit Fields : [7:0]
- Default : 0x0
- Description : Event Recorder Flags.
Definition at line 361 of file MAX77659.h.
| enum reg_bit_cnfg_wdt_t |
Register Configuration.
- Register : CNFG_WDT (0x17)
- Bit Fields : [7:0]
- Default : 0x0
- Description : Watchdog Timer Configuration.
Definition at line 409 of file MAX77659.h.
| enum reg_bit_ercflag_t |
Register Configuration.
- Register : ERCFLAG (0x05)
- Bit Fields : [7:0]
- Default : 0x0
- Description : Event Recorder Flags.
Definition at line 208 of file MAX77659.h.
| enum reg_bit_int_glbl_t |
Register Configuration All Interrupt Flags combined from INT_GLBL0, INT_GLBL1 and INT_CHG.
- Register : ERCFLAG (0x05)
- Bit Fields : [7:0]
- Default : 0x0
- Description : Enumerated interrupt flags
Definition at line 144 of file MAX77659.h.
| enum reg_bit_int_mask_t |
Register Configuration.
- Register : INT_M_CHG (0x07), INTM_GLBL1 (0x08) and INTM_GLBL0 (0x09)
- Bit Fields : [7:0]
- Default : 0x0
- Description : All interrupt mask bits.
Definition at line 271 of file MAX77659.h.
| enum reg_bit_stat_chg_a_t |
Register Configuration.
- Register : STAT_CHG_A (0x02)
- Bit Fields : [7:0]
- Default : 0x0
- Description : Watchdog Timer Configuration.
Definition at line 447 of file MAX77659.h.
| enum reg_bit_stat_chg_b_t |
Register Configuration.
- Register : STAT_CHG_B (0x03)
- Bit Fields : [7:0]
- Default : 0x0
- Description : Watchdog Timer Configuration.
Definition at line 506 of file MAX77659.h.
| enum reg_bit_stat_glbl_t |
Register Configuration.
- Register : STAT_GLBL (0x06)
- Bit Fields : [7:0]
- Default : 0x0
- Description : Event Recorder Flags.
Definition at line 241 of file MAX77659.h.
Constructor & Destructor Documentation
| MAX77659 | ( | I2C * | i2c, |
| PinName | IRQPin = NC |
||
| ) |
MAX77659 constructor.
Definition at line 44 of file MAX77659.cpp.
| ~MAX77659 | ( | ) |
MAX77659 destructor.
Definition at line 66 of file MAX77659.cpp.
Member Function Documentation
| int get_ade_ldo | ( | decode_ade_ldo_t * | ade_ldo ) |
Get LDO0 Active-Discharge Enable.
- Parameters:
-
[out] ade_ldo LDO0 active-discharge enable bit to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1754 of file MAX77659.cpp.
| int get_ade_sbb | ( | uint8_t | channel, |
| decode_ade_sbb_t * | ade_sbb | ||
| ) |
Get SIMO Buck-Boost Channel x Active-Discharge Enable.
- Parameters:
-
[in] channel Channel number: 0, 1 or 2. [out] ade_sbb SIMO buck-boost channel 2 active-discharge enable bit to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1463 of file MAX77659.cpp.
| int get_chg_cc | ( | float * | currentmA ) |
Get the Fast-Charge Constant Current Value, IFAST-CHG.
Bit 7:2 of CNFG_CHG_E (0x24) register.
- Parameters:
-
[out] currentmA Pointer of value to be read. 7.5mA, 15.0mA, 22.5mA, ... 292.5mA, 300.0mA.
- Returns:
- 0 on success, error code on failure.
Definition at line 1082 of file MAX77659.cpp.
| int get_chg_cc_jeita | ( | float * | currentmA ) |
Get IFAST-CHG-JEITA when the battery is either cool or warm as defined by the VCOOL and VWARM temperature thresholds.
Bit 7:2 of CNFG_CHG_F (0x25) register.
- Parameters:
-
[out] currentmA Pointer of value to be read. 7.5mA, 15.0mA, 22.5mA, ... 292.5mA, 300.0mA.
- Returns:
- 0 on success, error code on failure.
Definition at line 1135 of file MAX77659.cpp.
| int get_chg_cv | ( | float * | voltV ) |
Get Fast-Charge Battery Regulation Voltage, VFAST-CHG.
Bit 7:2 of CNFG_CHG_G (0x26) register.
- Parameters:
-
[out] voltV Pointer of value to be read. 3.600V, 3.625V, 3.650V, ... 4.575V, 4.600V.
- Returns:
- 0 on success, error code on failure.
Definition at line 1190 of file MAX77659.cpp.
| int get_chg_cv_jeita | ( | float * | voltV ) |
Get the modified VFAST-CHG-JEITA for when the battery is either cool or warm as defined by the VCOOL and VWARM temperature thresholds.
Bit 7:2 of CNFG_CHG_H (0x27) register.
- Parameters:
-
[out] voltV Pointer of value to be read. 3.600V, 3.625V, 3.650V, ... 4.575V, 4.600V.
- Returns:
- 0 on success, error code on failure.
Definition at line 1241 of file MAX77659.cpp.
| int get_chg_dtls | ( | decode_chg_dtls_t * | chg_dtls ) |
Get Charger Details.
- Parameters:
-
[out] chg_dtls Charger details field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 750 of file MAX77659.cpp.
| int get_chg_pq | ( | float * | voltV ) |
Get Battery Prequalification Voltage Threshold (VPQ).
Bit 7:5 of CNFG_CHG_C (0x22) register.
- Parameters:
-
[out] voltV Pointer of value to be read. 2.3V, 2.4V, 2.5V, 2.6V, 2.7V, 2.8V, 2.9V, 3.0V.
- Returns:
- 0 on success, error code on failure.
Definition at line 920 of file MAX77659.cpp.
| int get_cid | ( | void | ) |
Get bit field of CID (0x14) register.
- Returns:
- CID on success, error code on failure.
Definition at line 604 of file MAX77659.cpp.
| int get_cnfg_chg_b | ( | reg_bit_cnfg_chg_b_t | bit_field, |
| uint8_t * | config | ||
| ) |
Get CNFG_CHG_B (0x21) register.
- Parameters:
-
[in] bit_field Register bit field to be written. [out] config Pointer of value to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 878 of file MAX77659.cpp.
| int get_cnfg_glbl | ( | reg_bit_cnfg_glbl_t | bit_field, |
| uint8_t * | config | ||
| ) |
Get CNFG_GLBL (0x10) register.
- Parameters:
-
[in] bit_field Register bit field to be written. [out] config Pointer of value to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 417 of file MAX77659.cpp.
| int get_cnfg_gpio | ( | reg_bit_cnfg_gpio_t | bit_field, |
| uint8_t | channel, | ||
| uint8_t * | config | ||
| ) |
Get either CNFG_GPIO0 (0x11) or CNFG_GPIO1 (0x12).
- Parameters:
-
[in] bit_field Register bit field to be written. [in] channel Channel number: 0 or 1 [out] config Pointer of value to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 531 of file MAX77659.cpp.
| int get_cnfg_wdt | ( | reg_bit_cnfg_wdt_t | bit_field, |
| uint8_t * | config | ||
| ) |
Get CNFG_WDT (0x17) register.
- Parameters:
-
[in] bit_field Register bit field to be written. [out] config Pointer of value to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 647 of file MAX77659.cpp.
| int get_drv_sbb | ( | decode_drv_sbb_t * | drv_sbb ) |
Get SIMO Buck-Boost (all channels) Drive Strength Trim.
- Parameters:
-
[out] drv_sbb SIMO buck-boost drive strength trim field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1580 of file MAX77659.cpp.
| int get_en_ldo | ( | decode_en_ldo_t * | en_ldo ) |
Get Enable Control for LDO Channel x.
- Parameters:
-
[out] en_ldo Enable control for LDO channel x field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1732 of file MAX77659.cpp.
| int get_en_sbb | ( | uint8_t | channel, |
| decode_en_sbb_t * | en_sbb | ||
| ) |
Get Enable Control for SIMO Buck-Boost Channel x.
- Parameters:
-
[in] channel Channel number: 0, 1 or 2. [out] en_sbb Enable control for SIMO buck-boost channel x field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1517 of file MAX77659.cpp.
| int get_ercflag | ( | reg_bit_ercflag_t | bit_field, |
| uint8_t * | flag | ||
| ) |
Get bit field of ERCFLAG (0x05) register.
- Parameters:
-
[in] bit_field ERCFLAG register bit field to be written. [out] flag Pointer to save result of ercglag bit states. For individual bit 0x0: ERCFLAG has not occurred, 0x1: ERCFLAG has occurred.
- Returns:
- 0 on success, error code on failure.
Definition at line 127 of file MAX77659.cpp.
| int get_i_term | ( | float * | percent ) |
Get Charger Termination Current (ITERM).
I_TERM[1:0] sets the charger termination current as a percentage of the fast charge current IFAST-CHG. Bit 4:3 of CNFG_CHG_C (0x22) register.
- Parameters:
-
[out] percent Pointer of value to be read. 5%, 7.5%, 10%, 15%.
- Returns:
- 0 on success, error code on failure.
Definition at line 948 of file MAX77659.cpp.
| int get_imon_dischg_scale | ( | float * | currentmA ) |
Get the Battery Discharge Current Full-Scale Current Value.
Bit 7:4 of CNFG_CHG_I (0x28) register.
- Parameters:
-
[out] currentmA Pointer of value to be read. 8.2mA, 40.5mA, 72.3mA, 103.4mA, 134.1mA, 164.1mA, 193.7mA, 222.7mA, 251.2mA, 279.3mA, 300.0mA
- Returns:
- 0 on success, error code on failure.
Definition at line 1276 of file MAX77659.cpp.
| int get_interrupt_mask | ( | reg_bit_int_mask_t | bit_field, |
| uint8_t * | maskBit | ||
| ) |
Get bit field of INT_M_CHG (0x07), INTM_GLBL0 (0x08) or INTM_GLBL1 (0x09) register.
- Parameters:
-
[in] bit_field Register bit field to be written. [out] maskBit 0x0: Interrupt is unmasked, 0x1: Interrupt is masked.
- Returns:
- 0 on success, error code on failure.
Definition at line 298 of file MAX77659.cpp.
| int get_ip_chg | ( | decode_ip_chg_t * | ip_chg ) |
Get SIMO Buck-Boost Charging Channel Peak Current Limit.
- Parameters:
-
[out] ip_chg SIMO Buck-Boost Charging Channel Peak Current Limit field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1602 of file MAX77659.cpp.
| int get_ip_sbb | ( | uint8_t | channel, |
| decode_ip_sbb_t * | ip_sbb | ||
| ) |
Get SIMO Buck-Boost Channel 0, 1 or 2 Peak Current Limit.
- Parameters:
-
[in] channel Channel number: 0, 1 or 2. [out] ip_sbb SIMO Buck-Boost Channel x Peak Current Limit field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1635 of file MAX77659.cpp.
| int get_ldo_md | ( | decode_ldo_md_t * | mode ) |
Get Operation mode of LDOx.
- Parameters:
-
[out] mode Operation mode of LDOx bit to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1776 of file MAX77659.cpp.
| int get_mux_sel | ( | decode_mux_sel_t * | selection ) |
Get the analog channel to connect to AMUX.
- Parameters:
-
[out] selection AMUX value field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1310 of file MAX77659.cpp.
| int get_op_mode | ( | uint8_t | channel, |
| decode_op_mode_t * | mode | ||
| ) |
Get Operation mode of SBBx.
- Parameters:
-
[in] channel Channel number: 0, 1 or 2. [out] mode Operation mode of SBBx bit to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1409 of file MAX77659.cpp.
| int get_op_mode_chg | ( | decode_op_mode_chg_t * | op_mode_chg ) |
Get Operation mode of the charging channel of SIMO.
- Parameters:
-
[out] op_mode_chg Operation mode of the charging channel of SIMO bit to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1558 of file MAX77659.cpp.
| int get_stat_chg_a | ( | reg_bit_stat_chg_a_t | bit_field, |
| uint8_t * | status | ||
| ) |
Get STAT_CHG_A (0x02) register.
- Parameters:
-
[in] bit_field Register bit field to be written. [out] status Pointer of value to be read. For individual bit, 0x0 = It is not engaged, 0x1 = It is engaged.
- Returns:
- 0 on success, error code on failure.
Definition at line 680 of file MAX77659.cpp.
| int get_stat_chg_b | ( | reg_bit_stat_chg_b_t | bit_field, |
| uint8_t * | status | ||
| ) |
Get STAT_CHG_B (0x03) register.
- Parameters:
-
[in] bit_field Register bit field to be written. [out] status Pointer of value to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 720 of file MAX77659.cpp.
| int get_stat_glbl | ( | reg_bit_stat_glbl_t | bit_field, |
| uint8_t * | status | ||
| ) |
Get bit field of STAT_GLBL (0x06) register.
- Parameters:
-
[in] bit_field STAT_GLBL register bit field to be written. [out] status Pointer to save result of Status Global bit state.
- Returns:
- 0 on success, error code on failure.
Definition at line 169 of file MAX77659.cpp.
| int get_t_fast_chg | ( | decode_t_fast_chg_t * | t_fast_chg ) |
Get the Fast-charge Safety timer, tFC.
Bit 1:0 of CNFG_CHG_E (0x24) register.
- Parameters:
-
[out] t_fast_chg Fast-charge safety timer field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1107 of file MAX77659.cpp.
| int get_t_topoff | ( | uint8_t * | minute ) |
Get Top-off Timer Value.
Bit 2:0 of CNFG_CHG_C (0x22) register.
- Parameters:
-
[out] minute Pointer of value to be read. 0 minutes, 5 minutes, 10 minutes 15 minutes, 20 minutes, 25 minutes, 30 minutes, 35 minutes.
- Returns:
- 0 on success, error code on failure.
Definition at line 981 of file MAX77659.cpp.
| int get_thm_cold | ( | decode_thm_cold_t * | thm_cold ) |
Get the VCOLD JEITA Temperature Threshold.
- Parameters:
-
[out] thm_cold The VCOLD JEITA temperature threshold field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 838 of file MAX77659.cpp.
| int get_thm_cool | ( | decode_thm_cool_t * | thm_cool ) |
Get the VCOOL JEITA Temperature Threshold.
- Parameters:
-
[out] thm_cool The VCOOL JEITA temperature threshold field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 816 of file MAX77659.cpp.
| int get_thm_dtls | ( | decode_thm_dtls_t * | thm_dtls ) |
Get Battery Temperature Details.
Valid only when CHGIN_DTLS[1:0] = 0b11.
- Parameters:
-
[out] thm_dtls Battery temperature details field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 707 of file MAX77659.cpp.
| int get_thm_en | ( | decode_thm_en_t * | thm_en ) |
Get Thermistor Enable Bit.
Bit 1:0 of CNFG_CHG_F (0x25) register.
- Parameters:
-
[out] thm_en Thermistor Enable Bit field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1162 of file MAX77659.cpp.
| int get_thm_hot | ( | decode_thm_hot_t * | thm_hot ) |
Get the VHOT JEITA Temperature Threshold.
- Parameters:
-
[out] thm_hot The VHOT JEITA temperature threshold field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 772 of file MAX77659.cpp.
| int get_thm_warm | ( | decode_thm_warm_t * | thm_warm ) |
Get the VWARM JEITA Temperature Threshold.
- Parameters:
-
[out] thm_warm The VWARM JEITA temperature threshold field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 794 of file MAX77659.cpp.
| int get_tj_reg | ( | uint8_t * | tempDegC ) |
Get the Die Junction Temperature Regulation Point, TJ-REG.
Bit 7:5 of CNFG_CHG_D (0x23) register.
- Parameters:
-
[out] tempDegC Pointer of value to be read. 60ºC, 70ºC, 80ºC, 90ºC, 100ºC.
- Returns:
- 0 on success, error code on failure.
Definition at line 1009 of file MAX77659.cpp.
| int get_tv_ldo_offset | ( | decode_tv_ldo_offset_t * | offset ) |
Get LDO Output Channel 0 Target Output Voltage.
Bit 7. CNFG_LDO0_A (0x38)
- Parameters:
-
[out] offset LDO Output Channel 0 target output voltage offset field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1664 of file MAX77659.cpp.
| int get_tv_ldo_volt | ( | float * | voltV ) |
Get LDO Output Channel 0 Target Output Voltage.
Bit 6:0. CNFG_LDO0_A (0x38)
- Parameters:
-
[out] voltV LDO Output Channel 0 target output voltage field to be read. LDOx = 500mV + 25mV x TV_LDOx[6:0] 0.500V, 0.525V, 0.550V, 0.575V, 0.600V, 0.625V, 0.650V, 0.675V, 0.700V, ... 3.650, 3.675.
When TV_LDO[7] = 0, TV_LDO[6:0] sets the LDO's output voltage range from 0.5V to 3.675V. When TV_LDO[7] = 1, TV_LDO[6:0] sets the LDO's output voltage from 1.825V to 5V.
- Returns:
- 0 on success, error code on failure.
Definition at line 1705 of file MAX77659.cpp.
| int get_tv_sbb | ( | uint8_t | channel, |
| float * | voltV | ||
| ) |
Get SIMO Buck-Boost Channel x Target Output Voltage.
CNFG_SBB0_A (0x29), CNFG_SBB1_A (0x2B) and CNFG_SBB2_A (0x2D)
- Parameters:
-
[in] channel Channel number: 0, 1 or 2. [out] voltV SIMO buck-boost channel x target output voltage field to be read. SBBx = 500mV + 25mV x TV_SBBx[7:0] 0.500V, 0.525V, 0.550V, 0.575V, 0.600V, 0.625V, 0.650V, 0.675V, 0.700V, ... 5.425V, 5.450V, 5.475V, 5.500V.
- Returns:
- 0 on success, error code on failure.
Definition at line 1351 of file MAX77659.cpp.
| int get_usbs | ( | decode_usbs_t * | usbs ) |
Get USB Suspend Mode Bit.
Bit 1:0 of CNFG_CHG_G (0x26) register.
- Parameters:
-
[out] usbs CHGIN in USB suspend mode bit field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1213 of file MAX77659.cpp.
| int get_vsys_hdrm | ( | decode_vsys_hdrm_t * | vsys_hdrm ) |
Get SYS Headroom Voltage Regulation.
- Parameters:
-
[out] vsys_hdrm SYS Headroom Voltage field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1032 of file MAX77659.cpp.
| int get_vsys_min | ( | decode_vsys_min_t * | vsys_min ) |
Get Minimum SYS Voltage.
Bit 1:0 of CNFG_CHG_D (0x23) register.
- Parameters:
-
[out] vsys_min Pointer of value to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1054 of file MAX77659.cpp.
| int irq_disable_all | ( | ) |
Disable all interrupts.
- Returns:
- 0 on success, error code on failure
Definition at line 1789 of file MAX77659.cpp.
| int read_register | ( | uint8_t | reg, |
| uint8_t * | value | ||
| ) |
Read from a register.
- Parameters:
-
[in] reg Address of a register to be read. [out] value Pointer to save result value.
- Returns:
- 0 on success, negative error code on failure.
Definition at line 78 of file MAX77659.cpp.
| int set_ade_ldo | ( | decode_ade_ldo_t | ade_ldo ) |
Set LDO0 Active-Discharge Enable.
- Parameters:
-
[in] ade_ldo LDO0 active-discharge enable bit to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 1745 of file MAX77659.cpp.
| int set_ade_sbb | ( | uint8_t | channel, |
| decode_ade_sbb_t | ade_sbb | ||
| ) |
Set SIMO Buck-Boost Channel x Active-Discharge Enable.
- Parameters:
-
[in] channel Channel number: 0, 1 or 2. [in] ade_sbb SIMO buck-boost channel 2 active-discharge enable bit to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 1441 of file MAX77659.cpp.
| int set_chg_cc | ( | float | currentmA ) |
Set the Fast-Charge Constant Current Value, IFAST-CHG.
Bit 7:2 of CNFG_CHG_E (0x24) register.
- Parameters:
-
[in] currentmA 7.5mA, 15.0mA, 22.5mA, ... 292.5mA, 300.0mA.
- Returns:
- 0 on success, error code on failure.
Definition at line 1067 of file MAX77659.cpp.
| int set_chg_cc_jeita | ( | float | currentmA ) |
Set IFAST-CHG-JEITA when the battery is either cool or warm as defined by the VCOOL and VWARM temperature thresholds.
Bit 7:2 of CNFG_CHG_F (0x25) register.
- Parameters:
-
[in] currentmA 7.5mA, 15.0mA, 22.5mA, ... 292.5mA, 300.0mA.
- Returns:
- 0 on success, error code on failure.
Definition at line 1120 of file MAX77659.cpp.
| int set_chg_cv | ( | float | voltV ) |
Set Fast-Charge Battery Regulation Voltage, VFAST-CHG.
Bit 7:2 of CNFG_CHG_G (0x26) register.
- Parameters:
-
[in] voltV 3.600V, 3.625V, 3.650V, ... 4.575V, 4.600V.
- Returns:
- 0 on success, error code on failure.
Definition at line 1175 of file MAX77659.cpp.
| int set_chg_cv_jeita | ( | float | voltV ) |
Set the modified VFAST-CHG-JEITA for when the battery is either cool or warm as defined by the VCOOL and VWARM temperature thresholds.
Bit 7:2 of CNFG_CHG_H (0x27) register.
- Parameters:
-
[in] voltV Pointer of value to be read. 3.600V, 3.625V, 3.650V, ... 4.575V, 4.600V.
- Returns:
- 0 on success, error code on failure.
Definition at line 1226 of file MAX77659.cpp.
| int set_chg_pq | ( | float | voltV ) |
Set Battery Prequalification Voltage Threshold (VPQ).
Bit 7:5 of CNFG_CHG_C (0x22) register.
- Parameters:
-
[in] voltV 2.3V, 2.4V, 2.5V, 2.6V, 2.7V, 2.8V, 2.9V, 3.0V.
- Returns:
- 0 on success, error code on failure.
Definition at line 905 of file MAX77659.cpp.
| int set_cnfg_chg_b | ( | reg_bit_cnfg_chg_b_t | bit_field, |
| uint8_t | config | ||
| ) |
Set CNFG_CHG_B (0x21) register.
- Parameters:
-
[in] bit_field Register bit field to be written. [in] config Register bit field to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 851 of file MAX77659.cpp.
| int set_cnfg_glbl | ( | reg_bit_cnfg_glbl_t | bit_field, |
| uint8_t | config | ||
| ) |
Set CNFG_GLBL (0x10) register.
- Parameters:
-
[in] bit_field Register bit field to be written. [in] config Register bit field to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 378 of file MAX77659.cpp.
| int set_cnfg_gpio | ( | reg_bit_cnfg_gpio_t | bit_field, |
| uint8_t | channel, | ||
| uint8_t | config | ||
| ) |
Set either CNFG_GPIO0 (0x11) or CNFG_GPIO1 (0x12).
- Parameters:
-
[in] bit_field Register bit field to be written. [in] channel Channel number: 0 or 1 [in] config Register bit field to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 456 of file MAX77659.cpp.
| int set_cnfg_wdt | ( | reg_bit_cnfg_wdt_t | bit_field, |
| uint8_t | config | ||
| ) |
Set CNFG_WDT (0x17) register.
- Parameters:
-
[in] bit_field Register bit field to be written. [in] config Field value to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 614 of file MAX77659.cpp.
| int set_drv_sbb | ( | decode_drv_sbb_t | drv_sbb ) |
Set SIMO Buck-Boost (all channels) Drive Strength Trim.
- Parameters:
-
[in] drv_sbb SIMO buck-boost drive strength trim field to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 1571 of file MAX77659.cpp.
| int set_en_ldo | ( | decode_en_ldo_t | en_ldo ) |
Set Enable Control for LDO Channel0.
- Parameters:
-
[in] en_ldo Enable control for LDO channel x field to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 1723 of file MAX77659.cpp.
| int set_en_sbb | ( | uint8_t | channel, |
| decode_en_sbb_t | en_sbb | ||
| ) |
Set Enable Control for SIMO Buck-Boost Channel x.
- Parameters:
-
[in] channel Channel number: 0, 1 or 2. [in] en_sbb Enable control for SIMO buck-boost channel x field to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 1495 of file MAX77659.cpp.
| int set_i_term | ( | float | percent ) |
Set Charger Termination Current (ITERM).
I_TERM[1:0] sets the charger termination current as a percentage of the fast charge current IFAST-CHG. Bit 4:3 of CNFG_CHG_C (0x22) register.
- Parameters:
-
[in] percent 5%, 7.5%, 10%, 15%.
- Returns:
- 0 on success, error code on failure.
Definition at line 934 of file MAX77659.cpp.
| int set_imon_dischg_scale | ( | float | currentmA ) |
Set the Battery Discharge Current Full-Scale Current Value.
Bit 7:4 of CNFG_CHG_I (0x28) register.
- Parameters:
-
[in] currentmA 8.2mA, 40.5mA, 72.3mA, 103.4mA, 134.1mA, 164.1mA, 193.7mA, 222.7mA, 251.2mA, 279.3mA, 300.0mA
- Returns:
- 0 on success, error code on failure.
Definition at line 1255 of file MAX77659.cpp.
| void set_interrupt_handler | ( | reg_bit_int_glbl_t | id, |
| interrupt_handler_function | func, | ||
| void * | cb | ||
| ) |
Set Interrupt Handler for a Specific Interrupt ID.
- Parameters:
-
[in] id Interrupt id, one of INTR_ID_*. [in] func Interrupt handler function. [in] cb Interrupt handler data.
Definition at line 1822 of file MAX77659.cpp.
| int set_interrupt_mask | ( | reg_bit_int_mask_t | bit_field, |
| uint8_t | maskBit | ||
| ) |
Set bit field of INT_M_CHG (0x07), INTM_GLBL1 (0x08) or INTM_GLBL0 (0x09) register.
- Parameters:
-
[in] bit_field Register bit field to be set. [out] maskBit 0x0: Interrupt is unmasked, 0x1: Interrupt is masked.
- Returns:
- 0 on success, error code on failure.
Definition at line 211 of file MAX77659.cpp.
| int set_ip_chg | ( | decode_ip_chg_t | ip_chg ) |
Set SIMO Buck-Boost Charging Channel Peak Current Limit.
- Parameters:
-
[in] ip_chg SIMO Buck-Boost Charging Channel Peak Current Limit field to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 1593 of file MAX77659.cpp.
| int set_ip_sbb | ( | uint8_t | channel, |
| decode_ip_sbb_t | ip_sbb | ||
| ) |
Set SIMO Buck-Boost Channel 0, 1 or 2 Peak Current Limit.
- Parameters:
-
[in] channel Channel number: 0, 1 or 2. [in] ip_sbb SIMO Buck-Boost Channel x Peak Current Limit field to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 1615 of file MAX77659.cpp.
| int set_ldo_md | ( | decode_ldo_md_t | mode ) |
Set Operation mode of LDOx.
- Parameters:
-
[in] mode Operation mode of LDOx bit to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 1767 of file MAX77659.cpp.
| int set_mux_sel | ( | decode_mux_sel_t | selection ) |
Set the analog channel to connect to AMUX.
- Parameters:
-
[in] selection AMUX value field to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 1302 of file MAX77659.cpp.
| int set_op_mode | ( | uint8_t | channel, |
| decode_op_mode_t | mode | ||
| ) |
Set Operation mode of SBBx.
- Parameters:
-
[in] channel Channel number: 0, 1 or 2. [in] mode Operation mode of SBBx bit to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 1387 of file MAX77659.cpp.
| int set_op_mode_chg | ( | decode_op_mode_chg_t | op_mode_chg ) |
Set Operation mode of the charging channel of SIMO.
- Parameters:
-
[in] op_mode_chg Operation mode of the charging channel of SIMO bit to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 1549 of file MAX77659.cpp.
| int set_t_fast_chg | ( | decode_t_fast_chg_t | t_fast_chg ) |
Set the Fast-charge Safety timer, tFC.
Bit 1:0 of CNFG_CHG_E (0x24) register.
- Parameters:
-
[in] t_fast_chg Fast-charge safety timer field to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 1099 of file MAX77659.cpp.
| int set_t_topoff | ( | uint8_t | minute ) |
Set Top-off Timer Value.
Bit 2:0 of CNFG_CHG_C (0x22) register.
- Parameters:
-
[in] minute 0 minutes, 5 minutes, 10 minutes 15 minutes, 20 minutes, 25 minutes, 30 minutes, 35 minutes.
- Returns:
- 0 on success, error code on failure.
Definition at line 968 of file MAX77659.cpp.
| int set_thm_cold | ( | decode_thm_cold_t | thm_cold ) |
Set the VCOLD JEITA Temperature Threshold.
- Parameters:
-
[in] thm_cold The VCOLD JEITA temperature threshold field to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 829 of file MAX77659.cpp.
| int set_thm_cool | ( | decode_thm_cool_t | thm_cool ) |
Set the VCOOL JEITA Temperature Threshold.
- Parameters:
-
[in] thm_cool The VCOOL JEITA temperature threshold field to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 807 of file MAX77659.cpp.
| int set_thm_en | ( | decode_thm_en_t | thm_en ) |
Set Thermistor Enable Bit.
Bit 1 of CNFG_CHG_F (0x25) register.
- Parameters:
-
[in] thm_en Thermistor Enable Bit to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 1153 of file MAX77659.cpp.
| int set_thm_hot | ( | decode_thm_hot_t | thm_hot ) |
Set the VHOT JEITA Temperature Threshold.
- Parameters:
-
[in] thm_hot The VHOT JEITA temperature threshold field to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 763 of file MAX77659.cpp.
| int set_thm_warm | ( | decode_thm_warm_t | thm_warm ) |
Set the VWARM JEITA Temperature Threshold.
- Parameters:
-
[in] thm_warm The VWARM JEITA temperature threshold field to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 785 of file MAX77659.cpp.
| int set_tj_reg | ( | uint8_t | tempDegC ) |
Set the Die Junction Temperature Regulation Point, TJ-REG.
Bit 7:5 of CNFG_CHG_D (0x23) register.
- Parameters:
-
[in] tempDegC 60ºC, 70ºC, 80ºC, 90ºC, 100ºC.
- Returns:
- 0 on success, error code on failure.
Definition at line 995 of file MAX77659.cpp.
| int set_tv_ldo_offset | ( | decode_tv_ldo_offset_t | offset ) |
Set LDO Output Channel 0 Target Output Voltage.
Bit 7. CNFG_LDO0_A (0x38)
- Parameters:
-
[in] offset LDO Output Channel 0 target output voltage offset field to be read.
- Returns:
- 0 on success, error code on failure.
Definition at line 1655 of file MAX77659.cpp.
| int set_tv_ldo_volt | ( | float | voltV ) |
Set LDO Output Channel 0 Target Output Voltage.
Bit 6:0. CNFG_LDO0_A (0x38)
- Parameters:
-
[in] voltV LDO Output Channel 0 target output voltage field to be read. LDOx = 500mV + 25mV x TV_LDOx[6:0] 0.500V, 0.525V, 0.550V, 0.575V, 0.600V, 0.625V, 0.650V, 0.675V, 0.700V, ... 3.650, 3.675.
When TV_LDO[7] = 0, TV_LDO[6:0] sets the LDO's output voltage range from 0.5V to 3.675V. When TV_LDO[7] = 1, TV_LDO[6:0] sets the LDO's output voltage from 1.825V to 5V.
- Returns:
- 0 on success, error code on failure.
Definition at line 1677 of file MAX77659.cpp.
| int set_tv_sbb | ( | uint8_t | channel, |
| float | voltV | ||
| ) |
Set SIMO Buck-Boost Channel x Target Output Voltage.
CNFG_SBB0_A (0x29), CNFG_SBB1_A (0x2B) and CNFG_SBB2_A (0x2D)
- Parameters:
-
[in] channel Channel number: 0, 1 or 2. [in] voltV SIMO buck-boost channel x target output voltage field to be written. SBBx = 500mV + 25mV x TV_SBBx[7:0] 0.500V, 0.525V, 0.550V, 0.575V, 0.600V, 0.625V, 0.650V, 0.675V, 0.700V, ... 5.425V, 5.450V, 5.475V, 5.500V.
- Returns:
- 0 on success, error code on failure.
Definition at line 1322 of file MAX77659.cpp.
| int set_usbs | ( | decode_usbs_t | usbs ) |
Set USB Suspend Mode Bit.
Bit 1 of CNFG_CHG_G (0x26) register.
- Parameters:
-
[in] usbs CHGIN in USB suspend mode bit to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 1204 of file MAX77659.cpp.
| int set_vsys_hdrm | ( | decode_vsys_hdrm_t | vsys_hdrm ) |
Set SYS Headroom Voltage Regulation.
- Parameters:
-
[in] vsys_hdrm SYS Headroom Voltage field to be written.
- Returns:
- 0 on success, error code on failure.
Definition at line 1023 of file MAX77659.cpp.
| int set_vsys_min | ( | decode_vsys_min_t | vsys_min ) |
Set Minimum SYS Voltage.
Bit 1:0 of CNFG_CHG_D (0x23) register.
- Parameters:
-
[in] vsys_min Decoded values for 3.2V, 3.3V, 3.4V, 3.5V.
- Returns:
- 0 on success, error code on failure.
Definition at line 1045 of file MAX77659.cpp.
| int write_register | ( | uint8_t | reg, |
| const uint8_t * | value | ||
| ) |
Write to a register.
- Parameters:
-
[in] reg Address of a register to be written. [out] value Pointer of value to be written to register.
- Returns:
- 0 on success, negative error code on failure.
Definition at line 96 of file MAX77659.cpp.
Generated on Mon Aug 22 2022 16:08:46 by
1.7.2