ARM: get temp.c in.
No code changes, but quite a few removals of __ARMEL_NOTYET__
guards. 20 such guards left.
Test: M105 should work and report plausible temperatures.
Current code size:
SIZES ARM... lpc1114
FLASH : 9460 bytes 29%
RAM : 1258 bytes 31%
EEPROM : 0 bytes 0%
This commit is contained in:
parent
6b6aa84124
commit
8f24fbaad4
|
|
@ -100,10 +100,10 @@ TARGET = $(PROGRAM).hex
|
||||||
SOURCES = mendel.c cpu.c serial.c sermsg.c sersendf.c delay.c
|
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 += 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 += dda_queue.c dda_maths.c dda_kinematics.c dda.c dda_lookahead.c
|
||||||
SOURCES += analog.c
|
SOURCES += analog.c temp.c
|
||||||
# Sources left:
|
# Sources left:
|
||||||
# home.c crc.c intercom.c debug.c spi.c usb_serial.c
|
# home.c crc.c intercom.c debug.c spi.c usb_serial.c
|
||||||
# graycode.c pff.c temp.c watchdog.c heater.c pff_diskio.c
|
# graycode.c pff.c watchdog.c heater.c pff_diskio.c
|
||||||
|
|
||||||
ifeq ($(MCU), lpc1114)
|
ifeq ($(MCU), lpc1114)
|
||||||
SOURCES += cmsis-system_lpc11xx.c
|
SOURCES += cmsis-system_lpc11xx.c
|
||||||
|
|
|
||||||
2
clock.c
2
clock.c
|
|
@ -118,9 +118,7 @@ static void clock_10ms(void) {
|
||||||
// reset watchdog
|
// reset watchdog
|
||||||
wd_reset();
|
wd_reset();
|
||||||
|
|
||||||
#ifndef __ARMEL_NOTYET__
|
|
||||||
temp_sensor_tick();
|
temp_sensor_tick();
|
||||||
#endif /* __ARMEL_NOTYET__ */
|
|
||||||
|
|
||||||
ifclock(clock_flag_250ms) {
|
ifclock(clock_flag_250ms) {
|
||||||
clock_250ms();
|
clock_250ms();
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,6 @@ void queue_step() {
|
||||||
if (current_movebuffer->live) {
|
if (current_movebuffer->live) {
|
||||||
if (current_movebuffer->waitfor_temp) {
|
if (current_movebuffer->waitfor_temp) {
|
||||||
timer_set(HEATER_WAIT_TIMEOUT, 0);
|
timer_set(HEATER_WAIT_TIMEOUT, 0);
|
||||||
#ifndef __ARMEL_NOTYET__
|
|
||||||
if (temp_achieved()) {
|
if (temp_achieved()) {
|
||||||
current_movebuffer->live = current_movebuffer->done = 0;
|
current_movebuffer->live = current_movebuffer->done = 0;
|
||||||
serial_writestr_P(PSTR("Temp achieved\n"));
|
serial_writestr_P(PSTR("Temp achieved\n"));
|
||||||
|
|
@ -89,7 +88,6 @@ void queue_step() {
|
||||||
else {
|
else {
|
||||||
temp_print(TEMP_SENSOR_none);
|
temp_print(TEMP_SENSOR_none);
|
||||||
}
|
}
|
||||||
#endif /* __ARMEL_NOTYET__ */
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dda_step(current_movebuffer);
|
dda_step(current_movebuffer);
|
||||||
|
|
|
||||||
|
|
@ -346,9 +346,7 @@ void process_gcode_command() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (next_target.seen_M) {
|
else if (next_target.seen_M) {
|
||||||
#ifndef __ARMEL_NOTYET__
|
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
#endif /* __ARMEL_NOTYET__ */
|
|
||||||
|
|
||||||
switch (next_target.M) {
|
switch (next_target.M) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
@ -369,10 +367,8 @@ void process_gcode_command() {
|
||||||
//? http://linuxcnc.org/handbook/RS274NGC_3/RS274NGC_33a.html#1002379
|
//? http://linuxcnc.org/handbook/RS274NGC_3/RS274NGC_33a.html#1002379
|
||||||
//?
|
//?
|
||||||
queue_wait();
|
queue_wait();
|
||||||
#ifndef __ARMEL_NOTYET__
|
|
||||||
for (i = 0; i < NUM_HEATERS; i++)
|
for (i = 0; i < NUM_HEATERS; i++)
|
||||||
temp_set(i, 0);
|
temp_set(i, 0);
|
||||||
#endif /* __ARMEL_NOTYET__ */
|
|
||||||
power_off();
|
power_off();
|
||||||
serial_writestr_P(PSTR("\nstop\n"));
|
serial_writestr_P(PSTR("\nstop\n"));
|
||||||
break;
|
break;
|
||||||
|
|
@ -466,10 +462,10 @@ void process_gcode_command() {
|
||||||
//? --- M101: extruder on ---
|
//? --- M101: extruder on ---
|
||||||
//?
|
//?
|
||||||
//? Undocumented.
|
//? Undocumented.
|
||||||
#ifndef __ARMEL_NOTYET__
|
|
||||||
if (temp_achieved() == 0) {
|
if (temp_achieved() == 0) {
|
||||||
enqueue(NULL);
|
enqueue(NULL);
|
||||||
}
|
}
|
||||||
|
#ifndef __ARMEL_NOTYET__
|
||||||
#ifdef DC_EXTRUDER
|
#ifdef DC_EXTRUDER
|
||||||
heater_set(DC_EXTRUDER, DC_EXTRUDER_PWM);
|
heater_set(DC_EXTRUDER, DC_EXTRUDER_PWM);
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -505,7 +501,6 @@ void process_gcode_command() {
|
||||||
//?
|
//?
|
||||||
if ( ! next_target.seen_S)
|
if ( ! next_target.seen_S)
|
||||||
break;
|
break;
|
||||||
#ifndef __ARMEL_NOTYET__
|
|
||||||
if ( ! next_target.seen_P)
|
if ( ! next_target.seen_P)
|
||||||
#ifdef HEATER_EXTRUDER
|
#ifdef HEATER_EXTRUDER
|
||||||
next_target.P = HEATER_EXTRUDER;
|
next_target.P = HEATER_EXTRUDER;
|
||||||
|
|
@ -513,7 +508,6 @@ void process_gcode_command() {
|
||||||
next_target.P = 0;
|
next_target.P = 0;
|
||||||
#endif
|
#endif
|
||||||
temp_set(next_target.P, next_target.S);
|
temp_set(next_target.P, next_target.S);
|
||||||
#endif /* __ARMEL_NOTYET__ */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 105:
|
case 105:
|
||||||
|
|
@ -533,11 +527,9 @@ void process_gcode_command() {
|
||||||
#ifdef ENFORCE_ORDER
|
#ifdef ENFORCE_ORDER
|
||||||
queue_wait();
|
queue_wait();
|
||||||
#endif
|
#endif
|
||||||
#ifndef __ARMEL_NOTYET__
|
|
||||||
if ( ! next_target.seen_P)
|
if ( ! next_target.seen_P)
|
||||||
next_target.P = TEMP_SENSOR_none;
|
next_target.P = TEMP_SENSOR_none;
|
||||||
temp_print(next_target.P);
|
temp_print(next_target.P);
|
||||||
#endif /* __ARMEL_NOTYET__ */
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
case 7:
|
||||||
|
|
@ -820,9 +812,7 @@ void process_gcode_command() {
|
||||||
#ifdef HEATER_BED
|
#ifdef HEATER_BED
|
||||||
if ( ! next_target.seen_S)
|
if ( ! next_target.seen_S)
|
||||||
break;
|
break;
|
||||||
#ifndef __ARMEL_NOTYET__
|
|
||||||
temp_set(HEATER_BED, next_target.S);
|
temp_set(HEATER_BED, next_target.S);
|
||||||
#endif /* __ARMEL_NOTYET__ */
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
4
mendel.c
4
mendel.c
|
|
@ -34,8 +34,8 @@
|
||||||
#include "dda_queue.h"
|
#include "dda_queue.h"
|
||||||
#include "gcode_parse.h"
|
#include "gcode_parse.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
#ifndef __ARMEL_NOTYET__
|
|
||||||
#include "temp.h"
|
#include "temp.h"
|
||||||
|
#ifndef __ARMEL_NOTYET__
|
||||||
#include "watchdog.h"
|
#include "watchdog.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "heater.h"
|
#include "heater.h"
|
||||||
|
|
@ -109,10 +109,10 @@ void init(void) {
|
||||||
// if any of the temp sensors in your config.h use analog interface
|
// if any of the temp sensors in your config.h use analog interface
|
||||||
analog_init();
|
analog_init();
|
||||||
|
|
||||||
#ifndef __ARMEL_NOTYET__
|
|
||||||
// set up temperature inputs
|
// set up temperature inputs
|
||||||
temp_init();
|
temp_init();
|
||||||
|
|
||||||
|
#ifndef __ARMEL_NOTYET__
|
||||||
#ifdef SD
|
#ifdef SD
|
||||||
sd_init();
|
sd_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
2
temp.c
2
temp.c
|
|
@ -297,7 +297,9 @@ void temp_sensor_tick() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (temp_sensors[i].heater < NUM_HEATERS) {
|
if (temp_sensors[i].heater < NUM_HEATERS) {
|
||||||
|
#ifndef __ARMEL_NOTYET__
|
||||||
heater_tick(temp_sensors[i].heater, temp_sensors[i].temp_type, temp_sensors_runtime[i].last_read_temp, temp_sensors_runtime[i].target_temp);
|
heater_tick(temp_sensors[i].heater, temp_sensors[i].temp_type, temp_sensors_runtime[i].last_read_temp, temp_sensors_runtime[i].target_temp);
|
||||||
|
#endif /* __ARMEL_NOTYET__ */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DEBUG_PID && (debug_flags & DEBUG_PID))
|
if (DEBUG_PID && (debug_flags & DEBUG_PID))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue