From 08919181dcf5199d78d67b2b8d30f3fa12864f58 Mon Sep 17 00:00:00 2001 From: Joseph Coffland Date: Sat, 30 Jan 2021 13:13:22 -0800 Subject: [PATCH] Fixed demo estop --- src/avr/src/hardware.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 } -- 2.27.0