MAX14690 Library
Dependents: MAX32630HSP3_IMU_HelloWorld MAX32630HSP3_IMU_HelloWorld max32630fthr max4146x_comp ... more
Fork of MAX14690 by
MAX14690.h
00001 /******************************************************************************* 00002 * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved. 00003 * 00004 * Permission is hereby granted, free of charge, to any person obtaining a 00005 * copy of this software and associated documentation files (the "Software"), 00006 * to deal in the Software without restriction, including without limitation 00007 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00008 * and/or sell copies of the Software, and to permit persons to whom the 00009 * Software is furnished to do so, subject to the following conditions: 00010 * 00011 * The above copyright notice and this permission notice shall be included 00012 * in all copies or substantial portions of the Software. 00013 * 00014 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00015 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00016 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 00017 * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES 00018 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 00019 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 00020 * OTHER DEALINGS IN THE SOFTWARE. 00021 * 00022 * Except as contained in this notice, the name of Maxim Integrated 00023 * Products, Inc. shall not be used except as stated in the Maxim Integrated 00024 * Products, Inc. Branding Policy. 00025 * 00026 * The mere transfer of this software does not imply any licenses 00027 * of trade secrets, proprietary technology, copyrights, patents, 00028 * trademarks, maskwork rights, or any other form of intellectual 00029 * property whatsoever. Maxim Integrated Products, Inc. retains all 00030 * ownership rights. 00031 ******************************************************************************* 00032 */ 00033 00034 #ifndef _MAX14690_H_ 00035 #define _MAX14690_H_ 00036 00037 #include "mbed.h" 00038 00039 #define MAX14690_NO_ERROR 0 00040 #define MAX14690_ERROR -1 00041 00042 #define MAX14690_I2C_ADDR 0x50 00043 00044 #define MAX14690_LDO_MIN_MV 800 00045 #define MAX14690_LDO_MAX_MV 3600 00046 #define MAX14690_LDO_STEP_MV 100 00047 00048 #define MAX14690_OFF_COMMAND 0xB2 00049 00050 /** 00051 * @brief MAX14690 Wearable Power-Management Solution Driver 00052 * 00053 * @details The MAX14690 is a compact power-management solutions for 00054 * space-constrained, battery-powered applications where size and efficiency are 00055 * critical. It combines a battery charger with two buck regulators, three LDOs and 00056 * a other power supervisory functions to optimize the system implementation. 00057 * <br>https://www.maximintegrated.com/en/products/power/battery-management/MAX14690.html 00058 * 00059 * @code 00060 * #include "mbed.h" 00061 * #include "MAX14690.h" 00062 * 00063 * // I2C Master 2 00064 * I2C i2cm2(I2C2_SDA, I2C2_SCL); 00065 * 00066 * MAX14690 max14690(&i2cm2); 00067 * 00068 * DigitalOut led(LED1, 0); 00069 * InterruptIn button(SW1); 00070 * 00071 * void turnOff() 00072 * { 00073 * max14690.shutdown(); 00074 * } 00075 * 00076 * int main() 00077 * { 00078 * button.fall(&turnOff); 00079 * 00080 * max14690.ldo2Millivolts = 3300; 00081 * max14690.ldo3Millivolts = 3300; 00082 * max14690.ldo2Mode = MAX14690::LDO_ENABLED; 00083 * max14690.ldo3Mode = MAX14690::LDO_ENABLED; 00084 * max14690.monCfg = MAX14690::MON_HI_Z; 00085 * if (max14690.init() == MAX14690_ERROR) { 00086 * printf("Error initializing MAX14690"); 00087 * } 00088 * 00089 * Thread::wait(500); 00090 * 00091 * while(1) { 00092 * led1 = !led1; 00093 * Thread::wait(500); 00094 * } 00095 * } 00096 * @endcode 00097 */ 00098 class MAX14690 00099 { 00100 public: 00101 00102 /** 00103 * @brief Register Addresses 00104 * @details Enumerated MAX14690 register addresses 00105 */ 00106 enum registers_t { 00107 REG_CHIP_ID = 0x00, ///< Chip ID 00108 REG_CHIP_REV = 0x01, ///< Chip Revision 00109 REG_STATUS_A = 0x02, ///< Status Register A 00110 REG_STATUS_B = 0x03, ///< Status Register B 00111 REG_STATUS_C = 0x04, ///< Status Register C 00112 REG_INT_A = 0x05, ///< Interrupt Register A 00113 REG_INT_B = 0x06, ///< Interrupt Register B 00114 REG_INT_MASK_A = 0x07, ///< Interrupt Mask A 00115 REG_INT_MASK_B = 0x08, ///< Interrupt Mask B 00116 REG_I_LIM_CNTL = 0x09, ///< Input Limit Control 00117 REG_CHG_CNTL_A = 0x0A, ///< Charger Control A 00118 REG_CHG_CNTL_B = 0x0B, ///< Charger Control B 00119 REG_CHG_TMR = 0x0C, ///< Charger Timers 00120 REG_BUCK1_CFG = 0x0D, ///< Buck 1 Configuration 00121 REG_BUCK1_VSET = 0x0E, ///< Buck 1 Voltage Setting 00122 REG_BUCK2_CFG = 0x0F, ///< Buck 2 Configuration 00123 REG_BUCK2_VSET = 0x10, ///< Buck 2 Voltage Setting 00124 REG_RSVD_11 = 0x11, ///< Reserved 0x11 00125 REG_LDO1_CFG = 0x12, ///< LDO 1 Configuration 00126 REG_LDO1_VSET = 0x13, ///< LDO 1 Voltage Setting 00127 REG_LDO2_CFG = 0x14, ///< LDO 2 Configuration 00128 REG_LDO2_VSET = 0x15, ///< LDO 2 Voltage Setting 00129 REG_LDO3_CFG = 0x16, ///< LDO 3 Configuration 00130 REG_LDO3_VSET = 0x17, ///< LDO 3 Voltage Setting 00131 REG_THRM_CFG = 0x18, ///< Thermistor Configuration 00132 REG_MON_CFG = 0x19, ///< Monitor Multiplexer Configuration 00133 REG_BOOT_CFG = 0x1A, ///< Boot Configuration 00134 REG_PIN_STATUS = 0x1B, ///< Pin Status 00135 REG_BUCK_EXTRA = 0x1C, ///< Additional Buck Settings 00136 REG_PWR_CFG = 0x1D, ///< Power Configuration 00137 REG_NULL = 0x1E, ///< Reserved 0x1E 00138 REG_PWR_OFF = 0x1F, ///< Power Off Register 00139 }; 00140 00141 /** 00142 * @brief Thermal Status 00143 * @details Thermal status determined by thermistor 00144 */ 00145 enum thermStat_t { 00146 THMSTAT_000, ///< T < T1 00147 THMSTAT_001, ///< T1 < T < T2 00148 THMSTAT_010, ///< T2 < T < T3 00149 THMSTAT_011, ///< T3 < T < T4 00150 THMSTAT_100, ///< T > T4 00151 THMSTAT_101, ///< No theremistor detected 00152 THMSTAT_110, ///< Thermistor Disabled by ThermEn 00153 THMSTAT_111, ///< CHGIN not present 00154 }; 00155 00156 /** 00157 * @brief Charge Status 00158 * @details Current operating mode of charger 00159 */ 00160 enum chgStat_t { 00161 CHGSTAT_000, ///< Charger off 00162 CHGSTAT_001, ///< Charging suspended by temperature 00163 CHGSTAT_010, ///< Pre-charge 00164 CHGSTAT_011, ///< Fast-charge constant current 00165 CHGSTAT_100, ///< Fast-charge constant voltage 00166 CHGSTAT_101, ///< Maintain charge 00167 CHGSTAT_110, ///< Done 00168 CHGSTAT_111, ///< Charger fault 00169 }; 00170 00171 /** 00172 * @brief Input Current Limit 00173 * @details CHGIN input current limit values 00174 */ 00175 enum iLimCntl_t { 00176 ILIM_0mA, ///< 0mA 00177 ILIM_100mA, ///< 100mA 00178 ILIM_500mA, ///< 500mA 00179 ILIM_1000mA, ///< 1000mA 00180 }; 00181 00182 /** 00183 * @brief Recharge Threshold 00184 * @details Battery recharge voltage threshold 00185 */ 00186 enum batReChg_t { 00187 BAT_RECHG_70mV, ///< 70mV 00188 BAT_RECHG_120mV, ///< 120mV 00189 BAT_RECHG_170mV, ///< 170mV 00190 BAT_RECHG_220mV, ///< 220mV 00191 }; 00192 00193 /** 00194 * @brief Battery Regulation Voltage 00195 * @details Battery regulation voltages set point 00196 */ 00197 enum batReg_t { 00198 BAT_REG_4050mV, ///< 4.05V 00199 BAT_REG_4100mV, ///< 4.10V 00200 BAT_REG_4150mV, ///< 4.15V 00201 BAT_REG_4200mV, ///< 4.20V 00202 BAT_REG_4250mV, ///< 4.25V 00203 BAT_REG_4300mV, ///< 4.30V 00204 BAT_REG_4350mV, ///< 4.35V 00205 BAT_REG_RSVD, ///< reserved 00206 }; 00207 00208 /** 00209 * @brief Precharge Voltage 00210 * @details Battery precharge voltage threshold 00211 */ 00212 enum vPChg_t { 00213 VPCHG_2100mV, ///< 2.10V 00214 VPCHG_2250mV, ///< 2.25V 00215 VPCHG_2400mV, ///< 2.40V 00216 VPCHG_2550mV, ///< 2.55V 00217 VPCHG_2700mV, ///< 2.70V 00218 VPCHG_2850mV, ///< 2.85V 00219 VPCHG_3000mV, ///< 3.00V 00220 VPCHG_3150mV, ///< 3.15V 00221 }; 00222 00223 /** 00224 * @brief Precharge Current 00225 * @details Battery precharge current value 00226 */ 00227 enum iPChg_t { 00228 IPCHG_5, ///< 5% of Ifchg 00229 IPCHG_10, ///< 10% of Ifchg 00230 IPCHG_20, ///< 20% of Ifchg 00231 IPCHG_30, ///< 30% of Ifchg 00232 }; 00233 00234 /** 00235 * @brief Done Current 00236 * @details Charger done current where charging stops 00237 */ 00238 enum chgDone_t { 00239 CHGDONE_5, ///< 5% of Ifchg 00240 CHGDONE_10, ///< 10% of Ifchg 00241 CHGDONE_20, ///< 20% of Ifchg 00242 CHGDONE_30, ///< 30% of Ifchg 00243 }; 00244 00245 /** 00246 * @brief Maintain Charge Timer 00247 * @details Timeout settings for maintain charge mode 00248 */ 00249 enum mtChgTmr_t { 00250 MTCHGTMR_0min, ///< 0 min 00251 MTCHGTMR_15min, ///< 15 min 00252 MTCHGTMR_30min, ///< 30 min 00253 MTCHGTMR_60min, ///< 60 min 00254 }; 00255 00256 /** 00257 * @brief Fast Charge Timer 00258 * @details Timeout settings for fast charge mode 00259 */ 00260 enum fChgTmr_t { 00261 FCHGTMR_75min, ///< 75 min 00262 FCHGTMR_150min, ///< 150 min 00263 FCHGTMR_300min, ///< 300 min 00264 FCHGTMR_600min, ///< 600 min 00265 }; 00266 00267 /** 00268 * @brief Precharge Timer 00269 * @details Timeout settings for precharge mode 00270 */ 00271 enum pChgTmr_t { 00272 PCHGTMR_30min, ///< 30 min 00273 PCHGTMR_60min, ///< 60 min 00274 PCHGTMR_120min, ///< 120 min 00275 PCHGTMR_240min, ///< 240 min 00276 }; 00277 00278 /** 00279 * @brief LDO Enable Mode 00280 * @details Enumerated enable modes for voltage regulators 00281 */ 00282 enum ldoMode_t { 00283 LDO_DISABLED, ///< Disabled, Regulator Mode 00284 SW_DISABLED, ///< Disabled, Switch Mode 00285 LDO_ENABLED, ///< Enabled, Regulator Mode 00286 SW_ENABLED, ///< Enabled, Switch Mode 00287 LDO_EN_MPC0, ///< Regulator Enabled by MPC pin 00288 SW_EN_MPC0, ///< Switch Enabled by MPC pin 00289 LDO_EN_MPC1, ///< Regulator Enabled by MPC pin 00290 SW_EN_MPC1, ///< Switch Enabled by MPC pin 00291 LDO_DISABLED_DSC, ///< Regulator Disabled 00292 SW_DISABLED_DSC, ///< Switch Disabled 00293 LDO_ENABLED_DSC, ///< Regulator Enabled 00294 SW_ENABLED_DSC, ///< Switch Enabled 00295 LDO_EN_MPC0_DSC, ///< Regulator Enabled by MPC pin 00296 SW_EN_MPC0_DSC, ///< Switch Enabled by MPC pin 00297 LDO_EN_MPC1_DSC, ///< Regulator Enabled by MPC pin 00298 SW_EN_MPC1_DSC, ///< Switch Enabled by MPC pin 00299 }; 00300 00301 /** 00302 * @brief Buck Operating Modes 00303 * @details Enumerated operating modes for buck regulator 00304 */ 00305 enum buckMd_t { 00306 BUCK_BURST, ///< Burst Mode Operation 00307 BUCK_FPWM, ///< Forced PWM Operation 00308 BUCK_MPC0_FPWM, ///< MPC activated Forced PWM 00309 BUCK_MPC1_FPWM, ///< MPC activated Forced PWM 00310 }; 00311 00312 /** 00313 * @brief Thermistor Configuration 00314 * @details Enumerated thermistor operating modes 00315 */ 00316 enum thrmCfg_t { 00317 THRM_DISABLED, ///< Thermistor monitoring disabled 00318 THRM_ENABLED, ///< Basic thermistor monitoring 00319 THRM_RSVD, ///< reserved, do not use 00320 THRM_JEITA, ///< JEITA thermistor monitoring 00321 }; 00322 00323 /** 00324 * @brief Monitor Configurations 00325 * @details Enumerated configuration modes for monitor multiplexer 00326 */ 00327 enum monCfg_t { 00328 MON_PULLDOWN = 0x0, ///< Pulled down by 100k Ohm 00329 MON_BAT = 0x1, ///< BAT Selected 00330 MON_SYS = 0x2, ///< SYS Selected 00331 MON_BUCK1 = 0x3, ///< BUCK1 Selected 00332 MON_BUCK2 = 0x4, ///< BUCK2 Selected 00333 MON_LDO1 = 0x5, ///< LDO1 Selected 00334 MON_LDO2 = 0x6, ///< LDO2 Selected 00335 MON_LDO3 = 0x7, ///< LDO3nSelected 00336 MON_HI_Z = 0x8, ///< High Impedance 00337 }; 00338 00339 /** 00340 * @brief Monitor Divide Ratio 00341 * @details Ratio settings for monitor divider 00342 */ 00343 enum monRatio_t { 00344 MON_DIV4, ///< 4:1 Monitor Ratio 00345 MON_DIV3, ///< 3:1 Monitor Ratio 00346 MON_DIV2, ///< 2:1 Monitor Ratio 00347 MON_DIV1, ///< 1:1 Monitor Ratio 00348 }; 00349 00350 /** 00351 * MAX14690 constructor. 00352 * 00353 * @param i2c I2C object to use. 00354 */ 00355 MAX14690(I2C *i2c); 00356 00357 /** 00358 * MAX14690 destructor. 00359 */ 00360 ~MAX14690(); 00361 00362 /** 00363 * @brief Initialize MAX14690 00364 * @details Applies settings to MAX14690. 00365 * Settings are stored in public variables. 00366 * The variables are pre-loaded with the most common configuation. 00367 * Assign new values to the public variables before calling init. 00368 * This will update all the settings including the LDO voltages 00369 * and modes. 00370 * @returns 0 if no errors, -1 if error. 00371 */ 00372 int init(); 00373 00374 /** 00375 * @brief Set the LDO Voltage 00376 * @details Sets the voltage for the boost regulator. 00377 * The voltage is specified in millivolts. 00378 * The MAX14690 cannot update the voltage when enabled. 00379 * This function checks the local ldoMode variable and if the 00380 * regualtor is enabled it will send the disable command before 00381 * sending the new voltage and re-enable the LDO after 00382 * the new voltage is written. 00383 * @param mV voltage for boost regualtor in millivolts 00384 * @returns 0 if no errors, -1 if error. 00385 */ 00386 int ldo2SetVoltage(int mV); 00387 00388 /** 00389 * @brief Set LDO Enable Mode 00390 * @details Sets the enable mode for the LDO/SW 00391 * @param mode The enable mode for the LDO/SW 00392 * @returns 0 if no errors, -1 if error. 00393 */ 00394 int ldo2SetMode(ldoMode_t mode); 00395 00396 /** 00397 * @brief Set the LDO Voltage 00398 * @details Sets the voltage for the boost regulator. 00399 * The voltage is specified in millivolts. 00400 * The MAX14690 cannot update the voltage when enabled. 00401 * This function checks the local ldoMode variable and if the 00402 * regualtor is enabled it will send the disable command before 00403 * sending the new voltage and re-enable the LDO after 00404 * the new voltage is written. 00405 * @param mV voltage for boost regualtor in millivolts 00406 * @returns 0 if no errors, -1 if error. 00407 */ 00408 int ldo3SetVoltage(int mV); 00409 00410 /** 00411 * @brief Set LDO Enable Mode 00412 * @details Sets the enable mode for the LDO/SW 00413 * @param mode The enable mode for the LDO/SW 00414 * @returns 0 if no errors, -1 if error. 00415 */ 00416 int ldo3SetMode(ldoMode_t mode); 00417 00418 /** 00419 * @brief Configure Mon Pin 00420 * @details Configures the operating mode of the monitor multiplexer 00421 * @param monCfg The configuration mode for the monitor pin 00422 * @returns 0 if no errors, -1 if error. 00423 */ 00424 int monSet(monCfg_t monCfg, monRatio_t monRatio); 00425 00426 /** 00427 * @brief Shutdown 00428 * @details Sends the command to turn off all supplies and put the part 00429 * in battery saving shelf mode. 00430 * @returns 0 if no errors, -1 if error. 00431 */ 00432 int shutdown(); 00433 00434 /** 00435 * @brief Reset settings to default values 00436 * @details Resets all local variables to the default value. 00437 * Note: this only resets the local variables and has no effect 00438 * on the part until they are applied by another functions such as 00439 * init(); 00440 * @returns 0 if no errors, -1 if error. 00441 */ 00442 void resetToDefaults(); 00443 00444 /** 00445 * @brief Write Register 00446 * @details Writes the given value to the specified register. 00447 * Note, this function provides direct access to the registers 00448 * without any awareness or effect on the settings stored in 00449 * the public variables. This is used by the other functions to 00450 * set the values inside the MAX14690. Calling this outside of the 00451 * other functions can break the synchronization of the variables 00452 * to the state of the MAX14690. 00453 * @param reg The register to be written 00454 * @param value The data to be written 00455 * @returns 0 if no errors, -1 if error. 00456 */ 00457 int writeReg(registers_t reg, char value); 00458 00459 /** 00460 * @brief Read Register 00461 * @details Reads from the specified register 00462 * @param reg The register to be read 00463 * @param value Pointer for where to store the data 00464 * @returns 0 if no errors, -1 if error. 00465 */ 00466 int readReg(registers_t reg, char *value); 00467 00468 /// Thermal Status Change Interrupt Enable: default 0 - Disabled, 1 - Enabled 00469 bool intEnThermStatus; 00470 /// Charger Status Change Interrupt Enable: default 0 - Disabled, 1 - Enabled 00471 bool intEnChgStatus; 00472 /// Input Limit Interrupt Enable: default 0 - Disabled, 1 - Enabled 00473 bool intEnILim; 00474 /// USB Over Voltage Interrupt Enable: default 0 - Disabled, 1 - Enabled 00475 bool intEnUSBOVP; 00476 /// USB OK Interrupt Enable: default 0 - Disabled, 1 - Enabled 00477 bool intEnUSBOK; 00478 /// Charger Thermal Shutdown Interrupt Enable: default 0 - Disabled, 1 - Enabled 00479 bool intEnChgThmSD; 00480 /// Thermal Regulation Interrupt Enable: default 0 - Disabled, 1 - Enabled 00481 bool intEnThermReg; 00482 /// Charger Timeout Interrupt Enable: default 0 - Disabled, 1 - Enabled 00483 bool intEnChgTimeOut; 00484 /// Buck1 Thermal Error Interrupt Enable: default 0 - Disabled, 1 - Enabled 00485 bool intEnThermBuck1; 00486 /// Buck2 Thermal Error Interrupt Enable: default 0 - Disabled, 1 - Enabled 00487 bool intEnThermBuck2; 00488 /// LDO1 Thermal Error Interrupt Enable: default 0 - Disabled, 1 - Enabled 00489 bool intEnThermLDO1; 00490 /// LDO2 Thermal Error Interrupt Enable: default 0 - Disabled, 1 - Enabled 00491 bool intEnThermLDO2; 00492 /// LDO3 Thermal Error Interrupt Enable: default 0 - Disabled, 1 - Enabled 00493 bool intEnThermLDO3; 00494 /// CHGIN Input Current Limit Setting: default 500mA 00495 iLimCntl_t iLimCntl; 00496 /// Charger Auto Stop: default 1 - move to Charge Done when charging complete, 0 - remain in Maintain Charge mode 00497 bool chgAutoStp; 00498 /// Charger Auto Restart: default 1 - restart charging when Vbat drops below threshold, 0 - stay in Charge Done until charging disabled 00499 bool chgAutoReSta; 00500 /// Charger Battery Recharge Threshold: default -120mV 00501 batReChg_t batReChg; 00502 /// Charger Battery Regulation Voltage: default 4.20V 00503 batReg_t batReg; 00504 /// Charger Enable: default 1 - Enabled, 0 - Disabled 00505 bool chgEn; 00506 /// Charger Precharge Voltage Threshold: default 3.00V 00507 vPChg_t vPChg; 00508 /// Charger Precharge Current Setting: default 10% of fast charge current 00509 iPChg_t iPChg; 00510 /// Charger Done Threshold, stop charging when charge current drops to this level: default 10% of fast charge current 00511 chgDone_t chgDone; 00512 /// Maintain Charge Timer, time to wait after reaching done current before disabling charger: default 0 min 00513 mtChgTmr_t mtChgTmr; 00514 /// Fast Charge Timer, timeout for fast charge duration: default 300 min 00515 fChgTmr_t fChgTmr; 00516 /// Precharge Timer, timeout for precharge duration: default 60 min 00517 pChgTmr_t pChgTmr; 00518 /// Buck 1 Mode Select: default Burst mode 00519 buckMd_t buck1Md; 00520 /// Buck 1 Inductor Select: default 0 - 2.2uH, 1 - 4.7uH 00521 bool buck1Ind; 00522 /// Buck 2 Mode Select: default BUCK_BURST 00523 buckMd_t buck2Md; 00524 /// Buck 2 Inductor Select: default 0 - 2.2uH, 1 - 4.7uH 00525 bool buck2Ind; 00526 /// LDO 2 Mode Select: default LDO_DISABLED 00527 ldoMode_t ldo2Mode; 00528 /// LDO 2 Voltage in millivolts: default 3200 00529 int ldo2Millivolts; 00530 /// LDO 3 Mode Select: default LDO_DISABLED 00531 ldoMode_t ldo3Mode; 00532 /// LDO 3 Voltage in millivolts: default 3000 00533 int ldo3Millivolts; 00534 /// Thermistor Configuration: default THRM_ENABLED 00535 thrmCfg_t thrmCfg; 00536 /// Monitor Multiplexer Divider Ratio Select: default MON_DIV4 00537 monRatio_t monRatio; 00538 /// Monitor Multiplexer Configuration: default MON_PULLDOWN 00539 monCfg_t monCfg; 00540 /// Buck 2 Active Discharge: default 0 - discharge only during hard reset, 1 - discharge when regulator is disabled 00541 bool buck2ActDsc; 00542 /// Buck 2 Force FET Scaling: default 0 - full FET for better active efficiency, 1 - reduced FET for lower quiescent current 00543 bool buck2FFET; 00544 /// Buck 1 Active Discharge: default 0 - discharge only during hard reset, 1 - discharge when regulator is disabled 00545 bool buck1ActDsc; 00546 /// Buck 1 Force FET Scaling: default 0 - full FET for better active efficiency, 1 - reduced FET for lower quiescent current 00547 bool buck1FFET; 00548 /// PFN pin resistor enable: default 1 - internal pullup/pulldown enabled, 0 - internal pullup/pulldown disabled 00549 bool pfnResEna; 00550 /// Stay On Handshake: default 1 - remain on, 0 - turn off if not set within 5s of power-on 00551 bool stayOn; 00552 00553 private: 00554 // Internal Resources 00555 I2C *_i2c; 00556 00557 /** 00558 * @brief Converts mV to register bits 00559 * @details Converts integer representing the desired voltage 00560 * in millivolts to the coresponding 8 bit register value. 00561 * This will check to ensure the voltage is within the allowed 00562 * range and return an error (-1) if it is out of range. 00563 * @param mV voltage for LDO regulator in millivolts 00564 * @returns 8 bit register value if no errors, -1 if error. 00565 */ 00566 int mv2bits(int mV); 00567 }; 00568 00569 #endif /* _MAX14690_H_ */
Generated on Tue Jul 12 2022 17:04:09 by 1.7.2