SensorLib 0.5.0
Multi-platform sensor driver library for Arduino, PlatformIO, and ESP-IDF
Loading...
Searching...
No Matches
PmicBase.hpp File Reference

@license MIT License More...

Include dependency graph for PmicBase.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PmicConfig
 PMIC static configuration data. More...
 
class  PmicBase
 PMIC Base Abstract Class. More...
 

Namespaces

namespace  PmicCapability
 PMIC Capability Flags.
 

Enumerations

enum class  PmicCapability::Capability : uint32_t {
  PmicCapability::PmicNone = 0 , PmicCapability::PmicSupportCharger = (1 << 0) , PmicCapability::PmicSupportPower = (1 << 1) , PmicCapability::PmicSupportAdc = (1 << 2) ,
  PmicCapability::PmicSupportGpio = (1 << 3) , PmicCapability::PmicSupportLed = (1 << 4) , PmicCapability::PmicSupportIrq = (1 << 5) , PmicCapability::PmicSupportBc12 = (1 << 6) ,
  PmicCapability::PmicSupportTypeC = (1 << 7) , PmicCapability::PmicSupportPowerBtn = (1 << 8) , PmicCapability::PmicSupportChannel = (1 << 9)
}
 

Functions

constexpr Capability PmicCapability::operator| (Capability a, Capability b)
 Bitwise OR operator for PmicCapability::Capability.
 
constexpr bool PmicCapability::operator& (Capability a, Capability b)
 Bitwise AND operator for PmicCapability::Capability.
 

Detailed Description

@license MIT License

Copyright (c) 2026 lewis he

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Author
Lewis He (lewis.nosp@m.he@o.nosp@m.utloo.nosp@m.k.co.nosp@m.m)
Date
2026-03-12

PMIC (Power Management IC) Base Interface

This is the base abstract class for all PMIC driver implementations. It provides a unified interface for accessing various PMIC sub-modules such as charger, power management, ADC, GPIO, LED, IRQ, BC12, Type-C, and power-on functionality.

Overview

PMICs (Power Management ICs) are integrated circuits that manage power requirements for host systems. They typically include:

  • Battery charging control
  • Power path management
  • Voltage regulation
  • System monitoring via ADC
  • Protection features

Definition in file PmicBase.hpp.