浏览代码

config update

philippe44 5 年之前
父节点
当前提交
ccf214fbe2
共有 3 个文件被更改,包括 26 次插入9 次删除
  1. 3 3
      components/services/globdefs.h
  2. 0 2
      components/services/services.c
  3. 23 4
      main/Kconfig.projbuild

+ 3 - 3
components/services/globdefs.h

@@ -28,7 +28,7 @@ extern int i2c_system_port;
 #define SPKFAULT_GPIO	2			// this requires a pull-up, so can't be >34
 #define LED_GREEN_GPIO 	12
 #define LED_RED_GPIO	13
+#else 
+#define LED_GREEN_GPIO	CONFIG_LED_GREEN_GPIO
+#define LED_RED_GPIO	CONFIG_LED_RED_GPIO
 #endif
-
-
-

+ 0 - 2
components/services/services.c

@@ -69,10 +69,8 @@ void services_init(void) {
 
 	ESP_LOGD(TAG,"Configuring LEDs");
 	led_svc_init();
-#ifdef CONFIG_SQUEEZEAMP
 	led_config(LED_GREEN, LED_GREEN_GPIO, 0);
 	led_config(LED_RED, LED_RED_GPIO, 0);
-#endif
 
 	battery_svc_init();
 	monitor_svc_init();

+ 23 - 4
main/Kconfig.projbuild

@@ -192,12 +192,31 @@ menu "Squeezelite-ESP32"
 			string "Screen configuraton"
 			default ""
 			help
-				Set parameters of display screen, leave empty for no screen
-				I2C,width=<size>,height=<size>,sda=<gpio>,scl=<gpio>
-				SPI,width=<size>,height=<size>,data=<gpio>,clock=<gpio>,select=<gpio>
+				Set parameters for display screen, leave empty for no screen
+				I2C,width=<size>,height=<size>
+				SPI,width=<size>,height=<size>,select=<gpio>
 		config DISPLAY_I2C_SPEED
 			int "I2C bus speed"
 				default 250000
 	endmenu	
-
+	
+	menu "Various I/O"
+		config I2C_CONFIG
+			string "I2C system configuration"
+			default ""
+			help
+				Set parameters of shared I2C interface
+				sda=<gpio>,scl=<gpio>,speed=<num>,port=<0|1>
+		config LED_GREEN_GPIO
+			int "Green led GPIO"
+			default -1
+			help
+				Set to -1 for no LED
+		config LED_RED_GPIO				
+			int "Red led GPIO"
+			default -1
+			help
+				Set to -1 for no LED
+	endmenu	
+	
 endmenu