sw: system: add reset key to reboot()

Add the key `0xac` to the reset command, to prevent accidental resets.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2019-04-02 16:40:09 +08:00
parent 33aec0876b
commit a3c05bd19e
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ __attribute__((noreturn)) static inline void reboot(void) {
}
__attribute__((noreturn)) static inline void reboot_to_image(uint8_t image_index) {
reboot_ctrl_write(0xac | image_index);
reboot_ctrl_write(0xac | (image_index & 3) << 0);
while (1);
}
#endif /* __SYSTEM_H */