diff --git a/Makefile-ARM b/Makefile-ARM index 8148d7b..b4bda7c 100644 --- a/Makefile-ARM +++ b/Makefile-ARM @@ -100,11 +100,11 @@ TARGET = $(PROGRAM).hex SOURCES = mendel.c cpu.c serial.c sermsg.c sersendf.c delay.c SOURCES += gcode_parse.c gcode_process.c pinio.c timer.c clock.c SOURCES += dda_queue.c dda_maths.c dda_kinematics.c dda.c dda_lookahead.c -SOURCES += analog.c temp.c heater.c home.c debug.c crc.c -SOURCES += intercom.c graycode.c +SOURCES += analog.c temp.c heater.c home.c debug.c crc.c pff.c pff_diskio.c +SOURCES += spi.c intercom.c graycode.c # Sources left: -# spi.c usb_serial.c -# pff.c watchdog.c pff_diskio.c +# usb_serial.c +# watchdog.c ifeq ($(MCU), lpc1114) SOURCES += cmsis-system_lpc11xx.c diff --git a/gcode_process.c b/gcode_process.c index c533d03..b464ecc 100644 --- a/gcode_process.c +++ b/gcode_process.c @@ -374,7 +374,6 @@ void process_gcode_command() { tool = next_tool; break; - #ifndef __ARMEL_NOTYET__ #ifdef SD case 20: //? --- M20: list SD card. --- @@ -423,7 +422,6 @@ void process_gcode_command() { gcode_sources &= ! GCODE_SOURCE_SD; break; #endif /* SD */ - #endif /* __ARMEL_NOTYET__ */ case 82: //? --- M82 - Set E codes absolute --- diff --git a/mendel.c b/mendel.c index 9e8966f..e8d4feb 100644 --- a/mendel.c +++ b/mendel.c @@ -35,16 +35,13 @@ #include "gcode_parse.h" #include "timer.h" #include "temp.h" -#ifndef __ARMEL_NOTYET__ #include "watchdog.h" -#endif /* __ARMEL_NOTYET__ */ #include "debug.h" #include "heater.h" #include "analog.h" #include "pinio.h" #include "clock.h" #include "intercom.h" -#ifndef __ARMEL_NOTYET__ #include "spi.h" #include "sd.h" #include "simulator.h" @@ -59,6 +56,7 @@ #endif #endif +#ifndef __ARMEL_NOTYET__ #ifdef CANNED_CYCLE const char PROGMEM canned_gcode_P[] = CANNED_CYCLE; #endif @@ -74,10 +72,8 @@ void init(void) { cpu_init(); - #ifndef __ARMEL_NOTYET__ // set up watchdog wd_init(); - #endif /* __ARMEL_NOTYET__ */ // set up serial serial_init(); @@ -88,11 +84,9 @@ void init(void) { // set up inputs and outputs pinio_init(); - #ifndef __ARMEL_NOTYET__ - #if defined SPI + #ifdef SPI spi_init(); #endif - #endif /* __ARMEL_NOTYET__ */ // set up timers timer_init(); @@ -109,19 +103,15 @@ void init(void) { // set up temperature inputs temp_init(); - #ifndef __ARMEL_NOTYET__ #ifdef SD sd_init(); #endif - #endif /* __ARMEL_NOTYET__ */ // enable interrupts sei(); - #ifndef __ARMEL_NOTYET__ // reset watchdog wd_reset(); - #endif /* __ARMEL_NOTYET__ */ // prepare the power supply power_init(); @@ -180,7 +170,6 @@ int main (void) } } - #ifndef __ARMEL_NOTYET__ #ifdef SD if (( ! gcode_active || gcode_active & GCODE_SOURCE_SD) && gcode_sources & GCODE_SOURCE_SD) { @@ -193,6 +182,7 @@ int main (void) } #endif + #ifndef __ARMEL_NOTYET__ #ifdef CANNED_CYCLE /** WARNING! diff --git a/sd.h b/sd.h index fe4f048..92a0229 100644 --- a/sd.h +++ b/sd.h @@ -14,6 +14,13 @@ // Feature set of Petit FatFs is currently defined early in pff_conf.h. +/** + Test configuration. +*/ +#ifdef __ARMEL__ + #error SD card (SD_CARD_SELECT_PIN) not yet supported on ARM. +#endif + void sd_init(void); diff --git a/spi.c b/spi.c index 8ba46f5..e1f1fdd 100644 --- a/spi.c +++ b/spi.c @@ -15,7 +15,7 @@ #ifdef SPI -/** Initialise serial subsystem. +/** Initialise SPI subsystem. Code copied from ATmega164/324/644/1284 data sheet, section 18.2, page 160, or moved here from mendel.c. diff --git a/spi.h b/spi.h index 73c4a57..c5258f4 100644 --- a/spi.h +++ b/spi.h @@ -7,10 +7,16 @@ #ifdef SPI +/** + Test configuration. +*/ +#ifdef __ARMEL__ + #error SPI (SD_CARD_SELECT_PIN, TEMP_MAX6675) not yet supported on ARM. +#endif + // Uncomment this to double SPI frequency from (F_CPU / 4) to (F_CPU / 2). //#define SPI_2X - /** Initialise SPI subsystem. */ void spi_init(void); diff --git a/temp.c b/temp.c index 160ec20..912506d 100644 --- a/temp.c +++ b/temp.c @@ -20,11 +20,17 @@ #include "simulator.h" #ifdef TEMP_INTERCOM + #ifdef __ARMEL__ + #error TEMP_INTERCOM not yet supported on ARM. + #endif #include "intercom.h" #include "pinio.h" #endif #ifdef TEMP_MAX6675 + #ifdef __ARMEL__ + #error MAX6675 sensors (TEMP_MAX6675) not yet supported on ARM. + #endif #include "spi.h" #endif