mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-09-03 03:13:25 +02:00
Default SPI miso, mosi, sck, ss pins to the "standard" gpios 19, 23, 18, 5
This commit is contained in:
@@ -360,6 +360,16 @@ void SPIBus::group(Configuration::HandlerBase& handler) {
|
|||||||
handler.item("mosi", _sck);
|
handler.item("mosi", _sck);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SPIBus::afterParse() {
|
||||||
|
if (_ss.undefined() && _miso.undefined() && _mosi.undefined() && _sck.undefined()) {
|
||||||
|
// Default SPI miso, mosi, sck, ss pins to the "standard" gpios 19, 23, 18, 5
|
||||||
|
_miso = Pin::create("gpio.19");
|
||||||
|
_mosi = Pin::create("gpio.23");
|
||||||
|
_sck = Pin::create("gpio.18");
|
||||||
|
_ss = Pin::create("gpio.5");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void UserOutputs::group(Configuration::HandlerBase& handler) {
|
void UserOutputs::group(Configuration::HandlerBase& handler) {
|
||||||
handler.item("analog0", _analogOutput[0]);
|
handler.item("analog0", _analogOutput[0]);
|
||||||
handler.item("analog1", _analogOutput[1]);
|
handler.item("analog1", _analogOutput[1]);
|
||||||
|
@@ -200,6 +200,7 @@ public:
|
|||||||
|
|
||||||
void validate() const override;
|
void validate() const override;
|
||||||
void group(Configuration::HandlerBase& handler) override;
|
void group(Configuration::HandlerBase& handler) override;
|
||||||
|
void afterParse() override;
|
||||||
|
|
||||||
~SPIBus() = default;
|
~SPIBus() = default;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user