From 5d255ea502d227f85fd69e8a637958753305775b Mon Sep 17 00:00:00 2001 From: philippe44 Date: Fri, 10 Dec 2021 23:25:05 -0800 Subject: [PATCH 1/3] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 3027e355..cb7d89c6 100644 --- a/README.md +++ b/README.md @@ -269,8 +269,7 @@ model=,addr=,[,port=system|dac][,base=|100][,count=|16][,intr - count: number of GPIO of expander (default 16 - might be obsolted if model if sufficient to decide) - intr: real GPIO to use as interrupt. -Each expander must be -Note that PWM ("led_brightness" below) is not supported for expanded GPIOs and they cannot be used for high speed or precise timing signals like CS, D/C, Reset and Ready. Buttons, rotary encoder, amplifier control and power are supported. Depending on the actual chipset, pullup or pulldown might be supported so you might have to add external resistors (only MCP23x17 does pullup) +Note that PWM ("led_brightness" below) is not supported for expanded GPIOs and they cannot be used for high speed or precise timing signals like CS, D/C, Reset and Ready. Buttons, rotary encoder, amplifier control and power are supported. Depending on the actual chipset, pullup or pulldown might be supported so you might have to add external resistors (only MCP23x17 does pullup). Note that the same interrupt can be shared accross expanders, as long as they are using open drain or open collectors (which they probably all do) ### LED See §**set_GPIO** for how to set the green and red LEDs. In addition, their brightness can be controlled using the "led_brigthness" parameter. The syntax is ``` From a60cbe53e267bc11f05b6993c5bedbe114c97173 Mon Sep 17 00:00:00 2001 From: philippe44 Date: Fri, 10 Dec 2021 23:26:51 -0800 Subject: [PATCH 2/3] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cb7d89c6..dda01cc5 100644 --- a/README.md +++ b/README.md @@ -251,8 +251,8 @@ Syntax is: You can define the defaults for jack, spkfault leds at compile time but nvs parameter takes precedence except for well-known configurations where these are forced at runtime. **Note that gpio 36 and 39 are input only and cannot use interrupt. When set to jack or speaker fault, a 100ms polling checks their value but that's expensive** -### GPIO expander -It is possible to add GPIO expanders using I2C bus. They should mainly be used for buttons but they can support generic-purpose outputs as well. These additional GPIOs can be numbered starting from an arbitrary value (40 and above as esp32 has GPIO 0..39). Then these new "virtual" GPIOs from (e.g) 100 to 115 can be used in button configuration, set_GPIO or other config settings. +### GPIO expanders +It is possible to add GPIO expanders using I2C or SPI bus. They should mainly be used for buttons but they can support generic-purpose outputs as well. These additional GPIOs can be numbered starting from an arbitrary value (40 and above as esp32 has GPIO 0..39). Then these new "virtual" GPIOs from (e.g) 100 to 115 can be used in button configuration, set_GPIO or other config settings. Each expander can support up to 32 GPIO. To use an expander for buttons, an interrupt must be provided, polling mode is not acceptable. An expander w/o interruption can still be configured, but only output will be usable. From 333b295471883e201ac8c8c2e5c02dad0c7d7853 Mon Sep 17 00:00:00 2001 From: philippe44 Date: Fri, 10 Dec 2021 23:27:28 -0800 Subject: [PATCH 3/3] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dda01cc5..599ec6e6 100644 --- a/README.md +++ b/README.md @@ -254,7 +254,7 @@ You can define the defaults for jack, spkfault leds at compile time but nvs para ### GPIO expanders It is possible to add GPIO expanders using I2C or SPI bus. They should mainly be used for buttons but they can support generic-purpose outputs as well. These additional GPIOs can be numbered starting from an arbitrary value (40 and above as esp32 has GPIO 0..39). Then these new "virtual" GPIOs from (e.g) 100 to 115 can be used in button configuration, set_GPIO or other config settings. -Each expander can support up to 32 GPIO. To use an expander for buttons, an interrupt must be provided, polling mode is not acceptable. An expander w/o interruption can still be configured, but only output will be usable. +Each expander can support up to 32 GPIO. To use an expander for buttons, an interrupt must be provided, polling mode is not acceptable. An expander w/o interruption can still be configured, but only output will be usable. Note that the same interrupt can be shared accross expanders, as long as they are using open drain or open collectors (which they probably all do) The parameter "gpio_exp_config" is a semicolon (;) separated list with following syntax for each expander ``` @@ -269,7 +269,7 @@ model=,addr=,[,port=system|dac][,base=|100][,count=|16][,intr - count: number of GPIO of expander (default 16 - might be obsolted if model if sufficient to decide) - intr: real GPIO to use as interrupt. -Note that PWM ("led_brightness" below) is not supported for expanded GPIOs and they cannot be used for high speed or precise timing signals like CS, D/C, Reset and Ready. Buttons, rotary encoder, amplifier control and power are supported. Depending on the actual chipset, pullup or pulldown might be supported so you might have to add external resistors (only MCP23x17 does pullup). Note that the same interrupt can be shared accross expanders, as long as they are using open drain or open collectors (which they probably all do) +Note that PWM ("led_brightness" below) is not supported for expanded GPIOs and they cannot be used for high speed or precise timing signals like CS, D/C, Reset and Ready. Buttons, rotary encoder, amplifier control and power are supported. Depending on the actual chipset, pullup or pulldown might be supported so you might have to add external resistors (only MCP23x17 does pullup). ### LED See §**set_GPIO** for how to set the green and red LEDs. In addition, their brightness can be controlled using the "led_brigthness" parameter. The syntax is ```