Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Olimex ESP32 Gateway #583

Merged
merged 15 commits into from Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build.yaml
Expand Up @@ -64,6 +64,9 @@ jobs:
# mh et esp32 mini kit
- target: "d1_mini_mhetesp32minikit"
chip: "esp32"
# Olimex ESP32 Gateway
target: "olimex_esp32_gw"
forkineye marked this conversation as resolved.
Show resolved Hide resolved
chip: "esp32"
# Twilight Lord
- target: "d1_mini_twilightlord"
chip: "esp32"
Expand Down
4 changes: 3 additions & 1 deletion ESPixelStick/src/GPIO_Defs.hpp
Expand Up @@ -90,7 +90,9 @@ typedef enum
# include "platformDefinitions/GPIO_Defs_ESP32_MH_ET_LIVE_MiniKit.hpp"
#elif defined (BOARD_ESP32_QUINLED_DIG_OCTA)
# include "platformDefinitions/GPIO_Defs_ESP32_QUINLED_Dig-Octa.hpp"
#elif defined (BOARD_ESP32_QUINLED_QUAD_ETH)
#elif defined (BOARD_ESP32_OLIMEX_GATEWAY)
# include "platformDefinitions/GPIO_Defs_ESP32_Olimex_Gateway.hpp"
#elif defined(BOARD_ESP32_QUINLED_QUAD_ETH)
# include "platformDefinitions/GPIO_Defs_ESP32_QUINLED_QUAD_ETH.hpp"
#elif defined (BOARD_ESP32_QUINLED_QUAD_AE_PLUS)
# include "platformDefinitions/GPIO_Defs_ESP32_QUINLED_QUAD_AE_Plus.hpp"
Expand Down
@@ -0,0 +1,94 @@
#pragma once
/*
* GPIO_Defs_ESP32_Olimex_Gateway.hpp - Output Management class
*
* Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver
* Copyright (c) 2021 Shelby Merrick
* http://www.forkineye.com
*
* This program is provided free for you to use in any way that you wish,
* subject to the laws and regulations where you are using it. Due diligence
* is strongly suggested before using this code. Please give credit where due.
*
* The Author makes no warranty of any kind, express or implied, with regard
* to this program or the documentation contained in this document. The
* Author shall not be liable in any event for incidental or consequential
* damages in connection with, or arising out of, the furnishing, performance
* or use of these programs.
*
*/

/*
* Pinout for Olimex ESP32-GATEWAY
* https://www.olimex.com/Products/IoT/ESP32/ESP32-GATEWAY/open-source-hardware
*/

//Output Manager
#define DEFAULT_UART_1_GPIO gpio_num_t::GPIO_NUM_4 // Supposed to be SD Card, but R10 not populated
#define DEFAULT_UART_2_GPIO gpio_num_t::GPIO_NUM_12 // Supposed to be SD Card, but R10 not populated

#define DEFAULT_RMT_1_GPIO gpio_num_t::GPIO_NUM_13 // Tested working
#define DEFAULT_RMT_2_GPIO gpio_num_t::GPIO_NUM_16 // Tested working
#define DEFAULT_RMT_3_GPIO gpio_num_t::GPIO_NUM_32 // Tested working
/*
Notes:
- GPIOs 4, 12, 13 are for SD Card, but are not actually wired to the SD Card on
board rev G (resistors R10, R11, R9 are not populated on the board)
- 39 is also available on the header
- Maybe also use 33 (LED output) if needed
*/

// File Manager
// Have not been able to get the SD card working, yet.
// CS pin would be GPIO13, but is not connected (resistor R9 not populated); instead CS is pulled up through R2
#define SD_CARD_MISO_PIN gpio_num_t::GPIO_NUM_2
#define SD_CARD_MOSI_PIN gpio_num_t::GPIO_NUM_15
#define SD_CARD_CLK_PIN gpio_num_t::GPIO_NUM_14
#define SD_CARD_CS_PIN gpio_num_t::GPIO_NUM_NC

#include <ETH.h>
#define SUPPORT_ETHERNET
/*
* ETH_CLOCK_GPIO0_IN - default: external clock from crystal oscillator
* ETH_CLOCK_GPIO0_OUT - 50MHz clock from internal APLL output on GPIO0 - possibly an inverter is needed for LAN8720
* ETH_CLOCK_GPIO16_OUT - 50MHz clock from internal APLL output on GPIO16 - possibly an inverter is needed for LAN8720
* ETH_CLOCK_GPIO17_OUT - 50MHz clock from internal APLL inverted output on GPIO17 - tested with LAN8720
*/
#define DEFAULT_ETH_CLK_MODE eth_clock_mode_t::ETH_CLOCK_GPIO17_OUT

// Pin# of the enable signal for the external crystal oscillator (-1 to disable for internal APLL source)
#define DEFAULT_ETH_POWER_PIN gpio_num_t(gpio_num_t::GPIO_NUM_5)
#define DEFAULT_ETH_POWER_PIN_ACTIVE LOW

// Type of the Ethernet PHY (LAN8720 or TLK110)
#define DEFAULT_ETH_TYPE eth_phy_type_t::ETH_PHY_LAN8720

// I2C-address of Ethernet PHY (0 or 1 for LAN8720, 31 for TLK110)
#define ETH_ADDR_PHY_LAN8720 0
//#define ETH_ADDR_PHY_LAN8720 1
#define ETH_ADDR_PHY_TLK110 31
#define DEFAULT_ETH_ADDR ETH_ADDR_PHY_LAN8720
#define DEFAULT_ETH_TXEN gpio_num_t::GPIO_NUM_21
#define DEFAULT_ETH_TXD0 gpio_num_t::GPIO_NUM_19
#define DEFAULT_ETH_TXD1 gpio_num_t::GPIO_NUM_22
#define DEFAULT_ETH_CRSDV gpio_num_t::GPIO_NUM_27
#define DEFAULT_ETH_RXD0 gpio_num_t::GPIO_NUM_25
#define DEFAULT_ETH_RXD1 gpio_num_t::GPIO_NUM_26
#define DEFAULT_ETH_MDC_PIN gpio_num_t::GPIO_NUM_23
#define DEFAULT_ETH_MDIO_PIN gpio_num_t::GPIO_NUM_18


// Output Types
// #define SUPPORT_OutputType_APA102 // SPI
#define SUPPORT_OutputType_DMX // UART / RMT
#define SUPPORT_OutputType_GECE // UART / RMT
#define SUPPORT_OutputType_GS8208 // UART / RMT
#define SUPPORT_OutputType_Renard // UART / RMT
#define SUPPORT_OutputType_Serial // UART / RMT
#define SUPPORT_OutputType_TM1814 // UART / RMT
#define SUPPORT_OutputType_UCS1903 // UART / RMT
#define SUPPORT_OutputType_UCS8903 // UART / RMT
// #define SUPPORT_OutputType_WS2801 // SPI
#define SUPPORT_OutputType_WS2811 // UART / RMT
// #define SUPPORT_OutputType_Relay // GPIO
// #define SUPPORT_OutputType_Servo_PCA9685 // I2C (default pins)
11 changes: 10 additions & 1 deletion platformio.ini
Expand Up @@ -4,7 +4,7 @@
; Local configuration should be done in platformio_user.ini

[platformio]
default_envs = espsv3, d1_mini, d32_pro, d32_pro_eth, esp32_cam, esp32_ttgo_t8, d1_mini32, d1_mini32_eth, esp32_wt32eth01, esp32_quinled_quad, esp32_quinled_quad_ae_plus, esp32_quinled_quad_eth, esp32_quinled_uno, esp32_quinled_uno_ae_plus, esp32_quinled_uno_eth, esp32_quinled_dig_octa, esp01s, d1_mini_mhetesp32minikit, d1_mini_twilightlord, d1_mini_twilightlord_eth, esp32_devkitc, esp32_quinled_uno_eth_espsv3, esp32_quinled_uno_espsv3, m5stack_atom, esp3deuxquatro_dmx
default_envs = espsv3, d1_mini, d32_pro, d32_pro_eth, esp32_cam, esp32_ttgo_t8, d1_mini32, d1_mini32_eth, esp32_wt32eth01, esp32_quinled_quad, esp32_quinled_quad_ae_plus, esp32_quinled_quad_eth, esp32_quinled_uno, esp32_quinled_uno_ae_plus, esp32_quinled_uno_eth, esp32_quinled_dig_octa, esp01s, d1_mini_mhetesp32minikit, olimex_esp32_gw, d1_mini_twilightlord, d1_mini_twilightlord_eth, esp32_devkitc, esp32_quinled_uno_eth_espsv3, esp32_quinled_uno_espsv3, m5stack_atom, esp3deuxquatro_dmx
src_dir = ./ESPixelStick
data_dir = ./ESPixelStick/data
build_cache_dir = ./.pio/.buildcache
Expand Down Expand Up @@ -323,6 +323,15 @@ build_flags =
${esp32git.build_flags}
-D BOARD_ESP32_QUINLED_UNO_ETH

; Olimex ESP32 Gateway
[env:olimex_esp32_gw]
extends = esp32git
board = esp32-gateway
build_flags =
${esp32git.build_flags}
; -D BOARD_ESP32_QUINLED_UNO_ETH
-D BOARD_ESP32_OLIMEX_GATEWAY

[env:d1_mini_twilightlord]
extends = esp32git
board = wemos_d1_mini32
Expand Down