|
Lamp-Da 0.1
A compact lantern project
|
Handle the whole alerts logic. Use this to raise and clear alerts, and make decisions based on those alerts. Alerts can be raised and cleared on their own. More...
#include <alerts.h>
Public Member Functions | |
| void | raise (const Type type) |
| Raise an alert. | |
| void | clear (const Type type) |
| Clear an alert. | |
| bool | is_raised (const Type type) const |
| Return true if the target alert is raised. | |
| bool | is_clear () const |
| Return true if no alerts are raised. | |
| uint32_t | get_time_since_raised (const Type type) const |
| the time in milliseconds since this alert was raised, or zero if it's not. This raise time is updated by a raise() function call. | |
| bool | can_use_output_power () const |
| Return true if a raised alert prevents power set to output. | |
| bool | can_charge_battery () const |
| Return true if a raised alert prevents battery charging. | |
| bool | can_use_usb_port () const |
| Return true if no raised alerts block the use of power through USB port. | |
Handle the whole alerts logic. Use this to raise and clear alerts, and make decisions based on those alerts. Alerts can be raised and cleared on their own.