Files
Upsilon/bootloader/boot.h
2022-03-10 19:34:47 +01:00

28 lines
527 B
C++

#ifndef BOOTLOADER_BOOT_H
#define BOOTLOADER_BOOT_H
#include <stdint.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);
[[ noreturn ]] static void boot();
[[ norteurn ]] static void bootloader();
};
}
#endif