How yishunzhikong/ssd1306_oled_json works
This is a Linux SSD1306 OLED display application driven by JSON configuration. Its main workflow is to load system and page settings, select pages in sequence, periodically render configured elements, and send the display buffer over I²C to the OLED. The README also documents built-in system-data, shell-command, text, numeric, and geometric elements. The excerpts show the application timer, some rendering dispatch, and display/I²C operations; wiring for unsampled element handlers is represented only where documented.
Main entry points: dataapi.c Config Loading · Main.c Element Dispatch · SSD1306_OLED.c OLED Driver · I2C.c I²C Transport
Components 20
Configuration
- JSON Config
config.json - Config Loading
Main/dataapi.c - cJSON Parser
cJSON/cJSON.c - Display Settings
Main/dataapi.c
Page Runtime
- Application
Main/Main.c - Page Data
Main/dataapi.c - Page Selection
Main/dataapi.c - Page Scheduler
Main/Main.c - Refresh Timer
Main/Main.c
Rendering
- Element Dispatch
Main/Main.c - System Values
Main/Main.c - Shell Output
Main/dataapi.c - Shape Drawing
SSD1306_OLED_Library/SSD1306_OLED.c - Text Drawing
SSD1306_OLED_Library/SSD1306_OLED.c
Display Hardware
- OLED Driver
SSD1306_OLED_Library/SSD1306_OLED.c - I²C Transport
I2C_Library/I2C.c
Other components
- Operator
- Linux Filesystem
- Shell
- SSD1306 OLED
Connections 23
- Operator → Application: launches
- Operator → JSON Config: configures
- Application → Config Loading: loads config
- Config Loading → Linux Filesystem: reads file
- Config Loading → cJSON Parser: parses JSON
- Config Loading → Display Settings: extracts settings
- Config Loading → Page Data: extracts pages
- Page Data → Page Selection: provides pages
- Application → Page Scheduler: runs pages
- Page Scheduler → Page Selection: selects page
- Page Scheduler → Refresh Timer: sets timing
- Page Scheduler → Element Dispatch: renders page
- Element Dispatch → System Values: reads system data
- System Values → Linux Filesystem: reads sysfs
- Element Dispatch → Shell Output: requests command
- Shell Output → Shell: runs command
- Element Dispatch → Shape Drawing: draws shapes
- Element Dispatch → Text Drawing: draws text
- Application → OLED Driver: clears and displays
- Shape Drawing → OLED Driver: draws pixels
- Text Drawing → OLED Driver: writes glyphs
- OLED Driver → I²C Transport: sends display data
- I²C Transport → SSD1306 OLED: writes bus