Commit | Line | Data |
---|---|---|
df27a6a3 | 1 | /* |
cc1d3b1f AW |
2 | this file is part of smoothie (http://smoothieware.org/). the motion control part is heavily based on grbl (https://github.com/simen/grbl). |
3 | smoothie is free software: you can redistribute it and/or modify it under the terms of the gnu general public license as published by the free software foundation, either version 3 of the license, or (at your option) any later version. | |
4 | smoothie is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. see the gnu general public license for more details. | |
df27a6a3 | 5 | you should have received a copy of the gnu general public license along with smoothie. if not, see <http://www.gnu.org/licenses/>. |
cc1d3b1f AW |
6 | */ |
7 | ||
8 | #ifndef SWITCH_H | |
9 | #define SWITCH_H | |
10 | ||
11 | #include "libs/Pin.h" | |
12 | #include <math.h> | |
13 | ||
d4f93cf4 AG |
14 | #define switch_checksum CHECKSUM("switch") |
15 | #define on_m_code_checksum CHECKSUM("on_m_code") | |
16 | #define off_m_code_checksum CHECKSUM("off_m_code") | |
17 | #define output_pin_checksum CHECKSUM("output_pin") | |
18 | #define startup_state_checksum CHECKSUM("startup_state") | |
cc1d3b1f AW |
19 | |
20 | class Switch : public Module { | |
21 | public: | |
22 | Switch(); | |
23 | Switch(uint16_t name); | |
11f8ba4e | 24 | |
cc1d3b1f AW |
25 | void on_module_loaded(); |
26 | void on_config_reload(void* argument); | |
3c4f2dd8 | 27 | void on_gcode_received(void* argument); |
cc1d3b1f AW |
28 | void on_gcode_execute(void* argument); |
29 | ||
30 | uint16_t name_checksum; | |
31 | uint16_t on_m_code; | |
32 | uint16_t off_m_code; | |
cb3460e9 | 33 | Pwm output_pin; |
cc1d3b1f AW |
34 | }; |
35 | ||
36 | #endif |