# aash009/folder-structure architecture

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

- Interactive diagram: https://gitdiagram.com/aash009/folder-structure
- Repository: https://github.com/aash009/folder-structure

## Overview

This repository is an IEC 62304-aligned insulin-pump firmware scaffold, explicitly not a product release: most modules are placeholders, and there is no flashable pump target. Its intended user-facing scope includes therapy and delivery safety, with sensing, device access, alarms, faults, storage, and other system services. The README and tree establish these responsibilities, but the sampled code does not establish a runtime user-to-result sequence or calls between modules, so the graph shows components without inferred connections.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Pump application"]
  node_therapy["Therapy control"]
  node_safety["Delivery safety"]
  node_pid["PID control"]
  node_alarms["Alarm manager"]
  node_faults["Fault manager"]
  node_gui["GUI"]
end

subgraph group_system["System services"]
  node_sensing["Sensor manager"]
  node_storage["Storage"]
  node_logger["Data logger"]
  node_communications["Communications"]
  node_diagnostics["Diagnostics"]
  node_power["Power manager"]
  node_watchdog["Watchdog"]
  node_osal["OS abstraction<br/>[rcm_system_osal.c]"]
end

subgraph group_drivers["Devices and drivers"]
  node_motor["Motor driver"]
  node_pressure["Pressure sensor<br/>[pressure_sensor.c]"]
  node_temperature["Temperature sensor<br/>[temp_sensor.c]"]
  node_force["Force sensor"]
  node_display["Display driver"]
  node_encoder["Encoder driver"]
  node_buzzer["Buzzer driver"]
  node_fram["FRAM driver"]
  node_flash["NOR flash driver"]
  node_safety_link["Safety link"]
end

subgraph group_platform["Platform interfaces"]
  node_gpio["GPIO"]
  node_i2c["I2C<br/>[i2c.c]"]
  node_spi["SPI"]
  node_uart["UART"]
  node_stm32["STM32 platform"]
  node_board["Board support<br/>[rcm_board.c]"]
end

click node_therapy "https://github.com/aash009/folder-structure/blob/master/application/therapy_control/src/rcm_application_therapy_control.c"
click node_safety "https://github.com/aash009/folder-structure/blob/master/application/delivery_safety/src/rcm_application_delivery_safety.c"
click node_pid "https://github.com/aash009/folder-structure/blob/master/application/pid/src/rcm_application_pid.c"
click node_alarms "https://github.com/aash009/folder-structure/blob/master/application/alarm_manager/src/rcm_application_alarm_manager.c"
click node_faults "https://github.com/aash009/folder-structure/blob/master/application/fault_manager/src/rcm_application_fault_manager.c"
click node_gui "https://github.com/aash009/folder-structure/blob/master/application/gui/src/rcm_application_gui.c"
click node_sensing "https://github.com/aash009/folder-structure/blob/master/system/sensor_manager/src/rcm_system_sensor_manager.c"
click node_storage "https://github.com/aash009/folder-structure/blob/master/system/storage/src/rcm_system_storage.c"
click node_logger "https://github.com/aash009/folder-structure/blob/master/system/data_logger/src/rcm_system_data_logger.c"
click node_communications "https://github.com/aash009/folder-structure/blob/master/system/communications/src/rcm_system_communications.c"
click node_diagnostics "https://github.com/aash009/folder-structure/blob/master/system/diagnostics/src/rcm_system_diagnostics.c"
click node_power "https://github.com/aash009/folder-structure/blob/master/system/power_manager/src/rcm_system_power_manager.c"
click node_watchdog "https://github.com/aash009/folder-structure/blob/master/system/watchdog/src/rcm_system_watchdog.c"
click node_osal "https://github.com/aash009/folder-structure/blob/master/system/osal/src/rcm_system_osal.c"
click node_motor "https://github.com/aash009/folder-structure/blob/master/driver/devices/motor/src/rcm_driver_devices_motor.c"
click node_pressure "https://github.com/aash009/folder-structure/blob/master/driver/devices/pressure_sensor/src/pressure_sensor.c"
click node_temperature "https://github.com/aash009/folder-structure/blob/master/driver/devices/temp_sensor/src/temp_sensor.c"
click node_force "https://github.com/aash009/folder-structure/blob/master/driver/devices/force_sensor/src/rcm_driver_devices_force_sensor.c"
click node_display "https://github.com/aash009/folder-structure/blob/master/driver/devices/display/src/rcm_driver_devices_display.c"
click node_encoder "https://github.com/aash009/folder-structure/blob/master/driver/devices/encoder/src/rcm_driver_devices_encoder.c"
click node_buzzer "https://github.com/aash009/folder-structure/blob/master/driver/devices/buzzer/src/rcm_driver_devices_buzzer.c"
click node_fram "https://github.com/aash009/folder-structure/blob/master/driver/devices/fram/src/rcm_driver_devices_fram.c"
click node_flash "https://github.com/aash009/folder-structure/blob/master/driver/devices/nor_flash/src/rcm_driver_devices_nor_flash.c"
click node_safety_link "https://github.com/aash009/folder-structure/blob/master/driver/devices/safety_link/src/rcm_driver_devices_safety_link.c"
click node_gpio "https://github.com/aash009/folder-structure/blob/master/driver/peripherals/gpio/src/rcm_driver_peripherals_gpio.c"
click node_i2c "https://github.com/aash009/folder-structure/blob/master/driver/peripherals/i2c/src/i2c.c"
click node_spi "https://github.com/aash009/folder-structure/blob/master/driver/peripherals/spi/src/rcm_driver_peripherals_spi.c"
click node_uart "https://github.com/aash009/folder-structure/blob/master/driver/peripherals/uart/src/rcm_driver_peripherals_uart.c"
click node_stm32 "https://github.com/aash009/folder-structure/blob/master/driver/platform/stm32/src/rcm_driver_platform_stm32.c"
click node_board "https://github.com/aash009/folder-structure/blob/master/driver/bsp/board_rev_a/src/rcm_board.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_therapy,node_safety,node_pid,node_alarms,node_faults,node_gui toneBlue
class node_sensing,node_storage,node_logger,node_communications,node_diagnostics,node_power,node_watchdog,node_osal toneAmber
class node_motor,node_pressure,node_temperature,node_force,node_display,node_encoder,node_buzzer,node_fram,node_flash,node_safety_link toneMint
class node_gpio,node_i2c,node_spi,node_uart,node_stm32,node_board toneRose
```

## Components

### Pump application

- [Therapy control](https://github.com/aash009/folder-structure/blob/master/application/therapy_control/src/rcm_application_therapy_control.c): `application/therapy_control/src/rcm_application_therapy_control.c`
- [Delivery safety](https://github.com/aash009/folder-structure/blob/master/application/delivery_safety/src/rcm_application_delivery_safety.c): `application/delivery_safety/src/rcm_application_delivery_safety.c`
- [PID control](https://github.com/aash009/folder-structure/blob/master/application/pid/src/rcm_application_pid.c): `application/pid/src/rcm_application_pid.c`
- [Alarm manager](https://github.com/aash009/folder-structure/blob/master/application/alarm_manager/src/rcm_application_alarm_manager.c): `application/alarm_manager/src/rcm_application_alarm_manager.c`
- [Fault manager](https://github.com/aash009/folder-structure/blob/master/application/fault_manager/src/rcm_application_fault_manager.c): `application/fault_manager/src/rcm_application_fault_manager.c`
- [GUI](https://github.com/aash009/folder-structure/blob/master/application/gui/src/rcm_application_gui.c): `application/gui/src/rcm_application_gui.c`

### System services

- [Sensor manager](https://github.com/aash009/folder-structure/blob/master/system/sensor_manager/src/rcm_system_sensor_manager.c): `system/sensor_manager/src/rcm_system_sensor_manager.c`
- [Storage](https://github.com/aash009/folder-structure/blob/master/system/storage/src/rcm_system_storage.c): `system/storage/src/rcm_system_storage.c`
- [Data logger](https://github.com/aash009/folder-structure/blob/master/system/data_logger/src/rcm_system_data_logger.c): `system/data_logger/src/rcm_system_data_logger.c`
- [Communications](https://github.com/aash009/folder-structure/blob/master/system/communications/src/rcm_system_communications.c): `system/communications/src/rcm_system_communications.c`
- [Diagnostics](https://github.com/aash009/folder-structure/blob/master/system/diagnostics/src/rcm_system_diagnostics.c): `system/diagnostics/src/rcm_system_diagnostics.c`
- [Power manager](https://github.com/aash009/folder-structure/blob/master/system/power_manager/src/rcm_system_power_manager.c): `system/power_manager/src/rcm_system_power_manager.c`
- [Watchdog](https://github.com/aash009/folder-structure/blob/master/system/watchdog/src/rcm_system_watchdog.c): `system/watchdog/src/rcm_system_watchdog.c`
- [OS abstraction](https://github.com/aash009/folder-structure/blob/master/system/osal/src/rcm_system_osal.c): `system/osal/src/rcm_system_osal.c`

### Devices and drivers

- [Motor driver](https://github.com/aash009/folder-structure/blob/master/driver/devices/motor/src/rcm_driver_devices_motor.c): `driver/devices/motor/src/rcm_driver_devices_motor.c`
- [Pressure sensor](https://github.com/aash009/folder-structure/blob/master/driver/devices/pressure_sensor/src/pressure_sensor.c): `driver/devices/pressure_sensor/src/pressure_sensor.c`
- [Temperature sensor](https://github.com/aash009/folder-structure/blob/master/driver/devices/temp_sensor/src/temp_sensor.c): `driver/devices/temp_sensor/src/temp_sensor.c`
- [Force sensor](https://github.com/aash009/folder-structure/blob/master/driver/devices/force_sensor/src/rcm_driver_devices_force_sensor.c): `driver/devices/force_sensor/src/rcm_driver_devices_force_sensor.c`
- [Display driver](https://github.com/aash009/folder-structure/blob/master/driver/devices/display/src/rcm_driver_devices_display.c): `driver/devices/display/src/rcm_driver_devices_display.c`
- [Encoder driver](https://github.com/aash009/folder-structure/blob/master/driver/devices/encoder/src/rcm_driver_devices_encoder.c): `driver/devices/encoder/src/rcm_driver_devices_encoder.c`
- [Buzzer driver](https://github.com/aash009/folder-structure/blob/master/driver/devices/buzzer/src/rcm_driver_devices_buzzer.c): `driver/devices/buzzer/src/rcm_driver_devices_buzzer.c`
- [FRAM driver](https://github.com/aash009/folder-structure/blob/master/driver/devices/fram/src/rcm_driver_devices_fram.c): `driver/devices/fram/src/rcm_driver_devices_fram.c`
- [NOR flash driver](https://github.com/aash009/folder-structure/blob/master/driver/devices/nor_flash/src/rcm_driver_devices_nor_flash.c): `driver/devices/nor_flash/src/rcm_driver_devices_nor_flash.c`
- [Safety link](https://github.com/aash009/folder-structure/blob/master/driver/devices/safety_link/src/rcm_driver_devices_safety_link.c): `driver/devices/safety_link/src/rcm_driver_devices_safety_link.c`

### Platform interfaces

- [GPIO](https://github.com/aash009/folder-structure/blob/master/driver/peripherals/gpio/src/rcm_driver_peripherals_gpio.c): `driver/peripherals/gpio/src/rcm_driver_peripherals_gpio.c`
- [I2C](https://github.com/aash009/folder-structure/blob/master/driver/peripherals/i2c/src/i2c.c): `driver/peripherals/i2c/src/i2c.c`
- [SPI](https://github.com/aash009/folder-structure/blob/master/driver/peripherals/spi/src/rcm_driver_peripherals_spi.c): `driver/peripherals/spi/src/rcm_driver_peripherals_spi.c`
- [UART](https://github.com/aash009/folder-structure/blob/master/driver/peripherals/uart/src/rcm_driver_peripherals_uart.c): `driver/peripherals/uart/src/rcm_driver_peripherals_uart.c`
- [STM32 platform](https://github.com/aash009/folder-structure/blob/master/driver/platform/stm32/src/rcm_driver_platform_stm32.c): `driver/platform/stm32/src/rcm_driver_platform_stm32.c`
- [Board support](https://github.com/aash009/folder-structure/blob/master/driver/bsp/board_rev_a/src/rcm_board.c): `driver/bsp/board_rev_a/src/rcm_board.c`
