mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
34 lines
722 B
C++
34 lines
722 B
C++
#ifndef BOOTLOADER_BOOT_H
|
|
#define BOOTLOADER_BOOT_H
|
|
|
|
#include <stdint.h>
|
|
#include <bootloader/slot.h>
|
|
|
|
namespace Bootloader {
|
|
|
|
enum BootMode: uint8_t {
|
|
SlotA = 0,
|
|
SlotB = 1,
|
|
// These modes exists so that you can launch the bootloader from a running slot
|
|
// They mean "Launch bootloader then go back to slot X"
|
|
SlotABootloader = 2,
|
|
SlotBBootloader = 3,
|
|
Unknown
|
|
};
|
|
|
|
class Boot {
|
|
public:
|
|
static BootMode mode();
|
|
static void setMode(BootMode mode);
|
|
__attribute__ ((noreturn)) static void boot();
|
|
static void bootloader();
|
|
static void aboutMenu();
|
|
static void installerMenu();
|
|
static void bootloaderUpdate();
|
|
static void bootSlot(Bootloader::Slot slot);
|
|
static void lockInternal();
|
|
};
|
|
|
|
}
|
|
|
|
#endif |