mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-09-03 11:22:38 +02:00
Eliminated MachineCommon.h
It had only a few consts that were either unnecessary or module specific. I eliminated the former and moved the latter.
This commit is contained in:
@@ -48,13 +48,6 @@ Some features should not be changed. See notes below.
|
|||||||
|
|
||||||
const int SUPPORT_TASK_CORE = 1; // Reference: CONFIG_ARDUINO_RUNNING_CORE = 1
|
const int SUPPORT_TASK_CORE = 1; // Reference: CONFIG_ARDUINO_RUNNING_CORE = 1
|
||||||
|
|
||||||
// Include the file that loads the machine-specific config file.
|
|
||||||
// machine.h must be edited to choose the desired file.
|
|
||||||
#include "Machine.h"
|
|
||||||
|
|
||||||
// machine_common.h contains settings that do not change
|
|
||||||
#include "MachineCommon.h"
|
|
||||||
|
|
||||||
const int MAX_N_AXIS = 6;
|
const int MAX_N_AXIS = 6;
|
||||||
|
|
||||||
// Serial baud rate
|
// Serial baud rate
|
||||||
|
@@ -254,8 +254,8 @@ void limits_go_home(uint8_t cycle_mask, uint32_t n_locate_cycles) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (STEP_MASK & axislock);
|
|
||||||
|
|
||||||
|
} while (axislock);
|
||||||
if (config->_stepType == ST_I2S_STREAM) {
|
if (config->_stepType == ST_I2S_STREAM) {
|
||||||
if (!approach) {
|
if (!approach) {
|
||||||
delay_ms(I2S_OUT_DELAY_MS);
|
delay_ms(I2S_OUT_DELAY_MS);
|
||||||
|
@@ -1,15 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
// Grbl setting that are common to all machines
|
|
||||||
// It should not be necessary to change anything herein
|
|
||||||
|
|
||||||
const int32_t GRBL_SPI_FREQ = 4000000;
|
|
||||||
|
|
||||||
// ESP32 CPU Settings
|
|
||||||
const uint32_t fTimers = 80000000; // a reference to the speed of ESP32 timers
|
|
||||||
|
|
||||||
// =============== Don't change or comment these out ======================
|
|
||||||
// They are for legacy purposes and will not affect your I/O
|
|
||||||
|
|
||||||
const int STEP_MASK = 0x3F; // 111111
|
|
||||||
const int PROBE_MASK = 1;
|
|
@@ -163,9 +163,8 @@ SDCard::State SDCard::get_state(bool refresh) {
|
|||||||
|
|
||||||
_state = SDCard::State::NotPresent;
|
_state = SDCard::State::NotPresent;
|
||||||
|
|
||||||
//using default value for speed ? should be parameter
|
|
||||||
//refresh content if card was removed
|
//refresh content if card was removed
|
||||||
if (SD.begin(csPin, SPI, GRBL_SPI_FREQ, "/sd", 2)) {
|
if (SD.begin(csPin, SPI, SPIfreq, "/sd", 2)) {
|
||||||
if (SD.cardSize() > 0) {
|
if (SD.cardSize() > 0) {
|
||||||
_state = SDCard::State::Idle;
|
_state = SDCard::State::Idle;
|
||||||
}
|
}
|
||||||
|
@@ -26,6 +26,9 @@ namespace fs {
|
|||||||
class FS;
|
class FS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX This should be a configuration parameter of the SPI bus
|
||||||
|
const int32_t SPIfreq = 4000000;
|
||||||
|
|
||||||
class SDCard : public Configuration::Configurable {
|
class SDCard : public Configuration::Configurable {
|
||||||
public:
|
public:
|
||||||
enum class State : uint8_t {
|
enum class State : uint8_t {
|
||||||
|
@@ -24,6 +24,7 @@ struct PrepFlag {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// fStepperTimer should be an integer divisor of the bus speed, i.e. of fTimers
|
// fStepperTimer should be an integer divisor of the bus speed, i.e. of fTimers
|
||||||
|
const uint32_t fTimers = 80000000; // the frequency of ESP32 timers
|
||||||
const uint32_t fStepperTimer = 20000000; // frequency of step pulse timer
|
const uint32_t fStepperTimer = 20000000; // frequency of step pulse timer
|
||||||
const int ticksPerMicrosecond = fStepperTimer / 1000000;
|
const int ticksPerMicrosecond = fStepperTimer / 1000000;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user