Skip to content

Commit 6f5d1cd

Browse files
committed
Added entries for motor driver chip select lines to crossbar.h, enums for aux I/O pin types.
No funtional changes.
1 parent 6c0bd64 commit 6f5d1cd

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

crossbar.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@ typedef enum {
9191
Output_DirC,
9292
Output_DirU,
9393
Output_DirV,
94+
Output_MotorChipSelect,
95+
Output_MotorChipSelectX,
96+
Output_MotorChipSelectY,
97+
Output_MotorChipSelectZ,
98+
Output_MotorChipSelectM3,
99+
Output_MotorChipSelectM4,
100+
Output_MotorChipSelectM5,
94101
Output_StepperPower,
95102
Output_StepperEnable,
96103
Output_StepperEnableX,
@@ -207,6 +214,13 @@ PROGMEM static const pin_name_t pin_names[] = {
207214
{ .function = Output_StepperEnableC, .name = "C enable" },
208215
{ .function = Output_StepperEnableXY, .name = "XY enable" },
209216
{ .function = Output_StepperEnableAB, .name = "AB enable" },
217+
{ .function = Output_MotorChipSelect, .name = "Motor CS" },
218+
{ .function = Output_MotorChipSelectX, .name = "Motor CSX" },
219+
{ .function = Output_MotorChipSelectY, .name = "Motor CSY" },
220+
{ .function = Output_MotorChipSelectZ, .name = "Motor CSZ" },
221+
{ .function = Output_MotorChipSelectM3, .name = "Motor CSM3" },
222+
{ .function = Output_MotorChipSelectM4, .name = "Motor CSM4" },
223+
{ .function = Output_MotorChipSelectM5, .name = "Motor CSM5" },
210224
{ .function = Output_SpindleOn, .name = "Spindle on" },
211225
{ .function = Output_SpindleDir, .name = "Spindle direction" },
212226
{ .function = Output_SpindlePWM, .name = "Spindle PWM" },
@@ -239,6 +253,7 @@ typedef enum {
239253
PinGroup_StepperDir,
240254
PinGroup_AuxOutput,
241255
PinGroup_SdCard,
256+
PinGroup_MotorChipSelect,
242257
PinGroup_I2C,
243258
PinGroup_SPI,
244259
PinGroup_UART,

grbl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#else
3535
#define GRBL_VERSION "1.1f"
3636
#endif
37-
#define GRBL_VERSION_BUILD "20210803"
37+
#define GRBL_VERSION_BUILD "20210809"
3838

3939
// The following symbols are set here if not already set by the compiler or in config.h
4040
// Do NOT change here!

hal.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ typedef union {
7272
} driver_cap_t;
7373

7474

75+
/*! \brief Pointer to function called to set up driver peripherals after settings are loaded. */
76+
typedef bool (*driver_setup_ptr)(settings_t *settings);
77+
7578
/*! \brief Pointer to function to be called when a soft reset occurs. */
7679
typedef void (*driver_reset_ptr)(void);
7780

@@ -88,6 +91,16 @@ typedef bool (*stream_select_ptr)(const io_stream_t *stream);
8891
* Aux I/O *
8992
*************/
9093

94+
typedef enum {
95+
Port_Analog = 0,
96+
Port_Digital = 1
97+
} io_port_type_t;
98+
99+
typedef enum {
100+
Port_Input = 0,
101+
Port_Output = 1
102+
} io_port_direction_t;
103+
91104
/*! \brief Pointer to function for setting a digital output.
92105
\param port port number
93106
\param on true to set ouput high, false to set it low
@@ -622,7 +635,7 @@ typedef struct {
622635
\param settings pointer to settings_t structure.
623636
\returns true if completed sucessfully and the driver supports the _settings->version_ number, false otherwise.
624637
*/
625-
bool (*driver_setup)(settings_t *settings);
638+
driver_setup_ptr driver_setup;
626639

627640
/*! \brief Millisecond delay.
628641

0 commit comments

Comments
 (0)