From: Joseph Coffland Date: Sat, 30 Jan 2021 21:13:22 +0000 (-0800) Subject: Fixed demo estop X-Git-Url: https://git.buildbotics.com/?a=commitdiff_plain;h=08919181dcf5199d78d67b2b8d30f3fa12864f58;p=bbctrl-firmware Fixed demo estop --- diff --git a/src/avr/src/hardware.c b/src/avr/src/hardware.c index d635c37..3a3f08b 100644 --- a/src/avr/src/hardware.c +++ b/src/avr/src/hardware.c @@ -38,6 +38,10 @@ #include #include +#ifndef __AVR__ +#include +#endif + typedef struct { char id[26]; @@ -137,9 +141,15 @@ void hw_request_hard_reset() {hw.hard_reset = true;} static void _hard_reset() { usart_flush(); + +#ifdef __AVR__ cli(); CCP = CCP_IOREG_gc; RST.CTRL = RST_SWRST_bm; + +#else // __AVR__ + exit(0); +#endif }