51 Serial.println(
"\n=== AXP517 LED Example ===\n");
54 Serial.println(
"Failed to init AXP517!");
55 while (1) delay(1000);
62 Serial.println(
"\n--- LED Mode Demo ---");
66 Serial.println(
"Mode: AUTO (Charge Indicator)");
74 Serial.println(
"Manual: Hi-Z (Off)");
79 Serial.println(
"Manual: LEVEL_LOW (On)");
84 Serial.println(
"Mode: BREATH");
86 Serial.println(
"\n=== Setup Complete ===\n");
91 static uint8_t state = 0;
92 static uint32_t lastChange = 0;
94 if (millis() - lastChange > 3000) {
95 lastChange = millis();
102 Serial.println(
"LED: AUTO");
107 Serial.println(
"LED: Off");
112 Serial.println(
"LED: On");
117 Serial.println(
"LED: BLINK 1HZ");
122 Serial.println(
"LED: BLINK 4HZ");
bool setMode(Mode mode) override
Set the LED mode.
High-level driver facade for the X-Powers AXP517 PMIC.
bool enableModule(Module module, bool enable)
Enable or disable a functional module.
AXP517Led & led()
Access the AXP517 LED driver.
bool begin(SensorCommCustom::CustomCallback callback, SensorCommCustomHal::CustomHalCallback hal_cb, uint8_t addr)
Initialization using a custom communication interface.
@ BREATH
Breath/blink mode controlled by PMIC/hardware (if supported).
@ MANUAL
Manual control through registers.
@ AUTO
PMIC controls LED automatically (e.g.