diff --git a/Grbl_Esp32/data/config.yaml b/Grbl_Esp32/data/config.yaml index 126ecceb..a1e7f03d 100644 --- a/Grbl_Esp32/data/config.yaml +++ b/Grbl_Esp32/data/config.yaml @@ -3,12 +3,17 @@ board: "ESP32 Dev Controller V4" yaml_wiki: "https://github.com/bdring/Grbl_Esp32/wiki/YAML-Config-File" idle_time: 250 -step_type: rmt +step_type: I2S_static dir_delay_microseconds: 1 pulse_microseconds: 2 disable_delay_us: 0 homing_init_lock: false +i2so: + bck: gpio.22 + ws: gpio.17 + data: gpio.21 + axes: number_axis: 3 shared_stepper_disable: gpio.13:low @@ -22,10 +27,12 @@ axes: gang0: endstops: - dual: gpio.17:low:pu + dual: gpio.33:low:pu stepstick: - direction: gpio:14 - step: gpio.12 + disable: i2so.0 + direction: i2so.1 + step: i2so.2 + ms3: i2so.3 gang1: null_motor: @@ -38,10 +45,12 @@ axes: gang0: endstops: - dual: gpio.4:high:pd + dual: gpio.32:low:pu stepstick: - direction: gpio:15 - step: gpio.26 + disable: i2so.7 + direction: i2so.4 + step: i2so.5 + ms3: i2so.6 gang1: null_motor: @@ -54,17 +63,19 @@ axes: gang0: endstops: - dual: gpio.16:pu:low + dual: gpio.34:low:pu stepstick: - direction: gpio:33 - step: gpio.27 + disable: i2so.8 + direction: i2so.9 + step: i2so.10 + ms3: i2so.11 gang1: null_motor: coolant: - flood: gpio.25:low - mist: gpio.21 + flood: i2so.25 + mist: i2so.24 comms: wifi_sta: @@ -75,4 +86,4 @@ comms: ssid: ScratchThat probe: - pin: gpio.32:high:pu + pin: gpio.32:low:pu diff --git a/Grbl_Esp32/src/Machines/test_drive.h b/Grbl_Esp32/src/Machines/test_drive.h index b4cd9101..adf92dcf 100644 --- a/Grbl_Esp32/src/Machines/test_drive.h +++ b/Grbl_Esp32/src/Machines/test_drive.h @@ -36,3 +36,5 @@ */ #define MACHINE_NAME "Test Drive - Demo Only No I/O!" + +#define USE_I2S_STEPS \ No newline at end of file diff --git a/Grbl_Esp32/src/MotionControl.cpp b/Grbl_Esp32/src/MotionControl.cpp index 04238ffd..5a1a1b0f 100644 --- a/Grbl_Esp32/src/MotionControl.cpp +++ b/Grbl_Esp32/src/MotionControl.cpp @@ -430,7 +430,7 @@ GCUpdatePos mc_probe_cycle(float* target, plan_line_data_t* pl_data, uint8_t par } #ifdef USE_I2S_STEPS - stepper_id_t save_stepper = config->_stepType; /* remember the stepper */ + int save_stepper = config->_stepType; /* remember the stepper */ #endif // Switch stepper mode to the I2S static (realtime mode) BACKUP_STEPPER(save_stepper); diff --git a/Grbl_Esp32/src/ProcessSettings.cpp b/Grbl_Esp32/src/ProcessSettings.cpp index 08c7305f..5231a8f8 100644 --- a/Grbl_Esp32/src/ProcessSettings.cpp +++ b/Grbl_Esp32/src/ProcessSettings.cpp @@ -247,7 +247,7 @@ Error home(int cycle) { sys.state = State::Homing; // Set system state variable #ifdef USE_I2S_STEPS - stepper_id_t save_stepper = config->_stepType; + int save_stepper = config->_stepType; if (save_stepper == ST_I2S_STREAM) { stepper_switch(ST_I2S_STATIC); } diff --git a/Grbl_Esp32/src/Stepper.h b/Grbl_Esp32/src/Stepper.h index 4f69424a..a2344be9 100644 --- a/Grbl_Esp32/src/Stepper.h +++ b/Grbl_Esp32/src/Stepper.h @@ -31,8 +31,8 @@ enum stepper_id_t { ST_TIMED = 0, ST_RMT, - ST_I2S_STREAM, ST_I2S_STATIC, + ST_I2S_STREAM, }; // esp32 work around for diable in main loop