Skip to content

Commit d2c52ac

Browse files
committed
Close #955
Add more default settings for SPI W5500 Ethernet Bump version for tracking
1 parent ff3dff0 commit d2c52ac

File tree

5 files changed

+25
-14
lines changed

5 files changed

+25
-14
lines changed

esp3d/configuration.h

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,22 +137,31 @@
137137
// TYPE_ETH_PHY_KSZ8041
138138
// TYPE_ETH_PHY_KSZ8081
139139
// TYPE_ETH_PHY_W5500
140-
#define ESP3D_ETH_PHY_TYPE TYPE_ETH_PHY_LAN8720
140+
//#define ESP3D_ETH_PHY_TYPE TYPE_ETH_PHY_W5500
141141

142142
// Ethernet board Clock mode
143143
// MODE_ETH_CLOCK_GPIO0_IN
144144
// MODE_ETH_CLOCK_GPIO0_OUT
145145
// MODE_ETH_CLOCK_GPIO16_OUT
146146
// MODE_ETH_CLOCK_GPIO17_OUT
147-
#define ESP3D_ETH_CLK_MODE MODE_ETH_CLOCK_GPIO0_IN
147+
//#define ESP3D_ETH_CLK_MODE MODE_ETH_CLOCK_GPIO0_IN
148148

149149
// Pins of ethernet board
150-
#define ESP3D_ETH_PHY_POWER_PIN 16
151-
#define ESP3D_ETH_PHY_MDC_PIN 23
152-
#define ESP3D_ETH_PHY_MDIO_PIN 18
150+
//#define ESP3D_ETH_PHY_POWER_PIN 16
151+
//#define ESP3D_ETH_PHY_MDC_PIN 23
152+
//#define ESP3D_ETH_PHY_MDIO_PIN 18
153+
// These are the pins for the W5500 chip using SPI
154+
#define ETHERNET_SPI_USE_SPI 1
155+
#define ETHERNET_SPI_USE_SPI2 0
156+
#define ETH_SPI_SCK 8
157+
#define ETH_SPI_MISO 23
158+
#define ETH_SPI_MOSI 19
159+
#define ETH_PHY_CS 5
160+
#define ETH_PHY_IRQ 33
161+
#define ETH_PHY_RST 4
153162

154163
// Address of ethernet board
155-
#define ESP3D_ETH_PHY_ADDR 1
164+
#define ESP3D_ETH_PHY_ADDR 0
156165

157166
/* Use Bluetooth
158167
* Enable serial bluetooth communications
@@ -287,11 +296,11 @@
287296

288297
/* SD card connection
289298
* ESP_NO_SD //(default)
290-
* ESP_DIRECT_SD //Only your ESP board is connected to SDCard
299+
* ESP_NOT_SHARED_SD //Only your ESP board is connected to SDCard
291300
* ESP_SHARED_SD //Printer SD Card is also connected to ESP3D
292301
* Does your system has SD card and how it is connected to your ESP3D
293302
*/
294-
//#define SD_DEVICE_CONNECTION ESP_DIRECT_SD
303+
//#define SD_DEVICE_CONNECTION ESP_NOT_SHARED_SD
295304

296305
/* SD card library
297306
* ESP_SD_NATIVE //esp32 / esp8266
@@ -443,7 +452,7 @@
443452
* TFT_SPI_ST7789_240X240
444453
* TFT_SPI_ST7789_135X240
445454
*/
446-
// #define DISPLAY_DEVICE OLED_I2C_SSD1306_128X64
455+
//#define DISPLAY_DEVICE OLED_I2C_SSD1306_128X64
447456

448457
/* Flip screen
449458
* Flip/rotate screen
@@ -453,7 +462,9 @@
453462
/* Display i2C address
454463
* Wire address of display
455464
*/
456-
// #define DISPLAY_I2C_ADDR 0x3c
465+
#define DISPLAY_I2C_ADDR 0x3c
466+
//#define ESP_SDA_PIN 21
467+
//#define ESP_SCL_PIN 22
457468

458469
/* Display reset pin
459470
* The pin used to reset the screen (optional)

esp3d/src/core/commands/ESP420.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ void ESP3DCommands::ESP420(int cmd_params_pos, ESP3DMessage* msg) {
707707
#endif // NOTIFICATION_FEATURE
708708
#if defined(SD_DEVICE)
709709
// SD enabled
710-
tmpstr = (ESP3DSettings::GetSDDevice() == ESP_DIRECT_SD) ? "direct "
710+
tmpstr = (ESP3DSettings::GetSDDevice() == ESP_NOT_SHARED_SD) ? "direct "
711711
: (ESP3DSettings::GetSDDevice() == ESP_SHARED_SD) ? "shared "
712712
: "none ";
713713
tmpstr += "(";

esp3d/src/core/commands/ESP800.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ void ESP3DCommands::ESP800(int cmd_params_pos, ESP3DMessage* msg) {
147147
}
148148

149149
// SD connection
150-
if (ESP3DSettings::GetSDDevice() == ESP_DIRECT_SD) {
150+
if (ESP3DSettings::GetSDDevice() == ESP_NOT_SHARED_SD) {
151151
tmpstr = "direct";
152152
} else if (ESP3DSettings::GetSDDevice() == ESP_SHARED_SD) {
153153
tmpstr = "shared";

esp3d/src/include/esp3d_defines.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ typedef uint ESP3DSettingIndex;
188188

189189
// SD connection
190190
#define ESP_NO_SD 0
191-
#define ESP_DIRECT_SD 1
191+
#define ESP_NOT_SHARED_SD 1
192192
#define ESP_SHARED_SD 2
193193

194194
// SD Device type

esp3d/src/include/esp3d_version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define _VERSION_ESP3D_H
2323

2424
// version and sources location
25-
#define FW_VERSION "3.0.0.a241"
25+
#define FW_VERSION "3.0.0.a242"
2626
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
2727

2828
#endif //_VERSION_ESP3D_H

0 commit comments

Comments
 (0)