# a0gsoft/oled_flipper architecture

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

- Interactive diagram: https://gitdiagram.com/a0gsoft/oled_flipper
- Repository: https://github.com/a0gsoft/oled_flipper

## Overview

This repository is a DIY Flipper Zero firmware fork documented for WeAct STM32WB55 hardware, adding support for an I2C OLED and a custom mix of peripherals. The main user workflow is physical input through buttons and sensors, firmware execution on the MCU, and feedback through the display, LEDs, vibration, or speaker; storage and radio/NFC/RFID are additional capabilities. The README documents hardware routing, while the sampled source is mostly general firmware infrastructure. The file tree and excerpts do not establish the custom target’s complete runtime wiring, so links beyond documented hardware relationships are omitted.

Main entry points: [`targets/f7/src/main.c`](https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/targets/f7/src/main.c) (Flipper firmware), [`applications/services/storage/storage_external_api.c`](https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/applications/services/storage/storage_external_api.c) (Storage API), [`applications/settings/storage_settings/storage_settings.c`](https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/applications/settings/storage_settings/storage_settings.c) (Storage settings), [`applications/system/js_app/modules/js_usbdisk/mass_storage_usb.c`](https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/applications/system/js_app/modules/js_usbdisk/mass_storage_usb.c) (USB mass storage)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_platform["Board platform"]
  node_mcu["STM32WB55 MCU<br/>[main.c]"]
  node_firmware["Flipper firmware<br/>[main.c]"]
end

subgraph group_interaction["User interaction"]
  node_buttons["Button input"]
  node_oled["OLED display"]
end

subgraph group_hardware["Hardware features"]
  node_gpio["MCP23017 I/O"]
  node_power["Power monitor"]
  node_sd[("microSD storage<br/>[storage_ext.c]")]
  node_subghz["Sub-GHz radio"]
  node_nfc["NFC reader"]
  node_lf_rfid["LF-RFID"]
  node_infrared["Infrared<br/>[infrared_worker.c]"]
  node_ibutton["iButton<br/>[ibutton_worker.c]"]
  node_speaker["Speaker<br/>[music_worker.c]"]
end

subgraph group_services["Firmware services"]
  node_storage_api["Storage API"]
  node_storage_settings["Storage settings<br/>[storage_settings.c]"]
  node_usb["USB mass storage<br/>[mass_storage_usb.c]"]
end

node_user(("Device user"))

node_user -->|"presses"| node_buttons
node_buttons -->|"signals"| node_mcu
node_mcu -->|"runs"| node_firmware
node_firmware -->|"drives over I2C"| node_oled
node_firmware -->|"communicates over I2C"| node_gpio
node_gpio -->|"reads"| node_buttons
node_gpio -->|"signals with LED and vibration"| node_user
node_power -->|"reports over I2C"| node_mcu
node_firmware -->|"uses"| node_storage_api
node_storage_api -.->|"accesses"| node_sd
node_storage_settings -->|"uses"| node_storage_api
node_firmware -->|"communicates over SPI"| node_subghz
node_firmware -->|"communicates over SPI"| node_nfc
node_firmware -->|"supports reading and emulation"| node_lf_rfid
node_firmware -->|"supports IR input and output"| node_infrared
node_firmware -->|"uses 1-Wire"| node_ibutton
node_firmware -->|"drives"| node_speaker
node_usb -.->|"uses storage"| node_storage_api

click node_mcu "https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/targets/f7/src/main.c"
click node_firmware "https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/targets/f7/src/main.c"
click node_sd "https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/applications/services/storage/storages/storage_ext.c"
click node_storage_api "https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/applications/services/storage/storage_external_api.c"
click node_storage_settings "https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/applications/settings/storage_settings/storage_settings.c"
click node_lf_rfid "https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/lib/lfrfid/lfrfid_worker_modes.c"
click node_infrared "https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/lib/infrared/worker/infrared_worker.c"
click node_ibutton "https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/lib/ibutton/ibutton_worker.c"
click node_speaker "https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/lib/music_worker/music_worker.c"
click node_usb "https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/applications/system/js_app/modules/js_usbdisk/mass_storage_usb.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_mcu,node_firmware,node_user toneBlue
class node_buttons,node_oled toneAmber
class node_gpio,node_power,node_sd,node_subghz,node_nfc,node_lf_rfid,node_infrared,node_ibutton,node_speaker toneMint
class node_storage_api,node_storage_settings,node_usb toneRose
```

## Components

### Board platform

- [STM32WB55 MCU](https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/targets/f7/src/main.c): `targets/f7/src/main.c`
- [Flipper firmware](https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/targets/f7/src/main.c): `targets/f7/src/main.c`

### User interaction

- **Button input**
- **OLED display**

### Hardware features

- **MCP23017 I/O**
- **Power monitor**
- [microSD storage](https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/applications/services/storage/storages/storage_ext.c): `applications/services/storage/storages/storage_ext.c`
- **Sub-GHz radio**
- **NFC reader**
- [LF-RFID](https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/lib/lfrfid/lfrfid_worker_modes.c): `lib/lfrfid/lfrfid_worker_modes.c`
- [Infrared](https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/lib/infrared/worker/infrared_worker.c): `lib/infrared/worker/infrared_worker.c`
- [iButton](https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/lib/ibutton/ibutton_worker.c): `lib/ibutton/ibutton_worker.c`
- [Speaker](https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/lib/music_worker/music_worker.c): `lib/music_worker/music_worker.c`

### Firmware services

- [Storage API](https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/applications/services/storage/storage_external_api.c): `applications/services/storage/storage_external_api.c`
- [Storage settings](https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/applications/settings/storage_settings/storage_settings.c): `applications/settings/storage_settings/storage_settings.c`
- [USB mass storage](https://github.com/a0gsoft/oled_flipper/blob/ssd1306_mcp23017/applications/system/js_app/modules/js_usbdisk/mass_storage_usb.c): `applications/system/js_app/modules/js_usbdisk/mass_storage_usb.c`

### Other components

- **Device user**

## Connections

- Device user → Button input: presses
- Button input → STM32WB55 MCU: signals
- STM32WB55 MCU → Flipper firmware: runs (evidence: `targets/f7/src/main.c`)
- Flipper firmware → OLED display: drives over I2C
- Flipper firmware → MCP23017 I/O: communicates over I2C
- MCP23017 I/O → Button input: reads
- MCP23017 I/O → Device user: signals with LED and vibration
- Power monitor → STM32WB55 MCU: reports over I2C
- Flipper firmware → Storage API: uses (evidence: `applications/services/storage/storage_external_api.c`)
- Storage API → microSD storage: accesses
- Storage settings → Storage API: uses (evidence: `applications/settings/storage_settings/storage_settings.c`)
- Flipper firmware → Sub-GHz radio: communicates over SPI
- Flipper firmware → NFC reader: communicates over SPI
- Flipper firmware → LF-RFID: supports reading and emulation
- Flipper firmware → Infrared: supports IR input and output
- Flipper firmware → iButton: uses 1-Wire
- Flipper firmware → Speaker: drives
- USB mass storage → Storage API: uses storage
