|
Lamp-Da 0.1
A compact lantern project
|
Internal implementations. More...
Functions | |
| void | state_machine_behavior () |
| Handle the state changes. | |
| bool | switch_state (const PowerStates newState) |
Switch to newState through the rails clearing. Return false if the machine is in error. The error check and the switch are atomic: an error raised by the power thread is never overwritten. | |
| bool | can_switch_states () |
Variables | |
| common::StateMachine< PowerStates > | powerMachine (PowerStates::STARTUP, startupFailTimeout_ms, PowerStates::ERROR) |
| const hal::gpio::DigitalPin | dischargeVbus (hal::gpio::DigitalPin::GPIO::Output_DischargeVbus) |
| const hal::gpio::DigitalPin | vbusDirection (hal::gpio::DigitalPin::GPIO::Output_VbusDirection) |
| const hal::gpio::DigitalPin | fastRoleSwap (hal::gpio::DigitalPin::GPIO::Output_VbusFastRoleSwap) |
| const hal::gpio::DigitalPin | usbFault (hal::gpio::DigitalPin::GPIO::Signal_UsbProtectionFault) |
| const hal::gpio::DigitalPin | vbusFault (hal::gpio::DigitalPin::GPIO::Signal_VbusGateFault) |
Internal implementations.