ARM: get spi.c, pff.c and pff_diskio.c (SD card handling) in.
Neither is ported for now, but also not essential for printing, so it's just made sure it's always disabled on ARM.
This commit is contained in:
parent
d2fcc57ed4
commit
fb317fef08
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 ---
|
||||
|
|
|
|||
16
mendel.c
16
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!
|
||||
|
|
|
|||
7
sd.h
7
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);
|
||||
|
||||
|
|
|
|||
2
spi.c
2
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.
|
||||
|
|
|
|||
8
spi.h
8
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);
|
||||
|
|
|
|||
6
temp.c
6
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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue