# eua/esp32_logicanalyzer architecture

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

- Interactive diagram: https://gitdiagram.com/eua/esp32_logicanalyzer
- Repository: https://github.com/eua/esp32_logicanalyzer

## Overview

This is ESP32 firmware for a SUMP-compatible 16-bit logic analyzer. The documented workflow is to connect PulseView over serial, configure the board and pins, capture digital input with I2S DMA, and return samples using the analyzer protocol; 8/16-bit modes and RLE compression are supported. The header excerpt shows DMA state and sample-processing routines, but does not show the runtime calls that connect them. Relationships below therefore rely on README documentation where possible; unsampled sketch wiring is not inferred.

Main entry points: [`ESP32_LogicAnalyzer_I2S_DMA.ino`](https://github.com/eua/esp32_logicanalyzer/blob/master/ESP32_LogicAnalyzer_I2S_DMA.ino) (I2S DMA capture), [`ESP32_LogicAnalyzer.ino`](https://github.com/eua/esp32_logicanalyzer/blob/master/ESP32_LogicAnalyzer.ino) (SUMP serial interface), [`ESP32_LogicAnalyzer.h`](https://github.com/eua/esp32_logicanalyzer/blob/master/ESP32_LogicAnalyzer.h) (Board configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Firmware runtime"]
  node_sketch["Arduino sketch"]
  node_board_config["Board configuration"]
end

subgraph group_capture["Signal capture"]
  node_dma_capture["I2S DMA capture"]
  node_sample_processing["Sample processing"]
end

subgraph group_protocol["Host protocol"]
  node_sump_serial["SUMP serial interface"]
end

node_pulseview(("PulseView"))

node_pulseview -->|"sends commands"| node_sump_serial
node_board_config -->|"configures pins"| node_dma_capture
node_dma_capture -->|"captures samples"| node_sample_processing
node_sump_serial -->|"returns samples"| node_pulseview

click node_sketch "https://github.com/eua/esp32_logicanalyzer/blob/master/ESP32_LogicAnalyzer.ino"
click node_board_config "https://github.com/eua/esp32_logicanalyzer/blob/master/ESP32_LogicAnalyzer.h"
click node_dma_capture "https://github.com/eua/esp32_logicanalyzer/blob/master/ESP32_LogicAnalyzer_I2S_DMA.ino"
click node_sample_processing "https://github.com/eua/esp32_logicanalyzer/blob/master/ESP32_LogicAnalyzer.h"
click node_sump_serial "https://github.com/eua/esp32_logicanalyzer/blob/master/ESP32_LogicAnalyzer.ino"

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_board_config,node_pulseview toneBlue
class node_dma_capture,node_sample_processing toneAmber
class node_sump_serial toneMint
```

## Components

### Firmware runtime

- [Arduino sketch](https://github.com/eua/esp32_logicanalyzer/blob/master/ESP32_LogicAnalyzer.ino): `ESP32_LogicAnalyzer.ino`
- [Board configuration](https://github.com/eua/esp32_logicanalyzer/blob/master/ESP32_LogicAnalyzer.h): `ESP32_LogicAnalyzer.h`

### Signal capture

- [I2S DMA capture](https://github.com/eua/esp32_logicanalyzer/blob/master/ESP32_LogicAnalyzer_I2S_DMA.ino): `ESP32_LogicAnalyzer_I2S_DMA.ino`
- [Sample processing](https://github.com/eua/esp32_logicanalyzer/blob/master/ESP32_LogicAnalyzer.h): `ESP32_LogicAnalyzer.h`

### Host protocol

- [SUMP serial interface](https://github.com/eua/esp32_logicanalyzer/blob/master/ESP32_LogicAnalyzer.ino): `ESP32_LogicAnalyzer.ino`

### Other components

- **PulseView**

## Connections

- PulseView → SUMP serial interface: sends commands (evidence: `README.md`)
- Board configuration → I2S DMA capture: configures pins (evidence: `README.md`)
- I2S DMA capture → Sample processing: captures samples (evidence: `README.md`)
- SUMP serial interface → PulseView: returns samples (evidence: `README.md`)
