# volosr/wavesharecomunicators architecture

> Architecture diagram of the GitHub repository volosr/wavesharecomunicators, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/volosr/wavesharecomunicators
- Repository: https://github.com/volosr/wavesharecomunicators

## Overview

This repository is an ESP32-based Waveshare touchscreen interface with a generated SquareLine/LVGL screen, including a telephone-style keypad and text areas. The principal runtime path initializes board peripherals and the LVGL display/input port, creates the UI, and accepts touch-driven button events. Hardware setup, display transport, touch input, and generated UI are distinct stages; the SH8601 panel driver and I2C/PMIC support are internal layers. No README content was provided, and the main sketch and some UI event/helper implementations were not sampled, so those interactions are omitted where unsupported.

Main entry points: [`WaveshareComunicators/bsp_lvgl_port.cpp`](https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/bsp_lvgl_port.cpp) (LVGL board port), [`WaveshareComunicators/WaveshareComunicators.ino`](https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/WaveshareComunicators.ino) (Firmware entry), [`WaveshareComunicators/src/port_bsp/axp2101_bsp.cpp`](https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/src/port_bsp/axp2101_bsp.cpp) (AXP2101 power), [`WaveshareComunicators/lcd_touch.cpp`](https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/lcd_touch.cpp) (Touch panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_board["Board support"]
  node_sketch["Firmware entry"]
  node_config["Board configuration<br/>[user_config.h]"]
  node_i2c["I2C bus<br/>[i2c_bsp.cpp]"]
  node_pmic["AXP2101 power<br/>[axp2101_bsp.cpp]"]
end

subgraph group_display["Display and input"]
  node_lvport["LVGL board port<br/>[bsp_lvgl_port.cpp]"]
  node_touch["Touch panel<br/>[lcd_touch.cpp]"]
end

subgraph group_ui["LVGL interface"]
  node_screen["Keypad screen<br/>[ui_Screen1.c]"]
  node_uiroot["UI initialization<br/>[ui.c]"]
  node_events["UI event handlers<br/>[ui.c]"]
  node_helpers["UI helpers<br/>[ui_helpers.c]"]
end

subgraph group_panel["Panel driver"]
  node_sh8601["SH8601 panel driver<br/>[esp_lcd_sh8601.c]"]
end

node_operator(("Device user"))
node_lcd["LCD hardware"]

node_sketch -.->|"initializes"| node_lvport
node_lvport -->|"configures"| node_config
node_lvport -->|"creates and reads"| node_touch
node_touch -->|"uses bus"| node_i2c
node_pmic -->|"uses bus"| node_i2c
node_lvport -->|"sets power rail"| node_pmic
node_lvport -->|"creates panel"| node_sh8601
node_sh8601 -->|"sends panel commands"| node_lcd
node_lvport -->|"flushes display"| node_lcd
node_sketch -.->|"starts UI"| node_uiroot
node_uiroot -->|"initializes screen"| node_screen
node_screen -.->|"registers handlers"| node_events
node_events -.->|"uses helpers"| node_helpers
node_operator -->|"touches screen"| node_lcd

click node_sketch "https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/WaveshareComunicators.ino"
click node_config "https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/user_config.h"
click node_i2c "https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/src/port_bsp/i2c_bsp.cpp"
click node_pmic "https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/src/port_bsp/axp2101_bsp.cpp"
click node_lvport "https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/bsp_lvgl_port.cpp"
click node_touch "https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/lcd_touch.cpp"
click node_screen "https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/ui_Screen1.c"
click node_uiroot "https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/ui.c"
click node_events "https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/ui.c"
click node_helpers "https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/ui_helpers.c"
click node_sh8601 "https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/src/externLib/esp_lcd_sh8601.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_sketch,node_config,node_i2c,node_pmic,node_operator toneBlue
class node_lvport,node_touch toneAmber
class node_screen,node_uiroot,node_events,node_helpers toneMint
class node_sh8601 toneRose
class node_lcd toneIndigo
```

## Components

### Board support

- [Firmware entry](https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/WaveshareComunicators.ino): `WaveshareComunicators/WaveshareComunicators.ino`
- [Board configuration](https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/user_config.h): `WaveshareComunicators/user_config.h`
- [I2C bus](https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/src/port_bsp/i2c_bsp.cpp): `WaveshareComunicators/src/port_bsp/i2c_bsp.cpp`
- [AXP2101 power](https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/src/port_bsp/axp2101_bsp.cpp): `WaveshareComunicators/src/port_bsp/axp2101_bsp.cpp`

### Display and input

- [LVGL board port](https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/bsp_lvgl_port.cpp): `WaveshareComunicators/bsp_lvgl_port.cpp`
- [Touch panel](https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/lcd_touch.cpp): `WaveshareComunicators/lcd_touch.cpp`

### LVGL interface

- [Keypad screen](https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/ui_Screen1.c): `WaveshareComunicators/ui_Screen1.c`
- [UI initialization](https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/ui.c): `WaveshareComunicators/ui.c`
- [UI event handlers](https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/ui.c): `WaveshareComunicators/ui.c`
- [UI helpers](https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/ui_helpers.c): `WaveshareComunicators/ui_helpers.c`

### Panel driver

- [SH8601 panel driver](https://github.com/volosr/wavesharecomunicators/blob/main/WaveshareComunicators/src/externLib/esp_lcd_sh8601.c): `WaveshareComunicators/src/externLib/esp_lcd_sh8601.c`

### Other components

- **Device user**
- **LCD hardware**

## Connections

- Firmware entry → LVGL board port: initializes
- LVGL board port → Board configuration: configures (evidence: `WaveshareComunicators/bsp_lvgl_port.cpp`)
- LVGL board port → Touch panel: creates and reads (evidence: `WaveshareComunicators/bsp_lvgl_port.cpp`)
- Touch panel → I2C bus: uses bus (evidence: `WaveshareComunicators/lcd_touch.cpp`)
- AXP2101 power → I2C bus: uses bus (evidence: `WaveshareComunicators/src/port_bsp/axp2101_bsp.cpp`)
- LVGL board port → AXP2101 power: sets power rail (evidence: `WaveshareComunicators/bsp_lvgl_port.cpp`)
- LVGL board port → SH8601 panel driver: creates panel (evidence: `WaveshareComunicators/bsp_lvgl_port.cpp`)
- SH8601 panel driver → LCD hardware: sends panel commands (evidence: `WaveshareComunicators/src/externLib/esp_lcd_sh8601.c`)
- LVGL board port → LCD hardware: flushes display (evidence: `WaveshareComunicators/bsp_lvgl_port.cpp`)
- Firmware entry → UI initialization: starts UI
- UI initialization → Keypad screen: initializes screen (evidence: `WaveshareComunicators/ui.c`)
- Keypad screen → UI event handlers: registers handlers
- UI event handlers → UI helpers: uses helpers
- Device user → LCD hardware: touches screen
