1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

Move M240 to cpp

This commit is contained in:
Scott Lahteine 2017-09-17 03:20:32 -05:00
parent d4aaa0f1c8
commit ebb9bd5419
3 changed files with 11 additions and 10 deletions

View File

@ -352,10 +352,6 @@ bool pin_is_protected(const int8_t pin) {
return false;
}
#if defined(CHDK) || HAS_PHOTOGRAPH
#include "gcode/feature/camera/M240.h"
#endif
#if HAS_LCD_CONTRAST
#include "gcode/lcd/M250.h"
#endif

View File

@ -20,11 +20,17 @@
*
*/
#include "../../../inc/MarlinConfig.h"
#if defined(CHDK) || HAS_PHOTOGRAPH
#include "../../gcode.h"
/**
* M240: Trigger a camera by emulating a Canon RC-1
* See http://www.doc-diy.net/photo/rc-1_hacked/
*/
void gcode_M240() {
void GcodeSuite::M240() {
#ifdef CHDK
OUT_WRITE(CHDK, HIGH);
@ -51,3 +57,5 @@ void gcode_M240() {
#endif
}
#endif // CHDK || HAS_PHOTOGRAPH

View File

@ -119,7 +119,6 @@ void GcodeSuite::dwell(millis_t time) {
extern void gcode_M163();
extern void gcode_M164();
extern void gcode_M165();
extern void gcode_M240();
extern void gcode_M250();
extern void gcode_M302();
extern void gcode_M350();
@ -576,10 +575,8 @@ void GcodeSuite::process_next_command() {
#endif
#if defined(CHDK) || HAS_PHOTOGRAPH
case 240: // M240: Trigger a camera by emulating a Canon RC-1 : http://www.doc-diy.net/photo/rc-1_hacked/
gcode_M240();
break;
#endif // CHDK || PHOTOGRAPH_PIN
case 240: M240(); break; // M240: Trigger a camera by emulating a Canon RC-1 : http://www.doc-diy.net/photo/rc-1_hacked/
#endif
#if HAS_LCD_CONTRAST
case 250: // M250: Set LCD contrast