From 1ceed7525272b82c1028ebd353e65c3a63bd2714 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 17 Apr 2022 13:40:56 +0300 Subject: expand sbi implementation a bit --- include/apos/power.h | 10 ++++++++++ include/apos/types.h | 1 + 2 files changed, 11 insertions(+) create mode 100644 include/apos/power.h (limited to 'include') diff --git a/include/apos/power.h b/include/apos/power.h new file mode 100644 index 0000000..e0ca518 --- /dev/null +++ b/include/apos/power.h @@ -0,0 +1,10 @@ +#ifndef APOS_POWER_H +#define APOS_POWER_H + +#include +#include + +enum poweroff_type {SHUTDOWN, COLD_REBOOT, WARM_REBOOT}; +stat_t poweroff(enum poweroff_type type); + +#endif diff --git a/include/apos/types.h b/include/apos/types.h index 2f06ec4..01c5317 100644 --- a/include/apos/types.h +++ b/include/apos/types.h @@ -184,6 +184,7 @@ typedef uint_fast16_t vmflags_t; /* negative error codes are reserved for general usage, positive error codes are * allowed to be function-specific. */ enum { + ERR_MISC = -8, /* something */ ERR_NOINIT = -7, /* not initialized */ ERR_INVAL = -6, /* invalid value */ ERR_EXT = -5, /* already exists */ -- cgit v1.3