Browse Source

initial commit

philippe44 2 năm trước cách đây
mục cha
commit
4d591a53eb

+ 6 - 2
components/display/core/gds.c

@@ -19,6 +19,10 @@
 #include "gds.h"
 #include "gds_private.h"
 
+#ifdef CONFIG_IDF_TARGET_ESP32S3
+#define LEDC_HIGH_SPEED_MODE LEDC_SPEED_MODE_MAX
+#endif                
+
 static struct GDS_Device Display;
 static struct GDS_BacklightPWM PWMConfig;
 
@@ -34,7 +38,7 @@ struct GDS_Device* GDS_AutoDetect( char *Driver, GDS_DetectFunc* DetectFunc[], s
 				ledc_timer_config_t PWMTimer = {
 						.duty_resolution = LEDC_TIMER_13_BIT,
 						.freq_hz = 5000,                   
-						.speed_mode = LEDC_HIGH_SPEED_MODE,
+                        .speed_mode = LEDC_HIGH_SPEED_MODE,  
 						.timer_num = PWMConfig.Timer,
 					};
 				ledc_timer_config(&PWMTimer);
@@ -188,7 +192,7 @@ bool GDS_Init( struct GDS_Device* Device ) {
             .channel    = Device->Backlight.Channel,
             .duty       = Device->Backlight.PWM,
             .gpio_num   = Device->Backlight.Pin,
-            .speed_mode = LEDC_HIGH_SPEED_MODE,
+            .speed_mode = LEDC_HIGH_SPEED_MODE,  
             .hpoint     = 0,
             .timer_sel  = PWMConfig.Timer,
         };

+ 3 - 1
components/services/accessors.c

@@ -27,7 +27,7 @@
 #include "soc/efuse_periph.h"
 #include "driver/gpio.h"
 #include "driver/spi_common_internal.h"
-#include "esp32/rom/efuse.h"
+//#include "esp32/rom/efuse.h"
 #include "tools.h"
 #include "monitor.h"
 #include "messaging.h"
@@ -1044,6 +1044,7 @@ cJSON * get_psram_gpio_list(cJSON * list){
 	const char * spihd_sd2_io = "spihd_sd2_io";
 	cJSON * llist=list;
 	
+#if CONFIG_IDF_TARGET_ESP32    
     uint32_t chip_ver = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_PKG);
     uint32_t pkg_ver = chip_ver & 0x7;
     if (pkg_ver == EFUSE_RD_CHIP_VER_PKG_ESP32D2WDQ5) {
@@ -1102,6 +1103,7 @@ cJSON * get_psram_gpio_list(cJSON * list){
 		cJSON_AddItemToArray(list,get_gpio_entry(clk,flash_dev,EFUSE_SPICONFIG_RET_SPICLK(spiconfig),true));
 		cJSON_AddItemToArray(list,get_gpio_entry(cs,flash_dev,EFUSE_SPICONFIG_RET_SPICS0(spiconfig),true));
 	}
+#endif    
     return llist;	
 }
 

+ 4 - 0
components/services/led.c

@@ -27,6 +27,10 @@
 #define MAX_LED	8
 #define BLOCKTIME	10	// up to portMAX_DELAY
 
+#ifdef CONFIG_IDF_TARGET_ESP32S3
+#define LEDC_HIGH_SPEED_MODE LEDC_SPEED_MODE_MAX
+#endif
+
 static const char *TAG = "led";
 
 static EXT_RAM_ATTR struct led_s {

+ 4 - 0
components/services/services.c

@@ -133,7 +133,11 @@ void services_init(void) {
 	ledc_timer_config_t pwm_timer = {
 		.duty_resolution = LEDC_TIMER_13_BIT, 
 		.freq_hz = 5000,                     
+#ifdef CONFIG_IDF_TARGET_ESP32S3
+        .speed_mode = LEDC_SPEED_MODE_MAX,
+#else
 		.speed_mode = LEDC_HIGH_SPEED_MODE,  
+#endif    
 		.timer_num = pwm_system.timer,
 	};
 	

+ 2 - 2
components/squeezelite/CMakeLists.txt

@@ -6,17 +6,17 @@ idf_component_register( SRC_DIRS . external ac101 tas57xx wm8978
 									esp_common 
 									esp-dsp
 						  			platform_config 
-						 			driver_bt 
 						 			services 
 									spotify
 						 			raop   
 						 			display
 						 			tools
 						 			audio
-									_override
 						EMBED_FILES vu_s.data arrow.data
 )
 
+#									_override
+
 set_source_files_properties(mad.c pcm.c flac.c alac.c helix-aac.c vorbis.c opus.c
     PROPERTIES COMPILE_FLAGS
     -Wno-maybe-uninitialized 

+ 2 - 2
components/wifi-manager/CMakeLists.txt

@@ -3,8 +3,8 @@ set( WEBPACK_DIR webapp/webpack/dist )
 
 idf_component_register( SRC_DIRS . webapp UML-State-Machine-in-C/src
 						INCLUDE_DIRS . webapp UML-State-Machine-in-C/src
-						REQUIRES squeezelite-ota json mdns 
-						PRIV_REQUIRES tools services platform_config esp_common json newlib freertos spi_flash nvs_flash mdns pthread wpa_supplicant platform_console esp_http_server console driver_bt
+						REQUIRES squeezelite-ota json mdns
+						PRIV_REQUIRES tools services platform_config esp_common json newlib freertos spi_flash nvs_flash mdns pthread wpa_supplicant platform_console esp_http_server console
 )
 
 include(webapp/webapp.cmake)

+ 3 - 2
main/CMakeLists.txt

@@ -1,7 +1,8 @@
 idf_component_register(SRC_DIRS . 
-					PRIV_REQUIRES _override esp_common wifi-manager pthread squeezelite-ota platform_console telnet display targets
-					LDFRAGMENTS "linker.lf"
+					PRIV_REQUIRES esp_common wifi-manager pthread squeezelite-ota platform_console telnet display targets
                     	)
+#					LDFRAGMENTS "linker.lf"                                           
+#PRIV_REQUIRES _override esp_common wifi-manager pthread squeezelite-ota platform_console telnet display targets                        
 #get_target_property(ill ${COMPONENT_LIB} INTERFACE_LINK_LIBRARIES)
 #message("${COMPONENT_LIB} INTERFACE_LINK_LIBRARIES = ${ill}")
 

+ 5 - 0
main/esp_app_main.c

@@ -63,6 +63,11 @@ RTC_NOINIT_ATTR uint32_t RecoveryRebootCounter ;
 RTC_NOINIT_ATTR uint16_t ColdBootIndicatorFlag;
 bool cold_boot=true;
 
+#ifdef CONFIG_IDF_TARGET_ESP32S3
+extern const char _ctype_[];
+const char* __ctype_ptr__ = _ctype_;
+#endif
+
 static bool bNetworkConnected=false;
 
 // as an exception _init function don't need include