fork/GramFirmware

git clone https://git.julia.blue/fork/GramFirmware

CarVacrebase to configurator818d962

gram
353 B21 linesraw
1#include "reboot.hpp"
2
3#include "stdlib.hpp"
4
5#include <avr/wdt.h>
6
7void reboot_firmware() {
8    wdt_enable(WDTO_15MS);
9    while (true) {
10        delay(1);
11    }
12}
13
14void reboot_bootloader() {
15    uint16_t *magic_key_pos = (uint16_t *)MAGIC_KEY_POS;
16    *magic_key_pos = MAGIC_KEY;
17    wdt_enable(WDTO_15MS);
18    while (true) {
19        delay(1);
20    }
21}