浏览代码

Merge remote-tracking branch 'origin/master' into S3

S3
jrhoffa 3 年前
父节点
当前提交
d36a1a0952
共有 3 个文件被更改,包括 50 次插入2 次删除
  1. +46
    -0
      0001-Enable-lwIP-TFTP-server-support.patch
  2. +1
    -1
      main/main.cpp
  3. +3
    -1
      main/spi_leds.cpp

+ 46
- 0
0001-Enable-lwIP-TFTP-server-support.patch 查看文件

@@ -0,0 +1,46 @@
From 963e5981b7e9212068ee6589983f5cd0e217f7b1 Mon Sep 17 00:00:00 2001
From: jrhoffa <robots.are.love@gmail.com>
Date: Sun, 27 Nov 2022 18:05:45 -0800
Subject: [PATCH] Enable lwIP TFTP server support

---
components/lwip/CMakeLists.txt | 4 ++++
components/lwip/Kconfig | 7 +++++++
2 files changed, 11 insertions(+)

diff --git a/components/lwip/CMakeLists.txt b/components/lwip/CMakeLists.txt
index acd587de92..40dcb7f4f4 100644
--- a/components/lwip/CMakeLists.txt
+++ b/components/lwip/CMakeLists.txt
@@ -148,6 +148,10 @@ if(CONFIG_LWIP_DHCPS)
list(APPEND srcs "apps/dhcpserver/dhcpserver.c")
endif()
+if(CONFIG_LWIP_TFTPS)
+ list(APPEND srcs "lwip/src/apps/tftp/tftp_server.c")
+endif()
+
idf_component_register(SRCS "${srcs}"
INCLUDE_DIRS "${include_dirs}"
LDFRAGMENTS linker.lf
diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig
index 57e8c2b045..5016394397 100644
--- a/components/lwip/Kconfig
+++ b/components/lwip/Kconfig
@@ -871,6 +871,13 @@ menu "LWIP"
endmenu # LWIP RAW API
+ menu "TFTP"
+ config LWIP_TFTPS
+ bool "Enable TFTP server"
+ default n
+
+ endmenu # TFTP
+
menu "SNTP"
config LWIP_SNTP_MAX_SERVERS
--
2.25.1


+ 1
- 1
main/main.cpp 查看文件

@@ -106,7 +106,7 @@ extern "C" void app_main(void) {
// TerminalLEDs()
// ScreenLEDs()
// SPI_LEDs(39);
// RMT_LEDs(17);
// RMT_LEDs(GPIO_NUM_17);
LEDStrip *LEDs = new RMT_LEDs(GPIO_NUM_17);
int frequency = 30;



+ 3
- 1
main/spi_leds.cpp 查看文件

@@ -54,7 +54,9 @@ SPI_LEDs::SPI_LEDs(int _gpio, int length) :
.cs_ena_posttrans = 0, // moot
// Datasheet implies 3.2 MHz => 1.25 us / 4
// We can get away with 4.4_ MHz => 900 ns / 4
.clock_speed_hz = 3200000,
// HOWEVER, better implementations divide 1.25 us into thirds!
// Thus, 2.4 MHz has the same H times and slightly longer L times.
.clock_speed_hz = 2400000,
.input_delay_ns = 0, // moot
.spics_io_num = -1,
.flags = 0, // Keep it MSB first


正在加载...
取消
保存