grblHAL core  20240318
spindle_control.h
Go to the documentation of this file.
1 /*
2  spindle_control.h - spindle control methods
3 
4  Part of grblHAL
5 
6  Copyright (c) 2017-2024 Terje Io
7  Copyright (c) 2012-2015 Sungeun K. Jeon
8  Copyright (c) 2009-2011 Simen Svale Skogsrud
9 
10  grblHAL is free software: you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  grblHAL is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with grblHAL. If not, see <http://www.gnu.org/licenses/>.
22 */
23 
24 #ifndef _SPINDLE_CONTROL_H_
25 #define _SPINDLE_CONTROL_H_
26 
27 #include "pid.h"
28 
29 #define SPINDLE_ALL -1
30 #define SPINDLE_NONE 0
31 #define SPINDLE_HUANYANG1 1
32 #define SPINDLE_HUANYANG2 2
33 #define SPINDLE_GS20 3
34 #define SPINDLE_YL620A 4
35 #define SPINDLE_MODVFD 5
36 #define SPINDLE_H100 6
37 #define SPINDLE_ONOFF0 7 // typically implemented by driver.c
38 #define SPINDLE_ONOFF0_DIR 8 // typically implemented by driver.c
39 #define SPINDLE_ONOFF1 9
40 #define SPINDLE_ONOFF1_DIR 10
41 #define SPINDLE_PWM0 11 // typically implemented by driver.c
42 #define SPINDLE_PWM0_NODIR 12 // typically implemented by driver.c
43 #define SPINDLE_PWM1 13 // typically implemented by driver.c
44 #define SPINDLE_PWM1_NODIR 14
45 #define SPINDLE_PWM2 15
46 #define SPINDLE_PWM2_NODIR 16
47 #define SPINDLE_PWM0_CLONE 17
48 #define SPINDLE_SOLENOID 18
49 #define SPINDLE_STEPPER 19
50 #define SPINDLE_NOWFOREVER 20
51 #define SPINDLE_MY_SPINDLE 30
52 
53 typedef int8_t spindle_id_t;
54 typedef int8_t spindle_num_t;
55 
56 // if changed to > 8 bits planner_cond_t needs to be changed too
57 typedef union {
58  uint8_t value;
59  uint8_t mask;
60  struct {
61  uint8_t on :1,
62  ccw :1,
63  pwm :1,
67  at_speed :1,
69  };
71 
73 typedef union {
74  uint16_t value;
75  struct {
76  uint16_t variable :1,
77  direction :1,
78  at_speed :1,
79  laser :1,
81  pid :1,
86  cloned :1,
88  };
90 
92 typedef struct {
93  float rpm;
98  uint32_t index_count;
99  uint32_t pulse_count;
100  uint32_t error_count;
103 
104 typedef enum {
110 
111 typedef enum {
119 
120 typedef enum {
124 } spindle_hal_t;
125 
126 struct spindle_ptrs; // members defined below
127 struct spindle_pwm; // members defined below
128 struct spindle_param; // members defined below
129 
134 typedef bool (*spindle_config_ptr)(struct spindle_ptrs *spindle);
135 
140 typedef void (*spindle_set_state_ptr)(struct spindle_ptrs *spindle, spindle_state_t state, float rpm);
141 
142 #ifdef GRBL_ESP32
143 typedef void (*esp32_spindle_off_ptr)(struct spindle_ptrs *spindle);
144 #endif
145 
150 
158 typedef uint_fast16_t (*spindle_get_pwm_ptr)(struct spindle_ptrs *spindle, float rpm);
159 
166 typedef void (*spindle_update_pwm_ptr)(struct spindle_ptrs *spindle, uint_fast16_t pwm);
167 
171 typedef void (*spindle_update_rpm_ptr)(struct spindle_ptrs *spindle, float rpm);
172 
179 typedef spindle_data_t *(*spindle_get_data_ptr)(spindle_data_request_t request);
180 
182 typedef void (*spindle_reset_data_ptr)(void);
183 
188 typedef void (*spindle_pulse_on_ptr)(uint_fast16_t pulse_length);
189 
190 typedef struct {
191  float rpm;
192  float start;
193  float end;
194 } pwm_piece_t;
195 
196 typedef union {
197  uint8_t value;
198  uint8_t mask;
199  struct {
200  uint8_t enable_rpm_controlled :1, // PWM spindle only
201  laser_mode_disable :1, // PWM spindle only
202  type :5,
203  pwm_disable :1; // PWM spindle only
204  };
206 
207 typedef struct {
208  float rpm_max;
209  float rpm_min;
210  float pwm_freq;
211  float pwm_period; // currently unused
218  uint16_t ppr; // Spindle encoder pulses per revolution
222 
223 typedef struct {
224  uint8_t port_on;
225  uint8_t port_dir;
226  uint8_t port_pwm;
229 
230 typedef union {
231  uint8_t value;
232  struct {
233  uint8_t invert_pwm :1,
235  cloned :1,
237  unused :4;
238  };
240 
242 typedef struct spindle_pwm {
243  uint32_t f_clock;
245  uint_fast16_t period;
246  uint_fast16_t off_value;
247  uint_fast16_t min_value;
248  uint_fast16_t max_value;
249  float rpm_min;
251  bool invert_pwm;
252  bool always_on;
253  bool cloned;
255  int_fast16_t offset;
256  uint_fast16_t n_pieces;
258  uint_fast16_t (*compute_value)(struct spindle_pwm *pwm_data, float rpm, bool pid_limit);
260 
261 typedef union
262 {
264 } spindle_context_ptr_t __attribute__ ((__transparent_union__));
265 
267 struct spindle_ptrs {
273  void *hw_context;
274  uint_fast16_t pwm_off_value;
275  float rpm_min;
276  float rpm_max;
283 #ifdef GRBL_ESP32
284  esp32_spindle_off_ptr esp32_off;
285 #endif
286  // Optional entry points.
290 };
291 
292 typedef struct spindle_ptrs spindle_ptrs_t;
293 
295 typedef struct {
297  float target_rpm;
298  float delta_rpm;
299  float max_rpm;
300  float tool_offset;
301  uint_fast8_t axis;
303 
305 typedef struct spindle_param {
306  float rpm;
313 
314 typedef struct {
318 
320 typedef struct {
323  const char *name;
324  bool enabled;
328 
332 typedef void (*spindle_enumerate_callback_ptr)(spindle_info_t *spindle, void *data);
333 
334 void spindle_set_override (spindle_ptrs_t *spindle, override_t speed_override);
335 
336 // Called by g-code parser when setting spindle state and requires a buffer sync.
337 bool spindle_sync (spindle_ptrs_t *spindle, spindle_state_t state, float rpm);
338 
339 // Sets spindle running state with direction, enable, and spindle RPM.
340 bool spindle_set_state (spindle_ptrs_t *spindle, spindle_state_t state, float rpm);
341 
342 // Spindle speed calculation and limit handling
343 float spindle_set_rpm (spindle_ptrs_t *spindle, float rpm, override_t speed_override);
344 
345 // Restore spindle running state with direction, enable, spindle RPM and appropriate delay.
346 bool spindle_restore (spindle_ptrs_t *spindle, spindle_state_t state, float rpm);
347 
348 void spindle_all_off (void);
349 
350 //
351 // The following functions are not called by the core, may be called by driver code.
352 //
353 
354 bool spindle_precompute_pwm_values (spindle_ptrs_t *spindle, spindle_pwm_t *pwm_data, spindle_settings_t *settings, uint32_t clock_hz);
355 
356 spindle_id_t spindle_register (const spindle_ptrs_t *spindle, const char *name);
357 
359 
360 uint8_t spindle_get_count (void);
361 
362 bool spindle_select (spindle_id_t spindle_id);
363 
364 spindle_cap_t spindle_get_caps (bool active);
365 
366 void spindle_update_caps (spindle_ptrs_t *spindle, spindle_pwm_t *pwm_caps);
367 
368 
370 
371 const char *spindle_get_name (spindle_id_t spindle_id);
372 
374 
376 
378 
379 //
380 
381 bool spindle_is_enabled (spindle_num_t spindle_num);
382 
383 bool spindle_is_on (void);
384 
386 
387 #if N_SPINDLE > 1
388 
389 typedef void (*spindle1_settings_changed_ptr)(spindle1_settings_t *settings);
390 
391 spindle1_settings_t *spindle1_settings_add (bool claim_ports);
392 void spindle1_settings_register (spindle_cap_t cap, spindle1_settings_changed_ptr on_changed);
393 
394 #endif
395 
396 #endif // _SPINDLE_CONTROL_H_
#define SPINDLE_NPWM_PIECES
Number of pieces used for spindle RPM linearization, enabled by setting ENABLE_SPINDLE_LINEARIZATION ...
Definition: config.h:109
__attribute__
Definition: errors.h:30
uint_fast16_t override_t
Definition: grbl.h:236
grbl_hal_t hal
Global HAL struct.
Definition: grbllib.c:88
settings_t settings
Definition: settings.c:43
void spindle1_settings_register(spindle_cap_t cap, spindle1_settings_changed_ptr on_changed)
Definition: spindle_control.c:1094
spindle1_settings_t * spindle1_settings_add(bool claim_ports)
Definition: spindle_control.c:1080
void spindle_update_caps(spindle_ptrs_t *spindle, spindle_pwm_t *pwm_caps)
Update the capabilities of a registered PWM spindle. May be used by the driver on spindle initializat...
Definition: spindle_control.c:275
bool spindle_precompute_pwm_values(spindle_ptrs_t *spindle, spindle_pwm_t *pwm_data, spindle_settings_t *settings, uint32_t clock_hz)
Precompute PWM values for faster conversion.
Definition: spindle_control.c:747
spindle_hal_t
Definition: spindle_control.h:120
@ SpindleHAL_Raw
0 - NOTE: read-only
Definition: spindle_control.h:121
@ SpindleHAL_Active
2
Definition: spindle_control.h:123
@ SpindleHAL_Configured
1
Definition: spindle_control.h:122
bool spindle_is_enabled(spindle_num_t spindle_num)
Check if a spindle is enabled and available or not.
Definition: spindle_control.c:360
spindle_type_t
Definition: spindle_control.h:111
@ SpindleType_VFD
2
Definition: spindle_control.h:114
@ SpindleType_PWM
0
Definition: spindle_control.h:112
@ SpindleType_Basic
1 - on/off + optional direction
Definition: spindle_control.h:113
@ SpindleType_Null
5
Definition: spindle_control.h:117
@ SpindleType_Stepper
4
Definition: spindle_control.h:116
@ SpindleType_Solenoid
3
Definition: spindle_control.h:115
void(* spindle_enumerate_callback_ptr)(spindle_info_t *spindle, void *data)
Pointer to callback function called by spindle_enumerate_spindles().
Definition: spindle_control.h:332
const char * spindle_get_name(spindle_id_t spindle_id)
Get the registered name of a spindle.
Definition: spindle_control.c:265
bool spindle_enumerate_spindles(spindle_enumerate_callback_ptr callback, void *data)
Enumerate registered spindles by calling a callback function for each of them.
Definition: spindle_control.c:330
bool spindle_select(spindle_id_t spindle_id)
Enables a spindle and sets it as default spindle (spindle number 0).
Definition: spindle_control.c:195
bool(* spindle_config_ptr)(struct spindle_ptrs *spindle)
Pointer to function for configuring a spindle.
Definition: spindle_control.h:134
spindle_state_t(* spindle_get_state_ptr)(struct spindle_ptrs *spindle)
Pointer to function for getting the spindle state.
Definition: spindle_control.h:149
uint_fast16_t(* spindle_get_pwm_ptr)(struct spindle_ptrs *spindle, float rpm)
Pointer to function for converting a RPM value to a PWM value.
Definition: spindle_control.h:158
spindle_num_t spindle_enable(spindle_id_t spindle_id)
Enable a spindle and make it available for use by gcode.
Definition: spindle_control.c:178
spindle_id_t spindle_get_default(void)
Get the spindle id of the default spindle (spindle number 0).
Definition: spindle_control.c:239
uint8_t spindle_get_count(void)
Get number of registered spindles.
Definition: spindle_control.c:299
int8_t spindle_id_t
Definition: spindle_control.h:53
void(* spindle_update_pwm_ptr)(struct spindle_ptrs *spindle, uint_fast16_t pwm)
Pointer to function for updating spindle speed on the fly.
Definition: spindle_control.h:166
void(* spindle_reset_data_ptr)(void)
Pointer to function for resetting spindle data.
Definition: spindle_control.h:182
bool spindle_is_on(void)
Check if any of the enabled spindles is running.
Definition: spindle_control.c:659
spindle_id_t spindle_register(const spindle_ptrs_t *spindle, const char *name)
Register a spindle with the core.
Definition: spindle_control.c:146
bool spindle_sync(spindle_ptrs_t *spindle, spindle_state_t state, float rpm)
G-code parser entry-point for setting spindle state. Forces a planner buffer sync and bails if an abo...
Definition: spindle_control.c:543
bool spindle_set_state(spindle_ptrs_t *spindle, spindle_state_t state, float rpm)
Immediately sets spindle running state with direction and spindle rpm, if enabled....
Definition: spindle_control.c:530
spindle_cap_t spindle_get_caps(bool active)
Get the merged spindle capabilities of all registered spindles.
Definition: spindle_control.c:248
struct spindle_param spindle_param_t
Structure used for holding the current state of an enabled spindle.
void(* spindle_set_state_ptr)(struct spindle_ptrs *spindle, spindle_state_t state, float rpm)
Pointer to function for setting the spindle state.
Definition: spindle_control.h:140
spindle_data_request_t
Definition: spindle_control.h:104
@ SpindleData_RPM
1
Definition: spindle_control.h:106
@ SpindleData_AngularPosition
2
Definition: spindle_control.h:107
@ SpindleData_AtSpeed
3
Definition: spindle_control.h:108
@ SpindleData_Counters
0
Definition: spindle_control.h:105
void spindle_all_off(void)
Turn off all enabled spindles.
Definition: spindle_control.c:636
void spindle_set_override(spindle_ptrs_t *spindle, override_t speed_override)
Set spindle speed override.
Definition: spindle_control.c:460
spindle_ptrs_t * spindle_get_hal(spindle_id_t spindle_id, spindle_hal_t hal)
Get the handlers (function pointers) etc. associated with the spindle.
Definition: spindle_control.c:216
bool spindle_restore(spindle_ptrs_t *spindle, spindle_state_t state, float rpm)
Restore spindle running state with direction, enable, spindle RPM and appropriate delay.
Definition: spindle_control.c:579
spindle_data_t *(* spindle_get_data_ptr)(spindle_data_request_t request)
Pointer to function for getting spindle data.
Definition: spindle_control.h:179
spindle_ptrs_t * spindle_get(spindle_num_t spindle_num)
Get the handlers (function pointers) etc. associated with an enabled spindle.
Definition: spindle_control.c:374
int8_t spindle_num_t
Definition: spindle_control.h:54
spindle_id_t spindle_add_null(void)
Register a null spindle that has no connection to the outside world. This is done automatically on st...
Definition: spindle_control.c:424
struct spindle_pwm spindle_pwm_t
Precalculated values that may be set/used by HAL driver to speed up RPM to PWM conversions if variabl...
void(* spindle_pulse_on_ptr)(uint_fast16_t pulse_length)
Pointer to function for outputting a spindle on pulse. Used for Pulses Per Inch (PPI) laser mode.
Definition: spindle_control.h:188
void(* spindle_update_rpm_ptr)(struct spindle_ptrs *spindle, float rpm)
Pointer to function for updating spindle RPM.
Definition: spindle_control.h:171
float spindle_set_rpm(spindle_ptrs_t *spindle, float rpm, override_t speed_override)
Calculate and set programmed RPM according to override and max/min limits.
Definition: spindle_control.c:615
Definition: pid.h:31
Definition: spindle_control.h:190
float rpm
Definition: spindle_control.h:191
float end
Definition: spindle_control.h:193
float start
Definition: spindle_control.h:192
Definition: spindle_control.h:223
spindle_settings_t cfg
Definition: spindle_control.h:227
uint8_t port_on
Definition: spindle_control.h:224
uint8_t port_pwm
Definition: spindle_control.h:226
uint8_t port_dir
Definition: spindle_control.h:225
Data used for Constant Surface Speed (CSS) mode calculations.
Definition: spindle_control.h:295
float target_rpm
Target RPM at end of movement.
Definition: spindle_control.h:297
float surface_speed
Surface speed in millimeters/min.
Definition: spindle_control.h:296
float tool_offset
Tool offset.
Definition: spindle_control.h:300
uint_fast8_t axis
Linear (tool) axis.
Definition: spindle_control.h:301
float max_rpm
Maximum spindle RPM.
Definition: spindle_control.h:299
float delta_rpm
Delta between start and target RPM.
Definition: spindle_control.h:298
Definition: spindle_control.h:314
spindle_get_data_ptr get
Optional handler for getting spindle data. Required for spindle sync.
Definition: spindle_control.h:315
spindle_reset_data_ptr reset
Optional handler for resetting spindle data. Required for spindle sync.
Definition: spindle_control.h:316
Used when HAL driver supports spindle synchronization.
Definition: spindle_control.h:92
float rpm_programmed
Definition: spindle_control.h:97
float angular_position
Number of revolutions since last reset.
Definition: spindle_control.h:96
float rpm_high_limit
Definition: spindle_control.h:95
float rpm
Definition: spindle_control.h:93
spindle_state_t state_programmed
Definition: spindle_control.h:101
uint32_t index_count
Definition: spindle_control.h:98
uint32_t pulse_count
Definition: spindle_control.h:99
float rpm_low_limit
Definition: spindle_control.h:94
uint32_t error_count
Definition: spindle_control.h:100
Structure holding data passed to the callback function called by spindle_enumerate_spindles().
Definition: spindle_control.h:320
bool enabled
Definition: spindle_control.h:324
const char * name
Definition: spindle_control.h:323
spindle_num_t num
Definition: spindle_control.h:322
const spindle_ptrs_t * hal
Definition: spindle_control.h:326
spindle_id_t id
Definition: spindle_control.h:321
bool is_current
Definition: spindle_control.h:325
Structure used for holding the current state of an enabled spindle.
Definition: spindle_control.h:305
float rpm_overridden
Definition: spindle_control.h:307
float rpm
Definition: spindle_control.h:306
spindle_state_t state
Definition: spindle_control.h:308
spindle_ptrs_t * hal
Definition: spindle_control.h:311
override_t override_pct
Spindle RPM override value in percent.
Definition: spindle_control.h:309
spindle_css_data_t css
Data used for Constant Surface Speed Mode (CSS) calculations, NULL if not in CSS mode.
Definition: spindle_control.h:310
Handlers and data for spindle support.
Definition: spindle_control.h:267
spindle_context_ptr_t context
Optional pointer to spindle specific context.
Definition: spindle_control.h:272
spindle_set_state_ptr set_state
Handler for setting spindle state.
Definition: spindle_control.h:278
spindle_update_rpm_ptr update_rpm
Handler for updating spindle RPM.
Definition: spindle_control.h:282
spindle_reset_data_ptr reset_data
Optional handler for resetting spindle data. Required for spindle sync, copied from hal....
Definition: spindle_control.h:289
float rpm_max
Maximum spindle RPM.
Definition: spindle_control.h:276
spindle_config_ptr config
Optional handler for configuring the spindle.
Definition: spindle_control.h:277
spindle_get_data_ptr get_data
Optional handler for getting spindle data. Required for spindle sync, copied from hal....
Definition: spindle_control.h:288
uint_fast16_t pwm_off_value
Value for switching PWM signal off.
Definition: spindle_control.h:274
spindle_get_pwm_ptr get_pwm
Handler for calculating spindle PWM value from RPM.
Definition: spindle_control.h:280
spindle_pulse_on_ptr pulse_on
Optional handler for Pulses Per Inch (PPI) mode. Required for the laser PPI plugin.
Definition: spindle_control.h:287
void * hw_context
Optional pointer to spindle specific hardware context.
Definition: spindle_control.h:273
spindle_update_pwm_ptr update_pwm
Handler for updating spindle PWM output.
Definition: spindle_control.h:281
spindle_id_t id
Spindle id, assigned on spindle registration.
Definition: spindle_control.h:268
float rpm_min
Minimum spindle RPM.
Definition: spindle_control.h:275
spindle_get_state_ptr get_state
Handler for getting spindle state.
Definition: spindle_control.h:279
spindle_cap_t cap
Spindle capabilities.
Definition: spindle_control.h:271
struct spindle_param * param
Pointer to current spindle parameters, assigned when spindle is enabled.
Definition: spindle_control.h:269
spindle_type_t type
Spindle type.
Definition: spindle_control.h:270
Precalculated values that may be set/used by HAL driver to speed up RPM to PWM conversions if variabl...
Definition: spindle_control.h:242
uint_fast16_t period
Definition: spindle_control.h:245
bool cloned
deprecated, use bit in flags instead
Definition: spindle_control.h:253
uint_fast16_t off_value
NOTE: this value holds the inverted version if software PWM inversion is enabled by the driver.
Definition: spindle_control.h:246
uint32_t f_clock
Definition: spindle_control.h:243
bool invert_pwm
deprecated, use bit in flags instead
Definition: spindle_control.h:251
pwm_piece_t piece[SPINDLE_NPWM_PIECES]
Definition: spindle_control.h:257
uint_fast16_t min_value
Definition: spindle_control.h:247
int_fast16_t offset
Definition: spindle_control.h:255
uint_fast16_t(* compute_value)(struct spindle_pwm *pwm_data, float rpm, bool pid_limit)
Definition: spindle_control.h:258
spindle_settings_t * settings
Definition: spindle_control.h:244
uint_fast16_t n_pieces
Definition: spindle_control.h:256
float rpm_min
Minimum spindle RPM.
Definition: spindle_control.h:249
bool always_on
deprecated, use bit in flags instead
Definition: spindle_control.h:252
uint_fast16_t max_value
Definition: spindle_control.h:248
float pwm_gradient
Definition: spindle_control.h:250
spindle_pwm_flags_t flags
Definition: spindle_control.h:254
Definition: spindle_control.h:207
float pwm_freq
Definition: spindle_control.h:210
uint16_t ppr
Definition: spindle_control.h:218
float pwm_period
Definition: spindle_control.h:211
spindle_state_t invert
Definition: spindle_control.h:219
float pwm_off_value
Definition: spindle_control.h:212
pid_values_t pid
Definition: spindle_control.h:217
float rpm_max
Definition: spindle_control.h:208
spindle_settings_flags_t flags
Definition: spindle_control.h:220
float pwm_max_value
Definition: spindle_control.h:214
float pwm_min_value
Definition: spindle_control.h:213
float at_speed_tolerance
Definition: spindle_control.h:215
float rpm_min
Definition: spindle_control.h:209
Bitmap flags for spindle capabilities.
Definition: spindle_control.h:73
uint16_t at_speed
Spindle at speed feedback is supported.
Definition: spindle_control.h:78
uint16_t unassigned
Definition: spindle_control.h:87
uint16_t laser
Spindle can control a laser.
Definition: spindle_control.h:79
uint16_t pwm_invert
Spindle PWM output can be inverted.
Definition: spindle_control.h:80
uint16_t direction
Spindle direction (M4) is supported.
Definition: spindle_control.h:77
uint16_t cmd_controlled
Command controlled, e.g. over ModBus.
Definition: spindle_control.h:85
uint16_t value
All bitmap flags.
Definition: spindle_control.h:74
uint16_t pid
Definition: spindle_control.h:81
uint16_t gpio_controlled
On/off and direction is controlled by GPIO.
Definition: spindle_control.h:84
uint16_t cloned
Spindle is cloned.
Definition: spindle_control.h:86
uint16_t variable
Variable spindle speed is supported.
Definition: spindle_control.h:76
uint16_t rpm_range_locked
Spindle RPM range (min, max) not inherited from settings.
Definition: spindle_control.h:83
uint16_t pwm_linearization
Definition: spindle_control.h:82
Definition: spindle_control.h:262
spindle_pwm_t * pwm
Definition: spindle_control.h:263
Definition: spindle_control.h:230
uint8_t cloned
Definition: spindle_control.h:235
uint8_t value
Definition: spindle_control.h:231
uint8_t laser_mode_disable
Definition: spindle_control.h:236
uint8_t invert_pwm
NOTE: set (by driver) when inversion is done in code.
Definition: spindle_control.h:233
uint8_t always_on
Definition: spindle_control.h:234
uint8_t unused
Definition: spindle_control.h:237
Definition: spindle_control.h:196
uint8_t type
Definition: spindle_control.h:202
uint8_t pwm_disable
Definition: spindle_control.h:203
uint8_t value
Definition: spindle_control.h:197
uint8_t enable_rpm_controlled
Definition: spindle_control.h:200
uint8_t mask
Definition: spindle_control.h:198
uint8_t laser_mode_disable
Definition: spindle_control.h:201
Definition: spindle_control.h:57
uint8_t value
Definition: spindle_control.h:58
uint8_t on
Definition: spindle_control.h:61
uint8_t at_speed
Spindle is at speed.
Definition: spindle_control.h:67
uint8_t synchronized
Definition: spindle_control.h:68
uint8_t mask
Definition: spindle_control.h:59
uint8_t pwm
NOTE: only used for PWM inversion setting.
Definition: spindle_control.h:63
uint8_t reserved
Definition: spindle_control.h:64
uint8_t override_disable
Definition: spindle_control.h:65
uint8_t encoder_error
Definition: spindle_control.h:66
uint8_t ccw
Definition: spindle_control.h:62