|
PebbleOS
|
Power management IC: power off, charger and supply monitoring. More...
Modules | |
| nPM1300 | |
| Nordic nPM1300 PMIC configuration and extra operations. | |
Functions | |
| bool | pmic_init (void) |
| Initialize the PMIC driver. | |
| bool | pmic_power_off (void) |
| Power off the board. | |
| bool | pmic_enable_battery_measure (void) |
| Enable the PMIC battery monitor. | |
| bool | pmic_disable_battery_measure (void) |
| Disable the PMIC battery monitor. | |
| bool | pmic_set_charger_state (bool enable) |
| Enable or disable battery charging. | |
| bool | pmic_is_charging (void) |
| Check whether the battery is being charged. | |
| bool | pmic_is_usb_connected (void) |
| Check whether a USB charger is connected. | |
| void | pmic_read_chip_info (uint8_t *chip_id, uint8_t *chip_revision, uint8_t *buck1_vset) |
| Read chip information for tracking purposes. | |
| uint16_t | pmic_get_vsys (void) |
| Measure VSYS. | |
| void | set_ldo3_power_state (bool enabled) |
| Switch the LDO3 power rail. | |
| void | set_4V5_power_state (bool enabled) |
| Switch the 4.5 V power rail. | |
| void | set_6V6_power_state (bool enabled) |
| Switch the 6.6 V power rail. | |
Power management IC: power off, charger and supply monitoring.
Functions returning bool report whether the PMIC could be accessed.
| bool pmic_disable_battery_measure | ( | void | ) |
Disable the PMIC battery monitor.
| bool pmic_enable_battery_measure | ( | void | ) |
Enable the PMIC battery monitor.
Disable it with pmic_disable_battery_measure() when readings are no longer needed.
| uint16_t pmic_get_vsys | ( | void | ) |
Measure VSYS.
| bool pmic_init | ( | void | ) |
Initialize the PMIC driver.
Called once at startup.
| bool pmic_is_charging | ( | void | ) |
Check whether the battery is being charged.
Once the battery is full it is no longer charging, even with the charger connected (see pmic_is_usb_connected()).
| bool pmic_is_usb_connected | ( | void | ) |
Check whether a USB charger is connected.
| bool pmic_power_off | ( | void | ) |
Power off the board.
All components lose power except the RTC, and the PMIC wakes the board on a button press. Fails while USB power is connected.
| void pmic_read_chip_info | ( | uint8_t * | chip_id, |
| uint8_t * | chip_revision, | ||
| uint8_t * | buck1_vset | ||
| ) |
Read chip information for tracking purposes.
| [out] | chip_id | Chip ID. |
| [out] | chip_revision | Chip revision. |
| [out] | buck1_vset | BUCK1 voltage setting. |
| bool pmic_set_charger_state | ( | bool | enable | ) |
Enable or disable battery charging.
| enable | true to enable charging. |
| void set_4V5_power_state | ( | bool | enabled | ) |
Switch the 4.5 V power rail.
| enabled | true to power the rail. |
| void set_6V6_power_state | ( | bool | enabled | ) |
Switch the 6.6 V power rail.
| enabled | true to power the rail. |
| void set_ldo3_power_state | ( | bool | enabled | ) |
Switch the LDO3 power rail.
| enabled | true to power the rail. |