Skip to content

Commit

Permalink
AAdded new controller type KR Lights MSM
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinMueller2003 committed Apr 14, 2024
1 parent 6fef9a1 commit b71468e
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ jobs:
chip: "esp32"
- target: "esp32_quinled_uno_espsv3"
chip: "esp32"
#
- target: "esp32_tetra2go"
chip: "esp32"
# KR Lights
- target: "esp32_kr_lights_msm"
chip: "esp32"

runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 2 additions & 0 deletions ESPixelStick/src/GPIO_Defs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ typedef enum
# include "platformDefinitions/GPIO_Defs_ESP32_ESP3DEUXQuattro_DMX.hpp"
#elif defined (BOARD_ESP32_TETRA2GO)
# include "platformDefinitions/GPIO_Defs_ESP32_Tetra2go.hpp"
#elif defined (BOARD_ESP32_KR_LIGHTS_MSM)
# include "platformDefinitions/GPIO_Defs_ESP32_kr_lights_msm.hpp"
#elif defined (ARDUINO_ARCH_ESP32)
# include "platformDefinitions/GPIO_Defs_ESP32_generic.hpp"
#elif defined (ARDUINO_ARCH_ESP8266)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#pragma once
/*
* GPIO_Defs_ESP32_kr_lights_msm.hpp - Output Management class
*
* Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver
* Copyright (c) 2021 - 2024 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.
*
*/

// #define SUPPORT_ETHERNET

//Output Manager
#define DEFAULT_RMT_0_GPIO gpio_num_t::GPIO_NUM_15
#define DEFAULT_RMT_1_GPIO gpio_num_t::GPIO_NUM_32
#define DEFAULT_RMT_2_GPIO gpio_num_t::GPIO_NUM_33
#define DEFAULT_RMT_3_GPIO gpio_num_t::GPIO_NUM_14
#define DEFAULT_RMT_4_GPIO gpio_num_t::GPIO_NUM_12

//Power relay output over Q1 or Q1R
// #define DEFAULT_RELAY_GPIO gpio_num_t::GPIO_NUM_33

// I2c over Q3 and Q4 (SCL is shared with LED8! Disable LED8 to enable I2C)
// #define DEFAULT_I2C_SDA gpio_num_t::GPIO_NUM_
// #define DEFAULT_I2C_SCL gpio_num_t::GPIO_NUM_

// File Manager
// #define SUPPORT_SD
#define SD_CARD_MISO_PIN gpio_num_t::GPIO_NUM_4
#define SD_CARD_MOSI_PIN gpio_num_t::GPIO_NUM_4
#define SD_CARD_CLK_PIN gpio_num_t::GPIO_NUM_4
#define SD_CARD_CS_PIN gpio_num_t::GPIO_NUM_4

// #include <ETH.h>

/*
* 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_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(-1)
// #define DEFAULT_ETH_POWER_PIN_ACTIVE HIGH

// Type of the Ethernet PHY (LAN8720 or TLK110)
// #define DEFAULT_ETH_TYPE 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
// Not Finished - #define SUPPORT_OutputType_TLS3001
// #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)
35 changes: 35 additions & 0 deletions dist/firmware/firmware.json
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,41 @@
"size": "0x50000",
"offset": "0x3B0000"
}
},
{
"name": "ESP32 KR Lights MSM",
"description": "ESP32 based 5 port controller",
"chip": "esp32",
"appbin": "esp32/esp32_kr_lights_msm32_tetra2go-app.bin",
"esptool": {
"baudrate": "460800",
"options": "",
"flashcmd": "write_flash -z"
},
"binfiles": [
{
"name": "esp32/esp32_kr_lights_msm-bootloader.bin",
"offset": "0x01000"
},
{
"name": "esp32/esp3esp32_kr_lights_msm2_tetra2go-partitions.bin",
"offset": "0x08000"
},
{
"name": "esp32/boot_app0.bin",
"offset": "0x0e000"
},
{
"name": "esp32/esp32_kr_lights_msm-app.bin",
"offset": "0x10000"
}
],
"filesystem": {
"page": "256",
"block": "4096",
"size": "0x50000",
"offset": "0x3B0000"
}
}
]
}
15 changes: 14 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
; Local configuration should be done in platformio_user.ini

[platformio]
default_envs = espsv3, d1_mini, d1_mini_pro, d32_pro, d32_pro_eth, esp32_cam, esp32_ttgo_t8, d1_mini32, d1_mini32_eth, esp32_bong69, esp32_wt32eth01, esp32_quinled_quad, esp32_quinled_quad_ae_plus, esp32_quinled_quad_ae_plus_8, 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, esp32_wasatch, esp32_tetra2go
default_envs = espsv3, d1_mini, d1_mini_pro, d32_pro, d32_pro_eth, esp32_cam, esp32_ttgo_t8, d1_mini32, d1_mini32_eth, esp32_bong69, esp32_wt32eth01, esp32_quinled_quad, esp32_quinled_quad_ae_plus, esp32_quinled_quad_ae_plus_8, 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, esp32_wasatch, esp32_tetra2go, esp32_kr_lights_msm
src_dir = ./ESPixelStick
data_dir = ./ESPixelStick/data
build_cache_dir = ./.pio/.buildcache
Expand Down Expand Up @@ -445,3 +445,16 @@ build_flags =
${esp32git.build_flags}
-D BOARD_NAME='"esp32_tetra2go"'
-D BOARD_ESP32_TETRA2GO

; KR Lights SEED Matrix
[env:esp32_kr_lights_msm]
extends = esp32git
board = wemos_d1_mini32
build_flags =
${esp32git.build_flags}
-D BOARD_NAME='"esp32_kr_lights_msm"'
-D BOARD_ESP32_KR_LIGHTS_MSM
build_unflags =
-D BOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
-mfix-esp32-psram-cache-strategy=memw

0 comments on commit b71468e

Please sign in to comment.