Skip to content

Commit

Permalink
Close #955
Browse files Browse the repository at this point in the history
Add more default settings for SPI W5500 Ethernet
Bump version for tracking
  • Loading branch information
luc-github committed Nov 25, 2024
1 parent ff3dff0 commit d2c52ac
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 14 deletions.
31 changes: 21 additions & 10 deletions esp3d/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,22 +137,31 @@
// TYPE_ETH_PHY_KSZ8041
// TYPE_ETH_PHY_KSZ8081
// TYPE_ETH_PHY_W5500
#define ESP3D_ETH_PHY_TYPE TYPE_ETH_PHY_LAN8720
//#define ESP3D_ETH_PHY_TYPE TYPE_ETH_PHY_W5500

// Ethernet board Clock mode
// MODE_ETH_CLOCK_GPIO0_IN
// MODE_ETH_CLOCK_GPIO0_OUT
// MODE_ETH_CLOCK_GPIO16_OUT
// MODE_ETH_CLOCK_GPIO17_OUT
#define ESP3D_ETH_CLK_MODE MODE_ETH_CLOCK_GPIO0_IN
//#define ESP3D_ETH_CLK_MODE MODE_ETH_CLOCK_GPIO0_IN

// Pins of ethernet board
#define ESP3D_ETH_PHY_POWER_PIN 16
#define ESP3D_ETH_PHY_MDC_PIN 23
#define ESP3D_ETH_PHY_MDIO_PIN 18
//#define ESP3D_ETH_PHY_POWER_PIN 16
//#define ESP3D_ETH_PHY_MDC_PIN 23
//#define ESP3D_ETH_PHY_MDIO_PIN 18
// These are the pins for the W5500 chip using SPI
#define ETHERNET_SPI_USE_SPI 1
#define ETHERNET_SPI_USE_SPI2 0
#define ETH_SPI_SCK 8
#define ETH_SPI_MISO 23
#define ETH_SPI_MOSI 19
#define ETH_PHY_CS 5
#define ETH_PHY_IRQ 33
#define ETH_PHY_RST 4

// Address of ethernet board
#define ESP3D_ETH_PHY_ADDR 1
#define ESP3D_ETH_PHY_ADDR 0

/* Use Bluetooth
* Enable serial bluetooth communications
Expand Down Expand Up @@ -287,11 +296,11 @@

/* SD card connection
* ESP_NO_SD //(default)
* ESP_DIRECT_SD //Only your ESP board is connected to SDCard
* ESP_NOT_SHARED_SD //Only your ESP board is connected to SDCard
* ESP_SHARED_SD //Printer SD Card is also connected to ESP3D
* Does your system has SD card and how it is connected to your ESP3D
*/
//#define SD_DEVICE_CONNECTION ESP_DIRECT_SD
//#define SD_DEVICE_CONNECTION ESP_NOT_SHARED_SD

/* SD card library
* ESP_SD_NATIVE //esp32 / esp8266
Expand Down Expand Up @@ -443,7 +452,7 @@
* TFT_SPI_ST7789_240X240
* TFT_SPI_ST7789_135X240
*/
// #define DISPLAY_DEVICE OLED_I2C_SSD1306_128X64
//#define DISPLAY_DEVICE OLED_I2C_SSD1306_128X64

/* Flip screen
* Flip/rotate screen
Expand All @@ -453,7 +462,9 @@
/* Display i2C address
* Wire address of display
*/
// #define DISPLAY_I2C_ADDR 0x3c
#define DISPLAY_I2C_ADDR 0x3c
//#define ESP_SDA_PIN 21
//#define ESP_SCL_PIN 22

/* Display reset pin
* The pin used to reset the screen (optional)
Expand Down
2 changes: 1 addition & 1 deletion esp3d/src/core/commands/ESP420.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ void ESP3DCommands::ESP420(int cmd_params_pos, ESP3DMessage* msg) {
#endif // NOTIFICATION_FEATURE
#if defined(SD_DEVICE)
// SD enabled
tmpstr = (ESP3DSettings::GetSDDevice() == ESP_DIRECT_SD) ? "direct "
tmpstr = (ESP3DSettings::GetSDDevice() == ESP_NOT_SHARED_SD) ? "direct "
: (ESP3DSettings::GetSDDevice() == ESP_SHARED_SD) ? "shared "
: "none ";
tmpstr += "(";
Expand Down
2 changes: 1 addition & 1 deletion esp3d/src/core/commands/ESP800.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void ESP3DCommands::ESP800(int cmd_params_pos, ESP3DMessage* msg) {
}

// SD connection
if (ESP3DSettings::GetSDDevice() == ESP_DIRECT_SD) {
if (ESP3DSettings::GetSDDevice() == ESP_NOT_SHARED_SD) {
tmpstr = "direct";
} else if (ESP3DSettings::GetSDDevice() == ESP_SHARED_SD) {
tmpstr = "shared";
Expand Down
2 changes: 1 addition & 1 deletion esp3d/src/include/esp3d_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ typedef uint ESP3DSettingIndex;

// SD connection
#define ESP_NO_SD 0
#define ESP_DIRECT_SD 1
#define ESP_NOT_SHARED_SD 1
#define ESP_SHARED_SD 2

// SD Device type
Expand Down
2 changes: 1 addition & 1 deletion esp3d/src/include/esp3d_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#define _VERSION_ESP3D_H

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

#endif //_VERSION_ESP3D_H

0 comments on commit d2c52ac

Please sign in to comment.