From ccf214fbe229be9bb97721ce15ead3a8d4ce6a4c Mon Sep 17 00:00:00 2001 From: philippe44 Date: Tue, 14 Jan 2020 18:22:47 -0800 Subject: [PATCH] config update --- components/services/globdefs.h | 6 +++--- components/services/services.c | 2 -- main/Kconfig.projbuild | 27 +++++++++++++++++++++++---- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/components/services/globdefs.h b/components/services/globdefs.h index 33470606..3d2b1f50 100644 --- a/components/services/globdefs.h +++ b/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 - - - diff --git a/components/services/services.c b/components/services/services.c index 5e908aea..0ab8c7b6 100644 --- a/components/services/services.c +++ b/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(); diff --git a/main/Kconfig.projbuild b/main/Kconfig.projbuild index 451016dd..3c2fb289 100644 --- a/main/Kconfig.projbuild +++ b/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=,height=,sda=,scl= - SPI,width=,height=,data=,clock=,select= + Set parameters for display screen, leave empty for no screen + I2C,width=,height= + SPI,width=,height=,select= 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=,scl=,speed=,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 \ No newline at end of file