From d31697e7ef9a7e9df1c0f96ee07af92c0b1f9ed0 Mon Sep 17 00:00:00 2001 From: philippe44 Date: Thu, 9 Nov 2023 13:47:08 -0800 Subject: [PATCH] force pad_select for gpio use in dac_controlset - release --- CHANGELOG | 3 +++ components/squeezelite/external/dac_external.c | 1 + 2 files changed, 4 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index a2e3232ee..0573ea829 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2023-11-09 + - force gpio_pad_select_gpio in dac_controlset in case somebody uses UART gpio's (or other pre-programmed) + 2023-11-08 - execute dac_controlset even whne there is no i2s (for gpio) diff --git a/components/squeezelite/external/dac_external.c b/components/squeezelite/external/dac_external.c index 738979081..66777bef3 100644 --- a/components/squeezelite/external/dac_external.c +++ b/components/squeezelite/external/dac_external.c @@ -136,6 +136,7 @@ bool i2c_json_execute(char *set) { if ((action = cJSON_GetObjectItemCaseSensitive(item, "gpio")) != NULL) { cJSON *level = cJSON_GetObjectItemCaseSensitive(item, "level"); ESP_LOGI(TAG, "set GPIO %d at %d", action->valueint, level->valueint); + if (action->valueint < GPIO_NUM_MAX) gpio_pad_select_gpio(action->valueint); gpio_set_direction_x(action->valueint, GPIO_MODE_OUTPUT); gpio_set_level_x(action->valueint, level->valueint); continue;