Skip to content

Commit 87e3910

Browse files
authored
Merge branch 'next' into 20251102-add-tinyusb-component
2 parents 080e482 + 7c0271f commit 87e3910

File tree

8 files changed

+312
-172
lines changed

8 files changed

+312
-172
lines changed

content/components/display/epaper_spi.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,34 @@ better integration with ESPHome's async architecture.
1515
The communication method uses 4-wire [SPI](#spi), so you need to have an `spi:` section in your
1616
configuration.
1717

18+
The driver supports a number of displays and there are also specific configurations for ESP32 boards with integrated displays.
19+
For those boards the predefined configuration will set the correct pins and dimensions for the display.
20+
1821
```yaml
1922
display:
2023
- platform: epaper_spi
21-
cs_pin: GPIOXX
22-
dc_pin: GPIOXX
23-
busy_pin: GPIOXX
24-
reset_pin: GPIOXX
25-
model: 7.3in-spectra-e6
24+
model: Seeed-reTerminal-E1002
2625
lambda: |-
2726
it.filled_circle(it.get_width() / 2, it.get_height() / 2, 50, Color::BLACK);
2827
```
2928
30-
## Configuration variables
29+
## Supported displays
3130
32-
- **cs_pin** (**Required**, [Pin Schema](#config-pin_schema)): The CS pin.
33-
- **dc_pin** (**Required**, [Pin Schema](#config-pin_schema)): The DC pin.
34-
- **model** (**Required**): The model of the ePaper display. Currently supported:
31+
| Model name | Manufacturer | Product Description |
32+
|------------------------|--------------|------------------------------------------------------------|
33+
| Spectra-E6 | Eink | <https://www.eink.com/brand/detail/Spectra6> |
34+
| Seeed-reTerminal-E1002 | Seeed Studio | <https://www.seeedstudio.com/reTerminal-E1002-p-6533.html> |
35+
36+
## Configuration variables
3537
36-
- `7.3in-spectra-e6` - 7.3" Spectra E6 6-color display (800×480 pixels)
38+
When using a model defining an integrated ESP32 display board most of the configuration such as the pins and dimensions will be set by default,
39+
but can be overridden if needed.
3740
38-
- **busy_pin** (*Optional*, [Pin Schema](#config-pin_schema)): The BUSY pin. Defaults to not connected.
39-
- **reset_pin** (*Optional*, [Pin Schema](#config-pin_schema)): The RESET pin. Defaults to not connected.
41+
- **model** (**Required**): The model of the ePaper display. See the table above for options.
42+
- **cs_pin** (**Required**, [Pin Schema](#config-pin_schema)): The CS pin. Predefined for integrated boards.
43+
- **dc_pin** (**Required**, [Pin Schema](#config-pin_schema)): The DC pin. Predefined for integrated boards.
44+
- **busy_pin** (*Optional*, [Pin Schema](#config-pin_schema)): The BUSY pin, if used.
45+
- **reset_pin** (*Optional*, [Pin Schema](#config-pin_schema)): The RESET pin, if used.
4046
Make sure you pull this pin high (by connecting it to 3.3V with a resistor) if not connected to a GPIO pin.
4147
4248
- **rotation** (*Optional*): Set the rotation of the display. Everything you draw in `lambda:` will be rotated

content/components/display/mipi_spi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ boards and chips, but the driver is also designed to be customisable in YAML for
2929
## Supported boards and driver chips
3030

3131
The driver supports a number of display driver chips, and can be configured for custom displays. As well as support for
32-
driver chips, there are also specific configurations for several ESP32 boards with integrated displays. For tbose boards
32+
driver chips, there are also specific configurations for several ESP32 boards with integrated displays. For those boards
3333
the predefined configuration will set the correct pins and dimensions for the display.
3434

3535
For custom displays, the driver can be configured with the correct pins and dimensions, and the driver chip can be

content/components/esp32.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ esp32:
148148
- **enable_idf_experimental_features** (*Optional*, boolean): Can be set to `true` to enable experimental features. Use of
149149
experimental features may cause instability or other issues.
150150

151+
- **loop_task_stack_size** (*Optional*, int): Loop task stack size in bytes. Increase if experiencing stack overflow
152+
errors (e.g., with complex code or deep recursion). Higher values reduce heap availability. Valid range is 8192-32768
153+
bytes. Defaults to 8192 bytes.
154+
151155
**LWIP Optimization Options (ESP-IDF only):**
152156

153157
The following options are available under the `advanced` section when using the ESP-IDF framework to optimize

content/components/i2c.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ params:
99

1010
{{< anchor "i2c" >}}
1111

12-
This component sets up the I²C bus for your ESP32 or ESP8266. In order for these components
12+
This component sets up the I²C bus for your ESP32, ESP8266, RP2040 or NRF52. In order for these components
1313
to work correctly, you need to define the I²C bus in your configuration. Please note the ESP
1414
will enable its internal 10kΩ pullup resistors for these pins, so you usually don't need to
1515
put on external ones. You can use multiple devices on one I²C bus as each device is given a
@@ -39,7 +39,8 @@ i2c:
3939
Defaults to `true`.
4040

4141
- **frequency** (*Optional*, float): Set the frequency the I²C bus should operate on.
42-
Defaults to `50kHz`. Values are `10kHz`, `50kHz`, `100kHz`, `200kHz`, ... `800kHz`
42+
Defaults to `50kHz`. Default for NRF52 is `100kHz`. Values are `10kHz`, `50kHz`, `100kHz`, `200kHz`, ... `800kHz`.
43+
NRF52 supports only `100kHz` and `400kHz`.
4344

4445
- **timeout** (*Optional*, [Time](#config-time)): Set the I²C bus timeout.
4546
Defaults to the framework defaults (`100us` on `esp32` with `esp-idf`, `50ms` on `esp32` with `Arduino`,

content/components/lvgl/_index.md

Lines changed: 0 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -501,162 +501,6 @@ on_...:
501501
border_color: 0x00FF00
502502
```
503503

504-
{{< anchor "lvgl-layouts" >}}
505-
506-
### Layouts
507-
508-
Layouts aim to position widgets automatically, eliminating the need to specify `x` and `y` coordinates to position each widget. This is a great way to simplify your configuration as it allows you to omit alignment options.
509-
510-
The layout configuration options are applied to any parent widget or page, influencing the appearance of the children. The position and size calculated by the layout overwrites the *normal* `x`, `y`, `width`, and `height` settings of the children.
511-
512-
Check out [Flex layout positioning](#lvgl-cookbook-flex), [Grid layout positioning](#lvgl-cookbook-grid) and [Weather forecast panel](#lvgl-cookbook-weather) in the Cookbook for examples which demonstrate how to automate widget positioning, potentially reducing the size of your device's YAML configuration, and saving you from lots of manual calculations.
513-
514-
The `hidden`, `ignore_layout` and `floating` [flags](#lvgl-widget-flags) can be used on widgets to ignore them in layout calculations.
515-
516-
#### Configuration variables
517-
518-
- **layout** (*Optional*, dict): A dictionary describing the layout configuration:
519-
- **type** (*Optional*, string): `FLEX`, `GRID` or `NONE`. Defaults to `NONE`.
520-
- Further options from below depending on the chosen type.
521-
522-
#### Flex
523-
524-
The Flex layout in LVGL is a subset implementation of [CSS Flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/).
525-
526-
It can arrange items into rows or columns (tracks), handle wrapping, adjust spacing between items and tracks and even handle growing the layout to make the item(s) fill the remaining space with respect to minimum/maximum width and height.
527-
528-
**Terms used:**
529-
530-
- *track*: the rows or columns *main* direction flow: row or column in the direction in which the items are placed one after the other.
531-
- *cross direction*: perpendicular to the main direction.
532-
- *wrap*: if there is no more space in the track a new track is started.
533-
- *gap*: the space between the rows and columns or the items on a track.
534-
- *grow*: if set on an item it will grow to fill the remaining space on the track. The available space will be distributed among items respective to their grow value (larger value means more space). It dictates what amount of the available space the widget should take up. For example if all items on the track have a `grow` set to `1`, the space in the track will be distributed equally to all of them. If one of the items has a value of 2, that one would take up twice as much of the space as either one of the others.
535-
536-
**Configuration variables:**
537-
538-
- **flex_flow** (*Optional*, string): Select the arrangement of the children widgets:
539-
- `ROW` : place the children in a row without wrapping.
540-
- `COLUMN` : place the children in a column without wrapping.
541-
- `ROW_WRAP` : place the children in a row with wrapping (default).
542-
- `COLUMN_WRAP` : place the children in a column with wrapping.
543-
- `ROW_REVERSE` : place the children in a row without wrapping but in reversed order.
544-
- `COLUMN_REVERSE` : place the children in a column without wrapping but in reversed order.
545-
- `ROW_WRAP_REVERSE` : place the children in a row with wrapping but in reversed order.
546-
- `COLUMN_WRAP_REVERSE` : place the children in a column with wrapping but in reversed order.
547-
548-
- **flex_align_main** (*Optional*, string): Determines how to distribute the items in their track on the *main* axis. For example, flush the items to the right on with `flex_flow: ROW_WRAP` (known as *justify-content* in CSS). Possible options below.
549-
- **flex_align_cross** (*Optional*, string): Determines how to distribute the items in their track on the *cross* axis. For example, if the items have different height place them to the bottom of the track (known as *align-items* in CSS). Possible options below.
550-
- **flex_align_track** (*Optional*, string): Determines how to distribute the tracks (known as *align-content* in CSS). Possible options below.
551-
552-
Values for use with `flex_align_main`, `flex_align_cross`, `flex_align_track` :
553-
554-
- `START` : means left horizontally and top vertically (default).
555-
- `END` : means right horizontally and bottom vertically.
556-
- `CENTER` : simply center.
557-
- `SPACE_EVENLY` : items are distributed so that the spacing between any two items (and the space to the edges) is equal. Does not apply to `flex_align_track`.
558-
- `SPACE_AROUND` : items are evenly distributed in the track with equal space around them. Note that visually the spaces aren't equal, since all the items have equal space on both sides. The first item will have one unit of space against the container edge, but two units of space between the next item because that next item has its own spacing that applies. Does not apply to `flex_align_track`.
559-
- `SPACE_BETWEEN` : items are evenly distributed in the track: first item is on the start line, last item on the end line. Does not apply to `flex_align_track`.
560-
561-
- **pad_row** (*Optional*, int16): Set the padding between the rows, in pixels.
562-
- **pad_column** (*Optional*, int16): Set the padding between the columns, in pixels.
563-
- **flex_grow** (*Optional*, int16): Can be used to make one or more children fill the available space on the track. When one or more children have `flex_grow` set, the available space will be distributed proportionally to the grow values. Defaults to `0`, which disables growing.
564-
565-
```yaml
566-
# Example flex layout
567-
568-
- obj:
569-
layout:
570-
type: flex
571-
pad_row: 4
572-
pad_column: 4px
573-
flex_align_main: center
574-
flex_align_cross: start
575-
flex_align_track: end
576-
widgets:
577-
- animimg:
578-
flex_grow: 1
579-
```
580-
581-
#### Grid
582-
583-
The Grid layout in LVGL is a subset implementation of [CSS Grid](https://css-tricks.com/snippets/css/complete-guide-grid//).
584-
585-
It can arrange items into a 2D "table" that has rows or columns (tracks). The item(s) can span through multiple columns or rows. The track's size can be set in pixels, to the largest item of the track (`CONTENT` ) or in "free units" to distribute the free space proportionally.
586-
587-
**Terms used:**
588-
589-
- *tracks*: the rows or the columns.
590-
- *gap*: the space between the rows and columns or the items on a track.
591-
- *free unit (FR)*: a proportional distribution unit for the space available on the track. It accepts a unitless integer value that serves as a proportion. It dictates what amount of the available space the widget should take up. For example if all items on the track have a `FR` set to `1`, the space in the track will be distributed equally to all of them. If one of the items has a value of 2, that one would take up twice as much of the space as either one of the others.
592-
593-
Child widgets can be placed on the grid using the `grid_cell_row_pos` and `grid_cell_column_pos` configuration variables.
594-
If either is specified both must be specified. If neither is specified the widget will be placed in the first available position, in a row-major order.
595-
Row and column spans will be taken into account when reserving space.
596-
597-
**Configuration variables (must be placed under the layout key):**
598-
599-
- **grid_rows** (**Required**): The number of rows in the grid, expressed a list of values in pixels, `CONTENT` or `FR(n)` (free units, where `n` is a proportional integer value).
600-
- **grid_columns** (**Required**): The number of columns in the grid, expressed a list of values in pixels, `CONTENT` or `FR(n)` (free units, where `n` is a proportional integer value).
601-
- **grid_row_align** (*Optional*, string): How to align the row. Works only when `grid_rows` is given in pixels. Possible options below.
602-
- **grid_column_align** (*Optional*, string): How to align the column. Works only when `grid_columns` is given in pixels. Possible options below.
603-
- **pad_row** (*Optional*, int16): Set the padding between the rows, in pixels.
604-
- **pad_column** (*Optional*, int16): Set the padding between the columns, in pixels.
605-
606-
In a grid layout, *all the widgets placed on the grid* can have some additional configuration variables to help with placement:
607-
608-
- **grid_cell_row_pos** (*Optional*, int16): Position of the widget, in which row to appear (0 based count).
609-
- **grid_cell_column_pos** (*Optional*, int16): Position of the widget, in which column to appear (0 based count).
610-
- **grid_cell_x_align** (*Optional*, string): How to align the widget horizontally within the cell. Can also be applied through [Style properties](#lvgl-styling). Possible options below.
611-
- **grid_cell_y_align** (*Optional*, string): How to align the widget vertically within the cell. Can also be applied through [Style properties](#lvgl-styling). Possible options below.
612-
- **grid_cell_row_span** (*Optional*, int16): How many rows to span across the widget. Defaults to `1`.
613-
- **grid_cell_column_span** (*Optional*, int16): How many columns to span across the widget.. Defaults to `1`.
614-
615-
> [!NOTE]
616-
> These `grid_cell_` variables are applied to individual widgets (cells) within the grid layout!
617-
618-
Values for use with `grid_column_align`, `grid_row_align`, `grid_cell_x_align`, `grid_cell_y_align` :
619-
620-
- `START` : means left horizontally and top vertically (default).
621-
- `END` : means right horizontally and bottom vertically.
622-
- `CENTER` : simply center.
623-
- `STRETCH` : stretch the widget to the cell in the respective direction. Does not apply to `grid_column_align`, `grid_row_align`.
624-
- `SPACE_EVENLY` : items are distributed so that the spacing between any two items (and the space to the edges) is equal.
625-
- `SPACE_AROUND` : items are evenly distributed in the track with equal space around them. Note that visually the spaces aren't equal, since all the items have equal space on both sides. The first item will have one unit of space against the container edge, but two units of space between the next item because that next item has its own spacing that applies.
626-
- `SPACE_BETWEEN` : items are evenly distributed in the track: first item is on the start line, last item on the end line.
627-
628-
```yaml
629-
# Example grid layout
630-
631-
- obj:
632-
layout:
633-
type: grid
634-
grid_row_align: end
635-
grid_rows: [25px, fr(1), content]
636-
grid_columns: [fr(1), fr(1)]
637-
pad_row: 6px
638-
pad_column: 0
639-
widgets:
640-
- image:
641-
grid_cell_row_pos: 0
642-
grid_cell_column_pos: 0
643-
- obj:
644-
grid_cell_row_pos: 0
645-
grid_cell_column_pos: 1
646-
- obj:
647-
grid_cell_row_pos: 2
648-
grid_cell_column_pos: 0
649-
- label:
650-
text: "This will be placed in row 1, column 0"
651-
- label:
652-
text: "This will be placed in row 1, column 1"
653-
- label:
654-
text: "This will be placed in row 2, column 1, since 2/0 is occupied"
655-
```
656-
657-
> [!TIP]
658-
> To visualize real, calculated sizes of transparent widgets you can temporarily set `outline_width: 1` on them.
659-
660504
{{< anchor "lvgl-gradients" >}}
661505

662506
### Gradients
146 KB
Loading

0 commit comments

Comments
 (0)