{
 "type": "flowchart",
 "font": "Pretendard",
 "bg": "#ffffff",
 "nodes": [
  {
   "id": "n0",
   "k": "stadium",
   "x": 525,
   "y": 24,
   "w": 230,
   "h": 48,
   "label": "시작\nflash_write(addr, buf, n)",
   "sc": "#1a1a1a",
   "fc": "#ffffff",
   "tc": "#1a1a1a"
  },
  {
   "id": "n1",
   "k": "diamond",
   "x": 560,
   "y": 112,
   "w": 160,
   "h": 72,
   "label": "n > 0 ?",
   "sc": "#1a1a1a",
   "fc": "#ffffff",
   "tc": "#1a1a1a"
  },
  {
   "id": "n2",
   "k": "rect",
   "x": 520,
   "y": 224,
   "w": 240,
   "h": 52,
   "label": "잔여 = 256 − (addr mod 256)\nlen = min(n, 잔여)",
   "sc": "#1a1a1a",
   "fc": "#ffffff",
   "tc": "#1a1a1a"
  },
  {
   "id": "n3",
   "k": "diamond",
   "x": 515,
   "y": 316,
   "w": 250,
   "h": 88,
   "label": "섹터 첫 페이지 ∧\n온디맨드 소거 ?",
   "sc": "#1a1a1a",
   "fc": "#ffffff",
   "tc": "#1a1a1a"
  },
  {
   "id": "n4",
   "k": "rect",
   "x": 540,
   "y": 444,
   "w": 200,
   "h": 40,
   "label": "WREN (06h)",
   "sc": "#1a1a1a",
   "fc": "#ffffff",
   "tc": "#1a1a1a"
  },
  {
   "id": "n5",
   "k": "rect",
   "x": 540,
   "y": 524,
   "w": 200,
   "h": 40,
   "label": "PP (02h, addr, len)",
   "sc": "#1a1a1a",
   "fc": "#ffffff",
   "tc": "#1a1a1a"
  },
  {
   "id": "n6",
   "k": "diamond",
   "x": 555,
   "y": 604,
   "w": 170,
   "h": 76,
   "label": "WIP = 0 ?",
   "sc": "#1a1a1a",
   "fc": "#ffffff",
   "tc": "#1a1a1a"
  },
  {
   "id": "n7",
   "k": "rect",
   "x": 535,
   "y": 720,
   "w": 210,
   "h": 40,
   "label": "addr += len ; n −= len",
   "sc": "#1a1a1a",
   "fc": "#ffffff",
   "tc": "#1a1a1a"
  },
  {
   "id": "n8",
   "k": "stadium",
   "x": 230,
   "y": 126,
   "w": 200,
   "h": 44,
   "label": "완료 · 저장 완료 신호",
   "sc": "#1a1a1a",
   "fc": "#ffffff",
   "tc": "#1a1a1a"
  },
  {
   "id": "n9",
   "k": "rect",
   "x": 250,
   "y": 338,
   "w": 200,
   "h": 40,
   "label": "섹터 소거 SE (20h)",
   "sc": "#1a1a1a",
   "fc": "#ffffff",
   "tc": "#1a1a1a"
  },
  {
   "id": "n10",
   "k": "predef",
   "x": 250,
   "y": 438,
   "w": 200,
   "h": 40,
   "label": "WIP=0 대기 (RDSR 05h)",
   "sc": "#1a1a1a",
   "fc": "#ffffff",
   "tc": "#1a1a1a"
  },
  {
   "id": "n11",
   "k": "rect",
   "x": 250,
   "y": 608,
   "w": 220,
   "h": 44,
   "label": "오류 F04 · 타임아웃 중단",
   "sc": "#1a1a1a",
   "fc": "#ffffff",
   "tc": "#1a1a1a",
   "dash": 1
  },
  {
   "id": "n12",
   "k": "note",
   "x": 140,
   "y": 210,
   "w": 250,
   "h": 56,
   "label": "len ≤ 페이지 잔여 → wrap 방지\nPP 1~256 B · 페이지 안에서만",
   "sc": "#1a1a1a",
   "fc": "#ffffff",
   "tc": "#1a1a1a"
  }
 ],
 "edges": [
  {
   "id": "e0",
   "from": "n0",
   "to": "n1",
   "t": "flow",
   "label": ""
  },
  {
   "id": "e1",
   "from": "n1",
   "to": "n8",
   "t": "flow",
   "label": "아니오"
  },
  {
   "id": "e2",
   "from": "n1",
   "to": "n2",
   "t": "flow",
   "label": "예"
  },
  {
   "id": "e3",
   "from": "n2",
   "to": "n3",
   "t": "flow",
   "label": ""
  },
  {
   "id": "e4",
   "from": "n3",
   "to": "n9",
   "t": "flow",
   "label": "예"
  },
  {
   "id": "e5",
   "from": "n3",
   "to": "n4",
   "t": "flow",
   "label": "아니오"
  },
  {
   "id": "e6",
   "from": "n9",
   "to": "n10",
   "t": "flow",
   "label": ""
  },
  {
   "id": "e7",
   "from": "n10",
   "to": "n4",
   "t": "flow",
   "label": ""
  },
  {
   "id": "e8",
   "from": "n4",
   "to": "n5",
   "t": "flow",
   "label": ""
  },
  {
   "id": "e9",
   "from": "n5",
   "to": "n6",
   "t": "flow",
   "label": ""
  },
  {
   "id": "e10",
   "from": "n6",
   "to": "n6",
   "t": "flow",
   "label": "아니오 · 재폴링",
   "lby": 8
  },
  {
   "id": "e11",
   "from": "n6",
   "to": "n11",
   "t": "dep",
   "label": "타임아웃"
  },
  {
   "id": "e12",
   "from": "n6",
   "to": "n7",
   "t": "flow",
   "label": "예"
  },
  {
   "id": "e13",
   "from": "n7",
   "to": "n1",
   "t": "flow",
   "label": "다음 페이지",
   "route": "elbow"
  },
  {
   "id": "e14",
   "from": "n12",
   "to": "n2",
   "t": "plain",
   "label": ""
  }
 ]
}