mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-06 03:27:01 +03:00
Add GPIO config for Infrared on SqueezeAMP 3.20
This commit is contained in:
@@ -259,7 +259,7 @@ CONFIG_CSPOT_SINK=y
|
||||
# Various I/O
|
||||
#
|
||||
CONFIG_I2C_CONFIG=""
|
||||
CONFIG_SET_GPIO=""
|
||||
CONFIG_SET_GPIO="0=ir"
|
||||
CONFIG_ROTARY_ENCODER=""
|
||||
# end of Various I/O
|
||||
|
||||
|
||||
@@ -415,7 +415,7 @@ bool create_rotary(void *id, int A, int B, int SW, int long_press, rotary_handle
|
||||
// create companion button if rotary has a switch
|
||||
if (SW != -1) button_create(id, SW, BUTTON_LOW, true, 0, rotary_button_handler, long_press, -1);
|
||||
|
||||
ESP_LOGI(TAG, "Creating rotary encoder A:%d B:%d, SW:%d", A, B, SW);
|
||||
ESP_LOGI(TAG, "Created rotary encoder A:%d B:%d, SW:%d", A, B, SW);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -432,5 +432,7 @@ bool create_infrared(int gpio, infrared_handler handler) {
|
||||
common_task_init();
|
||||
xRingbufferAddToQueueSetRead(infrared.rb, common_queue_set);
|
||||
|
||||
ESP_LOGI(TAG, "Created infrared receiver using GPIO %u", gpio);
|
||||
|
||||
return (infrared.rb != NULL);
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ menu "Squeezelite-ESP32"
|
||||
string
|
||||
default "dc=27,data=19,clk=18" if TWATCH2020
|
||||
default "mosi=15,miso=2,clk=14" if MUSE
|
||||
default ""
|
||||
default ""
|
||||
config DISPLAY_CONFIG
|
||||
string
|
||||
default "SPI,driver=ST7789,width=240,height=240,cs=5,back=12,speed=16000000,HFlip,VFlip" if TWATCH2020
|
||||
@@ -125,7 +125,7 @@ menu "Squeezelite-ESP32"
|
||||
config ETH_CONFIG
|
||||
string
|
||||
default ""
|
||||
# AGGREGATES - end
|
||||
# AGGREGATES - end
|
||||
config DAC_CONTROLSET
|
||||
string
|
||||
default "{ \"init\": [ {\"reg\":41, \"val\":128}, {\"reg\":18, \"val\":255} ], \"poweron\": [ {\"reg\":18, \"val\":64, \"mode\":\"or\"} ], \"poweroff\": [ {\"reg\":18, \"val\":191, \"mode\":\"and\"} ] }" if TWATCH2020
|
||||
@@ -168,6 +168,9 @@ menu "Squeezelite-ESP32"
|
||||
int
|
||||
default 13 if SQUEEZEAMP
|
||||
default -1
|
||||
config SET_GPIO
|
||||
string
|
||||
default "0=ir" if SQUEEZEAMP
|
||||
endmenu
|
||||
|
||||
menu "Audio settings"
|
||||
@@ -342,14 +345,15 @@ menu "Squeezelite-ESP32"
|
||||
data=<gpio>,clk=<gpio>[,d/c=<num>][,host=<0|1|2>]
|
||||
config SET_GPIO
|
||||
string "Special GPIO configuration"
|
||||
default ""
|
||||
help
|
||||
Set parameters of shared GPIO with special values.
|
||||
<gpio_1>=Vcc|GND|amp[:0|1]|jack[:0|1][,<gpio_n>=Vcc|GND|amp[:0|1]|jack[:0|1]]
|
||||
<gpio_1>=Vcc|GND|amp[:0|1]|jack[:0|1][ir][spkfault[:0|1][,<gpio_n>=Vcc|GND|amp[:0|1]|jack[:0|1]]
|
||||
'amp' => GPIO that is set when playback starts
|
||||
'jack' => GPIO used for audio jack detection
|
||||
'green', 'red' => GPIO for status LED
|
||||
'[:0|1] means set the active value for that GPIO can be low or high
|
||||
'spkfault' => GPIO used for speaker fault detection
|
||||
'ir' => GPIO used for Infrared Receiver
|
||||
[:0|1] means set the active value for that GPIO can be low or high
|
||||
config ROTARY_ENCODER
|
||||
string "Rotary Encoder configuration"
|
||||
default ""
|
||||
|
||||
@@ -262,7 +262,7 @@ CONFIG_AIRPLAY_PORT="5000"
|
||||
# Various I/O
|
||||
#
|
||||
CONFIG_I2C_CONFIG=""
|
||||
CONFIG_SET_GPIO=""
|
||||
# CONFIG_SET_GPIO= is not set
|
||||
CONFIG_ROTARY_ENCODER=""
|
||||
# end of Various I/O
|
||||
|
||||
|
||||
Reference in New Issue
Block a user