How empitrix/zenith works
Main Components
a. Application Layer
• Example applications (blink, timer, rotary-encoder, etc.)
• As top-level components
b. Zenith Abstraction Layer (Core)
• Board Support Package (BLUE-PILL)
• GPIO abstraction
• Timer abstraction
• Encoder drivers
c. Hardware Abstraction Layer (HAL)
• STM32F1xx HAL
• Core functionality
• Peripheral drivers
d. Hardware Layer
• STM32F103C8T6 microcontroller
• Physical peripherals (GPIO, Timers, etc.)
┌─────────────────────────────────────────┐
• Applications │
• ┌─────┐ ┌──────────────┐ ┌──────────┐ │
• Blink│ │Rotary Encoder│ │Timer Apps│ │
• ┘ └──────────────┘ └──────────┘ │
• ┬───────────────────────┘
• ↓
┌─────────────────────────────────────────┐
• Zenith Abstraction Layer │
• ┌─────────┐ ┌───────┐ ┌─────────────┐ │
• Board API│ │Drivers│ │Sensor Module│ │
• ┬────┘ └───┬───┘ └──────┬──────┘ │
• ┼──────────┼───────────-┼─────────┘
• ↓ ↓ ↓
┌─────────────────────────────────────────┐
• STM32F1xx HAL │
• ┌────────┐ ┌────────┐ ┌──────────────┐ │
• GPIO HAL│ │Timer HAL│ │Other HAL Modules│
• ┘ └────────┘ └──────────────┘ │
• ┬───────────────────────┘
• ↓
┌─────────────────────────────────────────┐
• Hardware (STM32F103C8T6) │
• ┌────────┐ ┌─────────┐ ┌────────────┐ │
• GPIO Pins│ │Timers │ │Peripherals │ │
• ┘ └─────────┘ └────────────┘ │
• ┘
Important Elements to Highlight
a. Data Flow
• Bidirectional communication between layers
b. Key Abstractions
• Board support package (BLUE-PILL)
• Main driver components
• Relationship between sensors and drivers
Additional Details
A side panel showing:
• Configuration components (cmake, build system)
• System initialization flow
• Key dependencies between components
Implementation Notes
• Use standardized UML notation where appropriate
• Notes for critical interfaces and abstraction boundaries
• Version information and compatibility notes