Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
power_gates.h
Go to the documentation of this file.
1
8#ifndef POWER_GATES_H
9#define POWER_GATES_H
10
11#include <cstdint>
12
13namespace lampda {
14namespace power {
16namespace powergates {
17
19void init();
21void loop();
22
24namespace power {
25
30void blip(const uint32_t timing);
31
33void cancel_blip();
34
36bool is_bliping();
37
38} // namespace power
39
45
50
55void enable_vbus_gate();
60
65
69void disable_gates();
70
75
76} // namespace powergates
77} // namespace power
78} // namespace lampda
79
80#endif
void blip(const uint32_t timing)
blip output gate (very short power interruption)
Definition: power_gates.cpp:153
bool is_bliping()
Return true if the output gate is in a blip.
Definition: power_gates.cpp:187
void cancel_blip()
Cancel the current blip if any.
Definition: power_gates.cpp:174
bool is_vbus_gate_enabled()
return true when the gate if enabled (after the delay).
Definition: power_gates.cpp:213
bool is_power_gate_enabled()
return true when the gate if enabled (after the delay).
Definition: power_gates.cpp:44
bool are_gate_disabled()
return true if the gates are disabled.
Definition: power_gates.cpp:221
void loop()
Called often to refresh the status.
Definition: power_gates.cpp:117
void enable_power_gate()
enable the power gate. This will first disable the vbus gate, then after a delay enable the power gat...
Definition: power_gates.cpp:191
void enable_vbus_gate()
enable the vbus gate. This will first disable the power gate, then after a delay enable the vbus gate...
Definition: power_gates.cpp:199
void init()
Called once on system startup.
Definition: power_gates.cpp:111
void enable_vbus_gate_DIRECT()
Fast swap only: directly close output gate and enable vbus gate.
Definition: power_gates.cpp:207
void disable_gates()
disable immediatly all gates, stop the unlocking processes.
Definition: power_gates.cpp:215
Program scope.
Definition: control_fixed_modes.hpp:12