diff --git a/Makefile-ARM b/Makefile-ARM index dd735f0..2d0a6ac 100644 --- a/Makefile-ARM +++ b/Makefile-ARM @@ -98,7 +98,7 @@ TARGET = $(PROGRAM).hex # Until the generic ARM port is completed, we'd have to wrap all sources # in #ifdef __AVR__. To avoid this, build only a selection for now: SOURCES = mendel.c cpu.c serial.c sermsg.c sersendf.c delay.c -SOURCES += gcode_parse.c gcode_process.c pinio.c timer.c +SOURCES += gcode_parse.c gcode_process.c pinio.c timer.c clock.c ifeq ($(MCU), lpc1114) SOURCES += cmsis-system_lpc11xx.c endif diff --git a/clock.c b/clock.c index 02c8f8d..e003ec7 100644 --- a/clock.c +++ b/clock.c @@ -71,7 +71,11 @@ void clock_tick(void) { called from clock_10ms(), do not call directly */ static void clock_250ms(void) { + #ifndef __ARMEL_NOTYET__ if (heaters_all_zero()) { + #else + if (1) { + #endif /* __ARMEL_NOTYET__, ! __ARMEL_NOTYET__ */ if (psu_timeout > (30 * 4)) { power_off(); } @@ -114,7 +118,9 @@ static void clock_10ms(void) { // reset watchdog wd_reset(); + #ifndef __ARMEL_NOTYET__ temp_sensor_tick(); + #endif /* __ARMEL_NOTYET__ */ ifclock(clock_flag_250ms) { clock_250ms(); diff --git a/mendel.c b/mendel.c index 05e3a22..dc972e6 100644 --- a/mendel.c +++ b/mendel.c @@ -44,8 +44,8 @@ #include "analog.h" #endif /* __ARMEL_NOTYET__ */ #include "pinio.h" -#ifndef __ARMEL_NOTYET__ #include "clock.h" +#ifndef __ARMEL_NOTYET__ #include "intercom.h" #include "spi.h" #include "sd.h" @@ -222,8 +222,8 @@ int main (void) #endif /* CANNED_CYCLE */ } + #endif /* __ARMEL_NOTYET__ */ clock(); - #endif /* __ARMEL_NOTYET__ */ } } diff --git a/timer-arm.c b/timer-arm.c index 39158ca..3c88df0 100644 --- a/timer-arm.c +++ b/timer-arm.c @@ -8,6 +8,7 @@ #if defined TEACUP_C_INCLUDE && defined __ARMEL__ #include "cmsis-core_cm0.h" +#include "clock.h" /** Timer initialisation. @@ -53,8 +54,8 @@ void timer_init() { */ void SysTick_Handler(void) { - #ifndef __ARMEL_NOTYET__ clock_tick(); + #ifndef __ARMEL_NOTYET__ dda_clock(); #endif /* __ARMEL_NOTYET__ */ }