|
M5Unit-FLASHLIGHT 0.0.1 git rev:9a14869
|
AW3641E Unit for M5UnitUnified. More...
#include <M5UnitComponent.hpp>Go to the source code of this file.
Classes | |
| class | m5::unit::UnitAW3641E |
| 1A flash LED driver controlled via EN-pin pulse protocol More... | |
| struct | m5::unit::UnitAW3641E::config_t |
| Settings for begin. More... | |
Namespaces | |
| namespace | m5 |
| Top level namespace of M5Stack. | |
| namespace | aw3641e |
| For AW3641E. | |
Enumerations | |
| enum class | m5::unit::aw3641e::SwitchPosition : uint8_t { Flash , Torch } |
Position of the on-board mode selection switch (silkscreen S1, SPDT type) More... | |
| enum class | m5::unit::aw3641e::Brightness : uint8_t { Pct100 , Pct90 , Pct80 , Pct70 , Pct60 , Pct50 , Pct40 , Pct30 } |
| Flash brightness level (percentage of I_FLASH; Flash mode only) More... | |
Functions | |
| constexpr uint8_t | m5::unit::aw3641e::to_pulse_count (const Brightness b) |
| Translate a Brightness level to the AW3641E rising-edge pulse count. | |
Variables | |
| constexpr uint32_t | m5::unit::aw3641e::PULSE_HIGH_US {4} |
| Minimum logic-high pulse width in microseconds (T_HI; datasheet 0.75-10 µs) | |
| constexpr uint32_t | m5::unit::aw3641e::PULSE_LOW_US {4} |
| Minimum logic-low pulse width in microseconds (T_LO; datasheet 0.75-10 µs) | |
| constexpr uint32_t | m5::unit::aw3641e::PULSE_OFF_US {600} |
| Minimum EN-low delay required before a pulse sequence (T_OFF; datasheet > 500 µs) | |
| constexpr uint16_t | m5::unit::aw3641e::FLASH_MAX_DURATION_MS {220} |
| Maximum duration for a single flash() call in milliseconds. | |
| constexpr uint16_t | m5::unit::aw3641e::TORCH_MAX_DURATION_MS {1300} |
| Maximum duration for a single torch() call in milliseconds. | |
AW3641E Unit for M5UnitUnified.
Driver for UnitFlashLight (SKU:U152). AW3641E is an Awinic 1A flash LED driver controlled via a 1-wire EN pulse protocol.
|
strong |
Flash brightness level (percentage of I_FLASH; Flash mode only)
| Enumerator | |
|---|---|
| Pct100 | 100% of I_FLASH |
| Pct90 | 90% |
| Pct80 | 80% |
| Pct70 | 70% |
| Pct60 | 60% |
| Pct50 | 50% |
| Pct40 | 40% |
| Pct30 | 30% of I_FLASH |
|
strong |
Position of the on-board mode selection switch (silkscreen S1, SPDT type)
FLASH pin and either +5V (Flash side) or GND (Torch side). It is NOT connected to the host MCU and cannot be read from software, so this enum is a DECLARATION of the physical switch position — the library trusts what the user configured. A mismatch between the declared value and the physical switch results in undefined optical behavior. | Enumerator | |
|---|---|
| Flash | S1 = Flash side. FLASH pin = +5V. Use flash() to fire pulse-controlled flashes. |
| Torch | S1 = Torch side. FLASH pin = GND. Use torch() to drive continuous illumination. |
|
constexpr |
Translate a Brightness level to the AW3641E rising-edge pulse count.
| b | Brightness level |
|
constexpr |
Maximum duration for a single flash() call in milliseconds.
|
constexpr |
Maximum duration for a single torch() call in milliseconds.