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:
parent
33aec0876b
commit
a3c05bd19e
@ -64,7 +64,7 @@ __attribute__((noreturn)) static inline void reboot(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
__attribute__((noreturn)) static inline void reboot_to_image(uint8_t image_index) {
|
__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);
|
while (1);
|
||||||
}
|
}
|
||||||
#endif /* __SYSTEM_H */
|
#endif /* __SYSTEM_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user