# chenghongyao/flysky2a_51 architecture

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

- Interactive diagram: https://gitdiagram.com/chenghongyao/flysky2a_51
- Repository: https://github.com/chenghongyao/flysky2a_51

## Overview

This is embedded firmware for a FlySky second-generation receiver running on an STC15W408AS. Its documented user-facing behavior is receiving a wireless link, reporting link and pairing state through an LED, and providing eight-channel SBUS or PPM output plus voltage telemetry. The repository exposes one firmware source file, but its contents were not available in the excerpts; the component breakdown and edges therefore reflect README-documented capabilities only, not inspected internal call structure.

Main entry points: [`flySky2A.c`](https://github.com/chenghongyao/flysky2a_51/blob/master/flySky2A.c) (Receiver Runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_receiver["Receiver Firmware"]
  node_radio["Wireless Link<br/>[flySky2A.c]"]
  node_firmware["Receiver Runtime<br/>[flySky2A.c]"]
end

subgraph group_outputs["Signal Outputs"]
  node_sbus["SBUS Output<br/>[flySky2A.c]"]
  node_ppm["PPM Output<br/>[flySky2A.c]"]
end

subgraph group_feedback["Status And Telemetry"]
  node_led["Status LED<br/>[flySky2A.c]"]
  node_voltage["Voltage Telemetry<br/>[flySky2A.c]"]
end

node_transmitter(("FlySky Transmitter"))
node_flight_controller(("Flight Controller"))

node_transmitter -->|"sends radio"| node_radio
node_radio -->|"provides link"| node_firmware
node_firmware -->|"outputs 8 channels"| node_sbus
node_firmware -->|"outputs 8 channels"| node_ppm
node_sbus -.->|"feeds"| node_flight_controller
node_ppm -.->|"feeds"| node_flight_controller
node_firmware -->|"indicates link state"| node_led
node_firmware -->|"returns voltage"| node_voltage
node_voltage -.->|"reports voltage"| node_transmitter

click node_radio "https://github.com/chenghongyao/flysky2a_51/blob/master/flySky2A.c"
click node_firmware "https://github.com/chenghongyao/flysky2a_51/blob/master/flySky2A.c"
click node_sbus "https://github.com/chenghongyao/flysky2a_51/blob/master/flySky2A.c"
click node_ppm "https://github.com/chenghongyao/flysky2a_51/blob/master/flySky2A.c"
click node_led "https://github.com/chenghongyao/flysky2a_51/blob/master/flySky2A.c"
click node_voltage "https://github.com/chenghongyao/flysky2a_51/blob/master/flySky2A.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_radio,node_firmware toneBlue
class node_sbus,node_ppm toneAmber
class node_led,node_voltage toneMint
class node_transmitter,node_flight_controller toneIndigo
```

## Components

### Receiver Firmware

- [Wireless Link](https://github.com/chenghongyao/flysky2a_51/blob/master/flySky2A.c): `flySky2A.c`
- [Receiver Runtime](https://github.com/chenghongyao/flysky2a_51/blob/master/flySky2A.c): `flySky2A.c`

### Signal Outputs

- [SBUS Output](https://github.com/chenghongyao/flysky2a_51/blob/master/flySky2A.c): `flySky2A.c`
- [PPM Output](https://github.com/chenghongyao/flysky2a_51/blob/master/flySky2A.c): `flySky2A.c`

### Status And Telemetry

- [Status LED](https://github.com/chenghongyao/flysky2a_51/blob/master/flySky2A.c): `flySky2A.c`
- [Voltage Telemetry](https://github.com/chenghongyao/flysky2a_51/blob/master/flySky2A.c): `flySky2A.c`

### Other components

- **FlySky Transmitter**
- **Flight Controller**

## Connections

- FlySky Transmitter → Wireless Link: sends radio (evidence: `readme.md`)
- Wireless Link → Receiver Runtime: provides link (evidence: `readme.md`)
- Receiver Runtime → SBUS Output: outputs 8 channels (evidence: `readme.md`)
- Receiver Runtime → PPM Output: outputs 8 channels (evidence: `readme.md`)
- SBUS Output → Flight Controller: feeds
- PPM Output → Flight Controller: feeds
- Receiver Runtime → Status LED: indicates link state (evidence: `readme.md`)
- Receiver Runtime → Voltage Telemetry: returns voltage (evidence: `readme.md`)
- Voltage Telemetry → FlySky Transmitter: reports voltage
