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 BSP_POWER_GATES_H
9#define BSP_POWER_GATES_H
10
11#include <cstdint>
12
13namespace lampda {
14namespace bsp {
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 bsp
78} // namespace lampda
79
80#endif
void blip(const uint32_t timing)
blip output gate (very short power interruption)
Definition: power_gates.cpp:154
bool is_bliping()
Return true if the output gate is in a blip.
Definition: power_gates.cpp:188
void cancel_blip()
Cancel the current blip if any.
Definition: power_gates.cpp:175
void disable_gates()
disable immediatly all gates, stop the unlocking processes.
Definition: power_gates.cpp:216
void init()
Called once on system startup.
Definition: power_gates.cpp:112
void loop()
Called often to refresh the status.
Definition: power_gates.cpp:118
void enable_vbus_gate_DIRECT()
Fast swap only: directly close output gate and enable vbus gate.
Definition: power_gates.cpp:208
bool are_gate_disabled()
return true if the gates are disabled.
Definition: power_gates.cpp:222
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:192
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:200
bool is_vbus_gate_enabled()
return true when the gate if enabled (after the delay).
Definition: power_gates.cpp:214
bool is_power_gate_enabled()
return true when the gate if enabled (after the delay).
Definition: power_gates.cpp:45
Program scope.
Definition: control_fixed_modes.hpp:12