# stojanmar/esp32s3_sdr_guition architecture

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

- Interactive diagram: https://gitdiagram.com/stojanmar/esp32s3_sdr_guition
- Repository: https://github.com/stojanmar/esp32s3_sdr_guition

## Overview

This repository is firmware for an ESP32-S3 software-defined radio receiver, controlled through a touchscreen. The principal workflow is touch interaction to tune reception and select a mode or bandwidth, followed by sampled-signal processing and display of audio-related status and spectrum views. The README documents LSB, USB, AM, and NFM reception, adjustable RF input, frequency steps, and spectrum/waterfall graphics; the source excerpts show touch-driven settings, FIR setup, and rendering helpers. Several runtime headers are unsampled, so their internal call relationships are not asserted.

Main entry points: [`GuituSDR7/tools.h`](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/tools.h) (Touch settings), [`GuituSDR7/GuituSDR7.ino`](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/GuituSDR7.ino) (Firmware entry), [`GuituSDR7/screens.h`](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/screens.h) (Screen rendering), [`GuituSDR7/rx.h`](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/rx.h) (Receiver processing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Touch control"]
  node_firmware["Firmware entry<br/>[GuituSDR7.ino]"]
  node_touch_settings["Touch settings<br/>[tools.h]"]
  node_touch_config["Touch configuration<br/>[touch_config.h]"]
  node_gt911["GT911 driver<br/>[TAMC_GT911.cpp]"]
end

subgraph group_radio["Radio signal path"]
  node_receiver["Receiver processing<br/>[rx.h]"]
  node_filter_runtime["FIR filter setup<br/>[filters.h]"]
  node_filter_coeffs["Filter coefficients<br/>[coefficients.h]"]
  node_fft["FFT analysis<br/>[fft.h]"]
  node_frequency_control["Frequency control<br/>[losi5351.h]"]
  node_transceiver_state["Radio state<br/>[global.h]"]
  node_radio_init["Radio initialization<br/>[init.h]"]
end

subgraph group_visual["Display and analysis"]
  node_screen_views["Screen rendering<br/>[screens.h]"]
  node_screen_assets["Display assets<br/>[images.h]"]
  node_font_assets["Font assets<br/>[FreeMonoBold14.h]"]
end

subgraph group_protocol["Radio interface"]
  node_g90_protocol["G90 protocol<br/>[g90.h]"]
  node_crc["CRC utilities<br/>[crc32.h]"]
  node_txrx["TX/RX control<br/>[txrx.h]"]
end

node_operator(("Radio operator"))

node_operator -->|"sets radio controls"| node_touch_settings
node_touch_settings -->|"uses touch input"| node_touch_config
node_touch_settings -->|"changes frequency"| node_frequency_control
node_touch_settings -->|"selects filter"| node_filter_runtime
node_operator -.->|"uses radio"| node_firmware
node_firmware -.->|"initializes radio"| node_radio_init
node_radio_init -.->|"starts reception"| node_receiver
node_receiver -.->|"processes samples"| node_filter_runtime
node_filter_runtime -->|"loads coefficients"| node_filter_coeffs
node_receiver -.->|"analyzes samples"| node_fft
node_touch_settings -.->|"updates settings"| node_transceiver_state
node_screen_views -.->|"renders status"| node_transceiver_state
node_screen_views -.->|"draws graphics"| node_screen_assets
node_screen_views -.->|"renders text"| node_font_assets
node_g90_protocol -->|"uses checksum"| node_crc
node_firmware -.->|"communicates with radio"| node_g90_protocol
node_firmware -.->|"controls radio mode"| node_txrx
node_touch_config -.->|"alternate touch driver"| node_gt911

click node_firmware "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/GuituSDR7.ino"
click node_touch_settings "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/tools.h"
click node_touch_config "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/touch_config.h"
click node_gt911 "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/src/tamc_gt911/TAMC_GT911.cpp"
click node_receiver "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/rx.h"
click node_filter_runtime "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/filters.h"
click node_filter_coeffs "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/coefficients.h"
click node_fft "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/fft.h"
click node_frequency_control "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/losi5351.h"
click node_transceiver_state "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/global.h"
click node_radio_init "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/init.h"
click node_screen_views "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/screens.h"
click node_screen_assets "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/include/images.h"
click node_font_assets "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/include/FreeMonoBold14.h"
click node_g90_protocol "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/g90.h"
click node_crc "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/crc32.h"
click node_txrx "https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/txrx.h"

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_firmware,node_touch_settings,node_touch_config,node_gt911 toneBlue
class node_receiver,node_filter_runtime,node_filter_coeffs,node_fft,node_frequency_control,node_transceiver_state,node_radio_init toneAmber
class node_screen_views,node_screen_assets,node_font_assets toneMint
class node_g90_protocol,node_crc,node_txrx toneRose
class node_operator toneIndigo
```

## Components

### Touch control

- [Firmware entry](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/GuituSDR7.ino): `GuituSDR7/GuituSDR7.ino`
- [Touch settings](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/tools.h): `GuituSDR7/tools.h`
- [Touch configuration](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/touch_config.h): `GuituSDR7/touch_config.h`
- [GT911 driver](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/src/tamc_gt911/TAMC_GT911.cpp): `GuituSDR7/src/tamc_gt911/TAMC_GT911.cpp`

### Radio signal path

- [Receiver processing](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/rx.h): `GuituSDR7/rx.h`
- [FIR filter setup](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/filters.h): `GuituSDR7/filters.h`
- [Filter coefficients](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/coefficients.h): `GuituSDR7/coefficients.h`
- [FFT analysis](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/fft.h): `GuituSDR7/fft.h`
- [Frequency control](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/losi5351.h): `GuituSDR7/losi5351.h`
- [Radio state](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/global.h): `GuituSDR7/global.h`
- [Radio initialization](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/init.h): `GuituSDR7/init.h`

### Display and analysis

- [Screen rendering](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/screens.h): `GuituSDR7/screens.h`
- [Display assets](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/include/images.h): `GuituSDR7/include/images.h`
- [Font assets](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/include/FreeMonoBold14.h): `GuituSDR7/include/FreeMonoBold14.h`

### Radio interface

- [G90 protocol](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/g90.h): `GuituSDR7/g90.h`
- [CRC utilities](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/crc32.h): `GuituSDR7/crc32.h`
- [TX/RX control](https://github.com/stojanmar/esp32s3_sdr_guition/blob/main/GuituSDR7/txrx.h): `GuituSDR7/txrx.h`

### Other components

- **Radio operator**

## Connections

- Radio operator → Touch settings: sets radio controls (evidence: `README.md`)
- Touch settings → Touch configuration: uses touch input (evidence: `GuituSDR7/tools.h`)
- Touch settings → Frequency control: changes frequency (evidence: `GuituSDR7/tools.h`)
- Touch settings → FIR filter setup: selects filter (evidence: `GuituSDR7/tools.h`)
- Radio operator → Firmware entry: uses radio
- Firmware entry → Radio initialization: initializes radio
- Radio initialization → Receiver processing: starts reception
- Receiver processing → FIR filter setup: processes samples
- FIR filter setup → Filter coefficients: loads coefficients (evidence: `GuituSDR7/filters.h`)
- Receiver processing → FFT analysis: analyzes samples
- Touch settings → Radio state: updates settings
- Screen rendering → Radio state: renders status
- Screen rendering → Display assets: draws graphics
- Screen rendering → Font assets: renders text
- G90 protocol → CRC utilities: uses checksum (evidence: `GuituSDR7/g90.h`)
- Firmware entry → G90 protocol: communicates with radio
- Firmware entry → TX/RX control: controls radio mode
- Touch configuration → GT911 driver: alternate touch driver
