aboutsummaryrefslogtreecommitdiff
path: root/include/apos/power.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/apos/power.h')
-rw-r--r--include/apos/power.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/apos/power.h b/include/apos/power.h
index 640f056..ed7e29c 100644
--- a/include/apos/power.h
+++ b/include/apos/power.h
@@ -10,7 +10,26 @@
#include <apos/types.h>
#include <apos/attrs.h>
-enum poweroff_type { SHUTDOWN, COLD_REBOOT, WARM_REBOOT };
+/** Types of powering off. Still unclear what difference there is between warm
+ * and cold reboot. */
+enum poweroff_type {
+ /** Shut down. */
+ SHUTDOWN,
+
+ /** Cold or complete reboot. */
+ COLD_REBOOT,
+
+ /** Warm or partial reboot. */
+ WARM_REBOOT
+};
+
+/**
+ * Power off the system.
+ *
+ * @param type Type of powering off. \see poweroff_type.
+ * @return Nothing on success (system shuts down), \ref ERR_INVAL on invalid
+ * poweroff type or ERR_MISC if studown was not succesful.
+ */
stat_t poweroff(enum poweroff_type type);
#endif