nuttx/Documentation/components/drivers/character/timers/timer.svg
ouyangxiangzhen 6689a408f3 Documentation/drivers/timers: Add information about timers.
This commit added additional informantion about the timer driver
abstraction.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00

1 line
No EOL
13 KiB
XML

<svg id="export-svg" width="100%" xmlns="http://www.w3.org/2000/svg" style="max-width: 449.312px; background: rgb(255, 255, 255);" viewBox="-5 -113 449.3125 226" role="graphics-document document" aria-roledescription="block"><style xmlns="http://www.w3.org/1999/xhtml">p {margin: 0;}</style><style>#export-svg{font-family:arial,sans-serif;font-size:14px;fill:#000000;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#export-svg .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#export-svg .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#export-svg .error-icon{fill:#FFFFFF;}#export-svg .error-text{fill:#000000;stroke:#000000;}#export-svg .edge-thickness-normal{stroke-width:1px;}#export-svg .edge-thickness-thick{stroke-width:3.5px;}#export-svg .edge-pattern-solid{stroke-dasharray:0;}#export-svg .edge-thickness-invisible{stroke-width:0;fill:none;}#export-svg .edge-pattern-dashed{stroke-dasharray:3;}#export-svg .edge-pattern-dotted{stroke-dasharray:2;}#export-svg .marker{fill:#000000;stroke:#000000;}#export-svg .marker.cross{stroke:#000000;}#export-svg svg{font-family:arial,sans-serif;font-size:14px;}#export-svg p{margin:0;}#export-svg .label{font-family:arial,sans-serif;color:#000000;}#export-svg .cluster-label text{fill:#000000;}#export-svg .cluster-label span,#export-svg p{color:#000000;}#export-svg .label text,#export-svg span,#export-svg p{fill:#000000;color:#000000;}#export-svg .node rect,#export-svg .node circle,#export-svg .node ellipse,#export-svg .node polygon,#export-svg .node path{fill:#FFFFFF;stroke:#000000;stroke-width:1px;}#export-svg .flowchart-label text{text-anchor:middle;}#export-svg .node .label{text-align:center;}#export-svg .node.clickable{cursor:pointer;}#export-svg .arrowheadPath{fill:#0b0b0b;}#export-svg .edgePath .path{stroke:#000000;stroke-width:2.0px;}#export-svg .flowchart-link{stroke:#000000;fill:none;}#export-svg .edgeLabel{background-color:#CACACA;text-align:center;}#export-svg .edgeLabel rect{opacity:0.5;background-color:#CACACA;fill:#CACACA;}#export-svg .labelBkg{background-color:rgba(202, 202, 202, 0.5);}#export-svg .node .cluster{fill:rgba(255, 255, 248, 0.5);stroke:rgba(229.5, 229.5, 229.5, 0.2);box-shadow:rgba(50, 50, 93, 0.25) 0px 13px 27px -5px,rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;stroke-width:1px;}#export-svg .cluster text{fill:#000000;}#export-svg .cluster span,#export-svg p{color:#000000;}#export-svg div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:arial,sans-serif;font-size:12px;background:#FFFFFF;border:1px solid hsl(0, 0%, 90%);border-radius:2px;pointer-events:none;z-index:100;}#export-svg .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#000000;}#export-svg .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#export-svg .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#export-svg .node .neo-node{stroke:#000000;}#export-svg [data-look="neo"].node rect,#export-svg [data-look="neo"].cluster rect,#export-svg [data-look="neo"].node polygon{stroke:url(#export-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#export-svg [data-look="neo"].node path{stroke:url(#export-svg-gradient);stroke-width:1;}#export-svg [data-look="neo"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#export-svg [data-look="neo"].node .neo-line path{stroke:#000000;filter:none;}#export-svg [data-look="neo"].node circle{stroke:url(#export-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#export-svg [data-look="neo"].node circle .state-start{fill:#000000;}#export-svg [data-look="neo"].statediagram-cluster rect{fill:#FFFFFF;stroke:url(#export-svg-gradient);stroke-width:1;}#export-svg [data-look="neo"].icon-shape .icon{fill:url(#export-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#export-svg [data-look="neo"].icon-shape .icon-neo path{stroke:url(#export-svg-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#export-svg :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g/><marker id="export-svg_block-pointEnd" class="marker block" viewBox="0 0 10 10" refX="6" refY="5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="export-svg_block-pointStart" class="marker block" viewBox="0 0 10 10" refX="4.5" refY="5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 0 5 L 10 10 L 10 0 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="export-svg_block-circleEnd" class="marker block" viewBox="0 0 10 10" refX="11" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="export-svg_block-circleStart" class="marker block" viewBox="0 0 10 10" refX="-1" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="export-svg_block-crossEnd" class="marker cross block" viewBox="0 0 11 11" refX="12" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"/></marker><marker id="export-svg_block-crossStart" class="marker cross block" viewBox="0 0 11 11" refX="-1" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"/></marker><g class="block"><g class="node default default flowchart-label" id="软件定时器抽象层" data-node="true" data-id="软件定时器抽象层" transform="translate(219.65625, -84)"><rect class="basic cluster composite label-container" style="" rx="0" ry="0" x="-219.65625" y="-24" width="439.3125" height="48"/><g class="label" style="" transform="translate(0, 0)"><rect/><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel"></span></div></foreignObject></g></g><g class="node default default flowchart-label" id="wdog" data-node="true" data-id="wdog" transform="translate(219.65625, -84)"><rect class="basic label-container" style="" rx="0" ry="0" x="-211.65625" y="-16" width="423.3125" height="32"/><g class="label" style="" transform="translate(-16.734375, -12)"><rect/><foreignObject width="33.46875" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">wdog</span></div></foreignObject></g></g><g class="node default default flowchart-label" id="系统定时器抽象层" data-node="true" data-id="系统定时器抽象层" transform="translate(219.65625, -28)"><rect class="basic cluster composite label-container" style="" rx="0" ry="0" x="-219.65625" y="-24" width="439.3125" height="48"/><g class="label" style="" transform="translate(0, 0)"><rect/><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel"></span></div></foreignObject></g></g><g class="node default default flowchart-label" id="a" data-node="true" data-id="a" transform="translate(111.828125, -28)"><rect class="basic label-container" style="" rx="0" ry="0" x="-103.828125" y="-16" width="207.65625" height="32"/><g class="label" style="" transform="translate(-49.5234375, -12)"><rect/><foreignObject width="99.046875" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">Timer(up_timer)</span></div></foreignObject></g></g><g class="node default default flowchart-label" id="b" data-node="true" data-id="b" transform="translate(327.484375, -28)"><rect class="basic label-container" style="" rx="0" ry="0" x="-103.828125" y="-16" width="207.65625" height="32"/><g class="label" style="" transform="translate(-52.125, -12)"><rect/><foreignObject width="104.25" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">Alarm(up_alarm)</span></div></foreignObject></g></g><g class="node default default flowchart-label" id="定时器驱动框架层" data-node="true" data-id="定时器驱动框架层" transform="translate(219.65625, 28)"><rect class="basic cluster composite label-container" style="" rx="0" ry="0" x="-219.65625" y="-24" width="439.3125" height="48"/><g class="label" style="" transform="translate(0, 0)"><rect/><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel"></span></div></foreignObject></g></g><g class="node default default flowchart-label" id="o" data-node="true" data-id="o" transform="translate(111.828125, 28)"><rect class="basic label-container" style="" rx="0" ry="0" x="-103.828125" y="-16" width="207.65625" height="32"/><g class="label" style="" transform="translate(-26.46875, -12)"><rect/><foreignObject width="52.9375" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">Oneshot</span></div></foreignObject></g></g><g class="node default default flowchart-label" id="timer" data-node="true" data-id="timer" transform="translate(327.484375, 28)"><rect class="basic label-container" style="" rx="0" ry="0" x="-103.828125" y="-16" width="207.65625" height="32"/><g class="label" style="" transform="translate(-15.5625, -12)"><rect/><foreignObject width="31.125" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">timer</span></div></foreignObject></g></g><g class="node default default flowchart-label" id="硬件驱动层" data-node="true" data-id="硬件驱动层" transform="translate(219.65625, 84)"><rect class="basic cluster composite label-container" style="" rx="0" ry="0" x="-219.65625" y="-24" width="439.3125" height="48"/><g class="label" style="" transform="translate(0, 0)"><rect/><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel"></span></div></foreignObject></g></g><g class="node default default flowchart-label" id="a1" data-node="true" data-id="a1" transform="translate(57.9140625, 84)"><rect class="basic label-container" style="" rx="0" ry="0" x="-49.9140625" y="-16" width="99.828125" height="32"/><g class="label" style="" transform="translate(-43.9609375, -12)"><rect/><foreignObject width="87.921875" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">Generic Timer</span></div></foreignObject></g></g><g class="node default default flowchart-label" id="b1" data-node="true" data-id="b1" transform="translate(165.7421875, 84)"><rect class="basic label-container" style="" rx="0" ry="0" x="-49.9140625" y="-16" width="99.828125" height="32"/><g class="label" style="" transform="translate(-45.9140625, -12)"><rect/><foreignObject width="91.828125" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">TSC Dead-line</span></div></foreignObject></g></g><g class="node default default flowchart-label" id="c1" data-node="true" data-id="c1" transform="translate(273.5703125, 84)"><rect class="basic label-container" style="" rx="0" ry="0" x="-49.9140625" y="-16" width="99.828125" height="32"/><g class="label" style="" transform="translate(-18.671875, -12)"><rect/><foreignObject width="37.34375" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">HPET</span></div></foreignObject></g></g><g class="node default default flowchart-label" id="d1" data-node="true" data-id="d1" transform="translate(381.3984375, 84)"><rect class="basic label-container" style="" rx="0" ry="0" x="-49.9140625" y="-16" width="99.828125" height="32"/><g class="label" style="" transform="translate(-5.8359375, -12)"><rect/><foreignObject width="11.671875" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; white-space: nowrap;"><span class="nodeLabel">...</span></div></foreignObject></g></g></g></svg>