initial commit

This commit is contained in:
jhChun
2026-04-08 16:58:54 +09:00
commit 82e33d8bf9
2578 changed files with 1590432 additions and 0 deletions

View File

@@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="900px" height="1200px" viewBox="-0.5 -0.5 900 1200" content="&lt;mxfile host=&quot;app.diagrams.net&quot;&gt;&lt;diagram name=&quot;VivaMayo Architecture&quot;&gt;&lt;mxGraphModel dx=&quot;900&quot; dy=&quot;1200&quot; grid=&quot;1&quot; gridSize=&quot;10&quot; guides=&quot;1&quot; tooltips=&quot;1&quot; connect=&quot;1&quot; arrows=&quot;1&quot; fold=&quot;1&quot; page=&quot;1&quot; pageScale=&quot;1&quot; pageWidth=&quot;900&quot; pageHeight=&quot;1200&quot;&gt;&lt;root&gt;&lt;mxCell id=&quot;0&quot;/&gt;&lt;mxCell id=&quot;1&quot; parent=&quot;0&quot;/&gt;&lt;/root&gt;&lt;/mxGraphModel&gt;&lt;/diagram&gt;&lt;/mxfile&gt;">
<defs>
<style type="text/css">
.title { font: bold 24px 'Segoe UI', Arial, sans-serif; fill: #1a1a1a; }
.subtitle { font: 16px 'Segoe UI', Arial, sans-serif; fill: #666; }
.box-main { fill: #4a90d9; stroke: #2d5a8a; stroke-width: 2; rx: 8; }
.box-ble { fill: #5cb85c; stroke: #3d8b3d; stroke-width: 2; rx: 8; }
.box-parser { fill: #f0ad4e; stroke: #c77c00; stroke-width: 2; rx: 8; }
.box-cmd { fill: #d9534f; stroke: #a33b38; stroke-width: 2; rx: 8; }
.box-handler { fill: #9b59b6; stroke: #6c3483; stroke-width: 2; rx: 8; }
.box-peripheral { fill: #17a2b8; stroke: #0d6efd; stroke-width: 2; rx: 8; }
.box-storage { fill: #6c757d; stroke: #495057; stroke-width: 2; rx: 8; }
.box-label { font: bold 14px 'Segoe UI', Arial, sans-serif; fill: white; text-anchor: middle; }
.box-sublabel { font: 11px 'Segoe UI', Arial, sans-serif; fill: rgba(255,255,255,0.8); text-anchor: middle; }
.arrow { stroke: #333; stroke-width: 2; fill: none; marker-end: url(#arrowhead); }
.arrow-dashed { stroke: #666; stroke-width: 2; fill: none; stroke-dasharray: 5,5; marker-end: url(#arrowhead); }
.section-title { font: bold 16px 'Segoe UI', Arial, sans-serif; fill: #333; }
.note { font: 12px 'Segoe UI', Arial, sans-serif; fill: #666; }
.legend-box { stroke: #ccc; stroke-width: 1; fill: #fafafa; rx: 5; }
</style>
<marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
<polygon points="0 0, 10 3.5, 0 7" fill="#333"/>
</marker>
</defs>
<!-- Background -->
<rect width="900" height="1200" fill="#ffffff"/>
<!-- Title -->
<text x="450" y="40" class="title" text-anchor="middle">VivaMayo BLE Application Architecture</text>
<text x="450" y="65" class="subtitle" text-anchor="middle">nRF52840 기반 NIRS 방광 모니터링 장치</text>
<!-- ==================== Section 1: Application Entry ==================== -->
<text x="50" y="110" class="section-title">1. Application Entry</text>
<!-- main.c -->
<rect x="350" y="130" width="200" height="60" class="box-main"/>
<text x="450" y="158" class="box-label">main.c</text>
<text x="450" y="175" class="box-sublabel">Application Entry Point</text>
<!-- ==================== Section 2: Core Modules ==================== -->
<text x="50" y="230" class="section-title">2. Core Modules</text>
<!-- BLE Stack -->
<rect x="100" y="250" width="160" height="50" class="box-ble"/>
<text x="180" y="275" class="box-label">ble_core.c</text>
<text x="180" y="290" class="box-sublabel">BLE Stack</text>
<!-- Power Control -->
<rect x="370" y="250" width="160" height="50" class="box-peripheral"/>
<text x="450" y="275" class="box-label">power_ctrl.c</text>
<text x="450" y="290" class="box-sublabel">Power Management</text>
<!-- Timer -->
<rect x="640" y="250" width="160" height="50" class="box-peripheral"/>
<text x="720" y="275" class="box-label">main_timer.c</text>
<text x="720" y="290" class="box-sublabel">Timer Management</text>
<!-- Arrows from main -->
<path d="M 400 190 L 400 210 L 180 210 L 180 250" class="arrow"/>
<path d="M 450 190 L 450 250" class="arrow"/>
<path d="M 500 190 L 500 210 L 720 210 L 720 250" class="arrow"/>
<!-- ==================== Section 3: BLE Data Flow ==================== -->
<text x="50" y="350" class="section-title">3. BLE Data Reception</text>
<!-- NUS Data Handler -->
<rect x="100" y="370" width="200" height="50" class="box-ble"/>
<text x="200" y="395" class="box-label">nus_data_handler()</text>
<text x="200" y="410" class="box-sublabel">BLE NUS RX Event</text>
<!-- Arrow -->
<path d="M 180 300 L 180 330 L 200 330 L 200 370" class="arrow"/>
<!-- ==================== Section 4: Command Processing ==================== -->
<text x="50" y="470" class="section-title">4. Command Processing</text>
<!-- received_command_process -->
<rect x="100" y="490" width="250" height="50" class="box-parser"/>
<text x="225" y="515" class="box-label">received_command_process()</text>
<text x="225" y="530" class="box-sublabel">cmd_parse.c</text>
<!-- Arrow -->
<path d="M 200 420 L 200 450 L 225 450 L 225 490" class="arrow"/>
<!-- ==================== Section 5: Parser Layer ==================== -->
<text x="50" y="590" class="section-title">5. Parser Layer (Mt_parser)</text>
<!-- dr_cmd_parser -->
<rect x="100" y="610" width="200" height="60" class="box-parser"/>
<text x="200" y="635" class="box-label">dr_cmd_parser()</text>
<text x="200" y="655" class="box-sublabel">parser.c - CRC + TAG</text>
<!-- Legacy Parser -->
<rect x="400" y="610" width="200" height="60" class="box-storage"/>
<text x="500" y="635" class="box-label">Legacy Parser</text>
<text x="500" y="655" class="box-sublabel">cmd_parse.c (fallback)</text>
<!-- Arrows -->
<path d="M 225 540 L 225 570 L 200 570 L 200 610" class="arrow"/>
<path d="M 300 640 L 400 640" class="arrow-dashed"/>
<text x="350" y="630" class="note">fallback</text>
<!-- ==================== Section 6: Command Dispatch ==================== -->
<text x="50" y="720" class="section-title">6. Command Dispatch</text>
<!-- g_cmd_table -->
<rect x="100" y="740" width="200" height="50" class="box-cmd"/>
<text x="200" y="765" class="box-label">g_cmd_table[]</text>
<text x="200" y="780" class="box-sublabel">51 Commands</text>
<!-- Arrow -->
<path d="M 200 670 L 200 740" class="arrow"/>
<!-- ==================== Section 7: Command Handlers ==================== -->
<text x="50" y="840" class="section-title">7. Command Handlers (cmd.c)</text>
<!-- Handler boxes -->
<rect x="50" y="860" width="120" height="45" class="box-handler"/>
<text x="110" y="882" class="box-label">Cmd_mta</text>
<text x="110" y="897" class="box-sublabel">Device Status</text>
<rect x="180" y="860" width="120" height="45" class="box-handler"/>
<text x="240" y="882" class="box-label">Cmd_mcj</text>
<text x="240" y="897" class="box-sublabel">M48 Measure</text>
<rect x="310" y="860" width="120" height="45" class="box-handler"/>
<text x="370" y="882" class="box-label">Cmd_msn</text>
<text x="370" y="897" class="box-sublabel">Battery</text>
<rect x="440" y="860" width="120" height="45" class="box-handler"/>
<text x="500" y="882" class="box-label">Cmd_mag</text>
<text x="500" y="897" class="box-sublabel">AGC</text>
<rect x="570" y="860" width="120" height="45" class="box-handler"/>
<text x="630" y="882" class="box-label">Cmd_cmd</text>
<text x="630" y="897" class="box-sublabel">GPIO Test</text>
<rect x="700" y="860" width="120" height="45" class="box-handler"/>
<text x="760" y="882" class="box-label">...</text>
<text x="760" y="897" class="box-sublabel">+45 more</text>
<!-- Arrows to handlers -->
<path d="M 200 790 L 200 820 L 110 820 L 110 860" class="arrow"/>
<path d="M 200 790 L 200 820 L 240 820 L 240 860" class="arrow"/>
<path d="M 200 790 L 200 820 L 370 820 L 370 860" class="arrow"/>
<path d="M 200 790 L 200 820 L 500 820 L 500 860" class="arrow"/>
<path d="M 200 790 L 200 820 L 630 820 L 630 860" class="arrow"/>
<path d="M 200 790 L 200 820 L 760 820 L 760 860" class="arrow"/>
<!-- ==================== Section 8: Hardware Layer ==================== -->
<text x="50" y="960" class="section-title">8. Hardware / Peripherals</text>
<rect x="50" y="980" width="100" height="40" class="box-peripheral"/>
<text x="100" y="1005" class="box-label">LED x48</text>
<rect x="160" y="980" width="100" height="40" class="box-peripheral"/>
<text x="210" y="1005" class="box-label">PD ADC</text>
<rect x="270" y="980" width="100" height="40" class="box-peripheral"/>
<text x="320" y="1005" class="box-label">IMU</text>
<rect x="380" y="980" width="100" height="40" class="box-peripheral"/>
<text x="430" y="1005" class="box-label">Temp</text>
<rect x="490" y="980" width="100" height="40" class="box-peripheral"/>
<text x="540" y="1005" class="box-label">Pressure</text>
<rect x="600" y="980" width="100" height="40" class="box-peripheral"/>
<text x="650" y="1005" class="box-label">Battery</text>
<rect x="710" y="980" width="100" height="40" class="box-peripheral"/>
<text x="760" y="1005" class="box-label">EEPROM</text>
<!-- ==================== Section 9: BLE Response ==================== -->
<text x="50" y="1070" class="section-title">9. BLE Response</text>
<rect x="100" y="1090" width="200" height="50" class="box-ble"/>
<text x="200" y="1115" class="box-label">binary_tx_handler()</text>
<text x="200" y="1130" class="box-sublabel">ble_data_tx.c + CRC16</text>
<rect x="400" y="1090" width="200" height="50" class="box-ble"/>
<text x="500" y="1115" class="box-label">BLE Central</text>
<text x="500" y="1130" class="box-sublabel">Mobile App</text>
<path d="M 300 1115 L 400 1115" class="arrow"/>
<!-- ==================== Legend ==================== -->
<rect x="650" y="1050" width="220" height="130" class="legend-box"/>
<text x="760" y="1072" class="section-title" text-anchor="middle">Legend</text>
<rect x="665" y="1085" width="20" height="15" class="box-main"/>
<text x="695" y="1097" class="note">Main Entry</text>
<rect x="665" y="1105" width="20" height="15" class="box-ble"/>
<text x="695" y="1117" class="note">BLE Layer</text>
<rect x="665" y="1125" width="20" height="15" class="box-parser"/>
<text x="695" y="1137" class="note">Parser Layer</text>
<rect x="780" y="1085" width="20" height="15" class="box-cmd"/>
<text x="810" y="1097" class="note">Cmd Table</text>
<rect x="780" y="1105" width="20" height="15" class="box-handler"/>
<text x="810" y="1117" class="note">Handlers</text>
<rect x="780" y="1125" width="20" height="15" class="box-peripheral"/>
<text x="810" y="1137" class="note">Peripherals</text>
<!-- Version info -->
<text x="450" y="1180" class="note" text-anchor="middle">VivaMayo Architecture v1.0 | Generated: 2026-01-30</text>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB