<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.16"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>UbixOS: include/sys/device.h File Reference</title> <link href="../../tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="../../jquery.js"></script> <script type="text/javascript" src="../../dynsections.js"></script> <link href="../../navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="../../resize.js"></script> <script type="text/javascript" src="../../navtreedata.js"></script> <script type="text/javascript" src="../../navtree.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(initResizable); /* @license-end */</script> <link href="../../doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">UbixOS  <span id="projectnumber">2.0</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.16 --> <script type="text/javascript" src="../../menudata.js"></script> <script type="text/javascript" src="../../menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('../../',false,false,'search.php','Search'); }); /* @license-end */</script> <div id="main-nav"></div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(function(){initNavTree('d4/d7e/include_2sys_2device_8h.html','../../');}); /* @license-end */ </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#nested-classes">Data Structures</a> | <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">device.h File Reference</div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><code>#include <<a class="el" href="../../d0/d27/include_2sys_2types_8h_source.html">sys/types.h</a>></code><br /> </div><div class="textblock"><div class="dynheader"> Include dependency graph for device.h:</div> <div class="dyncontent"> <div class="center"><img src="../../d8/dca/include_2sys_2device_8h__incl.png" border="0" usemap="#include_2sys_2device_8h" alt=""/></div> <map name="include_2sys_2device_8h" id="include_2sys_2device_8h"> <area shape="rect" title=" " alt="" coords="5,5,144,32"/> <area shape="rect" href="../../d0/d27/include_2sys_2types_8h.html" title=" " alt="" coords="29,80,120,107"/> <area shape="rect" href="../../d0/d6f/__types_8h.html" title=" " alt="" coords="189,304,286,331"/> <area shape="rect" href="../../d9/dab/select_8h.html" title=" " alt="" coords="127,155,220,181"/> <area shape="rect" href="../../d6/d92/cdefs_8h.html" title=" " alt="" coords="65,229,154,256"/> <area shape="rect" href="../../d6/d30/__timespec_8h.html" title=" " alt="" coords="178,229,297,256"/> <area shape="rect" href="../../df/dc5/__timeval_8h.html" title=" " alt="" coords="321,229,426,256"/> <area shape="rect" href="../../d6/da4/__sigset_8h.html" title=" " alt="" coords="450,229,550,256"/> </map> </div> </div><div class="textblock"><div class="dynheader"> This graph shows which files directly or indirectly include this file:</div> <div class="dyncontent"> <div class="center"><img src="../../dd/d51/include_2sys_2device_8h__dep__incl.png" border="0" usemap="#include_2sys_2device_8hdep" alt=""/></div> <map name="include_2sys_2device_8hdep" id="include_2sys_2device_8hdep"> <area shape="rect" title=" " alt="" coords="2873,5,3012,32"/> <area shape="rect" href="../../d5/d7b/gpt_8c.html" title=" " alt="" coords="66,617,185,644"/> <area shape="rect" href="../../d4/d27/devfs_8c.html" title=" " alt="" coords="3944,468,4053,495"/> <area shape="rect" href="../../dc/d92/mount_8c.html" title=" " alt="" coords="157,80,259,107"/> <area shape="rect" href="../../d5/d82/gpt_8h.html" title=" " alt="" coords="43,543,207,569"/> <area shape="rect" href="../../d3/dfa/hd_8c.html" title=" " alt="" coords="407,617,475,644"/> <area shape="rect" href="../../d6/d6d/buf_8h.html" title=" " alt="" coords="3699,468,3819,495"/> <area shape="rect" href="../../d9/d32/include_2ubixfs_2ubixfs_8h.html" title=" " alt="" coords="546,468,697,495"/> <area shape="rect" href="../../d0/dda/ffs_8h.html" title=" " alt="" coords="3512,468,3624,495"/> <area shape="rect" href="../../df/d42/ufs_8h.html" title=" " alt="" coords="2885,80,3001,107"/> <area shape="rect" href="../../d9/d43/fdc_8c.html" title=" " alt="" coords="4230,468,4301,495"/> <area shape="rect" href="../../d5/d96/device_8c.html" title=" " alt="" coords="4281,80,4375,107"/> <area shape="rect" href="../../de/df2/ffs_8c.html" title=" " alt="" coords="3654,543,3735,569"/> <area shape="rect" href="../../d5/d60/arch_2armv6_2syscall_8c.html" title=" " alt="" coords="931,543,1072,569"/> <area shape="rect" href="../../d3/d1c/block_8c.html" title=" " alt="" coords="283,543,399,569"/> <area shape="rect" href="../../db/dff/dirCache_8c.html" title=" " alt="" coords="720,543,856,569"/> <area shape="rect" href="../../dc/d20/directory_8c.html" title=" " alt="" coords="423,543,558,569"/> <area shape="rect" href="../../d3/de7/thread_8c.html" title=" " alt="" coords="1290,543,1411,569"/> <area shape="rect" href="../../d2/d34/ubixfs_8c.html" title=" " alt="" coords="1147,543,1266,569"/> <area shape="rect" href="../../de/d44/hd_8h.html" title=" " alt="" coords="582,543,695,569"/> <area shape="rect" href="../../d4/d75/ubixos_2init_8h.html" title=" " alt="" coords="2317,617,2454,644"/> <area shape="rect" href="../../d0/d29/main_8c.html" title=" " alt="" coords="2344,692,2427,719"/> <area shape="rect" href="../../d3/d41/ufs_8c.html" title=" " alt="" coords="3407,543,3492,569"/> <area shape="rect" href="../../d6/db4/include_2vfs_2file_8h.html" title=" " alt="" coords="2071,229,2185,256"/> <area shape="rect" href="../../d7/d42/vfs__calls_8c.html" title=" " alt="" coords="2438,468,2559,495"/> <area shape="rect" href="../../d3/d73/inode_8h.html" title=" " alt="" coords="2112,155,2240,181"/> <area shape="rect" href="../../de/d18/i386__exec_8c.html" title=" " alt="" coords="1845,468,1995,495"/> <area shape="rect" href="../../db/d66/stat_8c.html" title=" " alt="" coords="2019,468,2107,495"/> <area shape="rect" href="../../d9/dd9/devfs_8h.html" title=" " alt="" coords="4014,393,4154,420"/> <area shape="rect" href="../../d3/df4/descrip_8h.html" title=" " alt="" coords="2166,393,2311,420"/> <area shape="rect" href="../../d3/d7e/sysproto__posix_8h.html" title=" " alt="" coords="2645,304,2787,345"/> <area shape="rect" href="../../db/da9/include_2vfs_2vfs_8h.html" title=" " alt="" coords="3216,393,3328,420"/> <area shape="rect" href="../../d7/d00/sched_8h.html" title=" " alt="" coords="1461,393,1616,420"/> <area shape="rect" href="../../d2/d6e/syscalls_8h.html" title=" " alt="" coords="823,468,991,495"/> <area shape="rect" href="../../d4/d4d/tcpdump_8c.html" title=" " alt="" coords="1957,311,2091,338"/> <area shape="rect" href="../../d3/d02/armv6_2sched_8c.html" title=" " alt="" coords="1551,468,1686,495"/> <area shape="rect" href="../../d9/d48/i386_2fork_8c.html" title=" " alt="" coords="1710,468,1821,495"/> <area shape="rect" href="../../d9/d83/i386_2sched_8c.html" title=" " alt="" coords="1116,468,1241,495"/> <area shape="rect" href="../../d6/d13/file_8c.html" title=" " alt="" coords="2584,468,2667,495"/> <area shape="rect" href="../../dd/df2/vfs_8c.html" title=" " alt="" coords="3102,468,3183,495"/> <area shape="rect" href="../../d2/d3f/descrip_8c.html" title=" " alt="" coords="2691,468,2805,495"/> <area shape="rect" href="../../d3/d0a/gen__calls_8c.html" title=" " alt="" coords="2131,468,2258,495"/> <area shape="rect" href="../../d6/dba/kern__pipe_8c.html" title=" " alt="" coords="2829,468,2957,495"/> <area shape="rect" href="../../d1/d47/pipe_8c.html" title=" " alt="" coords="2981,468,3077,495"/> <area shape="rect" href="../../d9/d56/sys__arch_8c.html" title=" " alt="" coords="2283,468,2413,495"/> <area shape="rect" href="../../de/d38/paging_8c.html" title=" " alt="" coords="1266,468,1369,495"/> <area shape="rect" href="../../da/d53/vmm__mmap_8c.html" title=" " alt="" coords="1393,468,1527,495"/> <area shape="rect" href="../../de/d9a/gen__calls_8h.html" title=" " alt="" coords="2418,393,2577,420"/> <area shape="rect" href="../../de/de2/kern__sig_8h.html" title=" " alt="" coords="2753,393,2905,420"/> <area shape="rect" href="../../d7/d40/kern__sysctl_8h.html" title=" " alt="" coords="3564,393,3735,420"/> </map> </div> </div> <p><a href="../../d4/d7e/include_2sys_2device_8h_source.html">Go to the source code of this file.</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> Data Structures</h2></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dc/de2/structdevice__interface.html">device_interface</a></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/d35/structdevice__node.html">device_node</a></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/dcb/structdevice__resource.html">device_resource</a></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:a256b750ab99e3be9b83a9bfd37a22388"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d7e/include_2sys_2device_8h.html#a256b750ab99e3be9b83a9bfd37a22388">device_add</a> (int, char, struct <a class="el" href="../../dc/de2/structdevice__interface.html">device_interface</a> *)</td></tr> <tr class="separator:a256b750ab99e3be9b83a9bfd37a22388"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a0002a4ec01ee11597c6751602f3e4c3d"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="../../de/d35/structdevice__node.html">device_node</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d7e/include_2sys_2device_8h.html#a0002a4ec01ee11597c6751602f3e4c3d">device_find</a> (int major, int minor)</td></tr> <tr class="separator:a0002a4ec01ee11597c6751602f3e4c3d"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a37fc0f624e03e0998fd2dd5922505ada"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/d7e/include_2sys_2device_8h.html#a37fc0f624e03e0998fd2dd5922505ada">device_remove</a> (struct <a class="el" href="../../de/d35/structdevice__node.html">device_node</a> *)</td></tr> <tr class="separator:a37fc0f624e03e0998fd2dd5922505ada"><td class="memSeparator" colspan="2"> </td></tr> </table> <h2 class="groupheader">Function Documentation</h2> <a id="a256b750ab99e3be9b83a9bfd37a22388"></a> <h2 class="memtitle"><span class="permalink"><a href="#a256b750ab99e3be9b83a9bfd37a22388">◆ </a></span>device_add()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int device_add </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname">, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">char </td> <td class="paramname">, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">struct <a class="el" href="../../dc/de2/structdevice__interface.html">device_interface</a> * </td> <td class="paramname"> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="../../d5/d96/device_8c_source.html#l00049">49</a> of file <a class="el" href="../../d5/d96/device_8c_source.html">device.c</a>.</p> <p class="reference">References <a class="el" href="../../d4/d7e/include_2sys_2device_8h_source.html#l00037">device_node::devInfo</a>, <a class="el" href="../../d3/d1a/kmalloc_8c_source.html#l00241">kmalloc()</a>, <a class="el" href="../../df/d87/kprintf_8c_source.html#l00259">kprintf()</a>, <a class="el" href="../../d4/d7e/include_2sys_2device_8h_source.html#l00040">device_node::minor</a>, <a class="el" href="../../d6/d8a/fat__string_8h_source.html#l00017">NULL</a>, <a class="el" href="../../d4/d7e/include_2sys_2device_8h_source.html#l00035">device_node::prev</a>, <a class="el" href="../../dc/d88/armv6_2spinlock_8c_source.html#l00055">spinLock()</a>, and <a class="el" href="../../d4/d7e/include_2sys_2device_8h_source.html#l00039">device_node::type</a>.</p> <p class="reference">Referenced by <a class="el" href="../../d9/d43/fdc_8c_source.html#l00061">fdc_init()</a>.</p> <div class="dynheader"> Here is the call graph for this function:</div> <div class="dyncontent"> <div class="center"><img src="../../d4/d7e/include_2sys_2device_8h_a256b750ab99e3be9b83a9bfd37a22388_cgraph.png" border="0" usemap="#d4/d7e/include_2sys_2device_8h_a256b750ab99e3be9b83a9bfd37a22388_cgraph" alt=""/></div> <map name="d4/d7e/include_2sys_2device_8h_a256b750ab99e3be9b83a9bfd37a22388_cgraph" id="d4/d7e/include_2sys_2device_8h_a256b750ab99e3be9b83a9bfd37a22388_cgraph"> <area shape="rect" title=" " alt="" coords="5,56,92,83"/> <area shape="rect" href="../../d4/d03/kmalloc_8h.html#a150eab2ac4ce4553e21ca10e7f441762" title=" " alt="" coords="140,5,207,32"/> <area shape="rect" href="../../dc/d88/armv6_2spinlock_8c.html#a71f03d2ba55111c715b6068254847a53" title=" " alt="" coords="507,56,581,83"/> <area shape="rect" href="../../da/d28/kprintf_8h.html#a20b56810edb62a6fe59917015c30848f" title=" " alt="" coords="145,183,202,209"/> <area shape="rect" href="../../d3/d02/armv6_2sched_8c.html#a08933fe6d593a1c78b9080359f15a0b7" title=" " alt="" coords="630,31,721,57"/> <area shape="rect" href="../../dc/d88/armv6_2spinlock_8c.html#a740766af5da58616f700fffab6768a78" title=" " alt="" coords="629,81,721,108"/> <area shape="rect" href="../../dd/d78/video_8h.html#a5429378b96a24fadfd2d1f8d777eb95a" title=" " alt="" coords="261,157,315,184"/> <area shape="rect" href="../../df/d87/kprintf_8c.html#a3093cdac4668a4ccffdd7f77270888b7" title=" " alt="" coords="257,208,319,235"/> <area shape="rect" href="../../da/d28/kprintf_8h.html#a3b4a66bf1f6583e65660f281b6014aa1" title=" " alt="" coords="255,259,321,285"/> <area shape="rect" href="../../dc/dac/io_8h.html#a77b934268de1b3ecdcf3f275413b3108" title="input one byte from specified port" alt="" coords="373,107,455,133"/> <area shape="rect" href="../../dc/dac/io_8h.html#a8acc1a06073db2e7b92ffbd00fbd0cf1" title="outputut one byte to specified port" alt="" coords="369,157,459,184"/> <area shape="rect" href="../../dd/d71/tty_8h.html#a4f96ccac7e60296ef496008d8cbed0ff" title=" " alt="" coords="382,208,446,235"/> <area shape="rect" href="../../dd/d71/tty_8h.html#ad96f57a7c113d3cfa76ee5fed6de33c0" title=" " alt="" coords="379,259,449,285"/> </map> </div> </div> </div> <a id="a0002a4ec01ee11597c6751602f3e4c3d"></a> <h2 class="memtitle"><span class="permalink"><a href="#a0002a4ec01ee11597c6751602f3e4c3d">◆ </a></span>device_find()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">struct <a class="el" href="../../de/d35/structdevice__node.html">device_node</a>* device_find </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"><em>major</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>minor</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="../../d5/d96/device_8c_source.html#l00082">82</a> of file <a class="el" href="../../d5/d96/device_8c_source.html">device.c</a>.</p> <p class="reference">References <a class="el" href="../../dc/d88/armv6_2spinlock_8c_source.html#l00055">spinLock()</a>.</p> <p class="reference">Referenced by <a class="el" href="../../dc/d92/mount_8c_source.html#l00045">vfs_mount()</a>.</p> <div class="dynheader"> Here is the call graph for this function:</div> <div class="dyncontent"> <div class="center"><img src="../../d4/d7e/include_2sys_2device_8h_a0002a4ec01ee11597c6751602f3e4c3d_cgraph.png" border="0" usemap="#d4/d7e/include_2sys_2device_8h_a0002a4ec01ee11597c6751602f3e4c3d_cgraph" alt=""/></div> <map name="d4/d7e/include_2sys_2device_8h_a0002a4ec01ee11597c6751602f3e4c3d_cgraph" id="d4/d7e/include_2sys_2device_8h_a0002a4ec01ee11597c6751602f3e4c3d_cgraph"> <area shape="rect" title=" " alt="" coords="5,31,91,57"/> <area shape="rect" href="../../dc/d88/armv6_2spinlock_8c.html#a71f03d2ba55111c715b6068254847a53" title=" " alt="" coords="139,31,213,57"/> <area shape="rect" href="../../d3/d02/armv6_2sched_8c.html#a08933fe6d593a1c78b9080359f15a0b7" title=" " alt="" coords="262,5,353,32"/> <area shape="rect" href="../../dc/d88/armv6_2spinlock_8c.html#a740766af5da58616f700fffab6768a78" title=" " alt="" coords="261,56,353,83"/> </map> </div> </div> </div> <a id="a37fc0f624e03e0998fd2dd5922505ada"></a> <h2 class="memtitle"><span class="permalink"><a href="#a37fc0f624e03e0998fd2dd5922505ada">◆ </a></span>device_remove()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int device_remove </td> <td>(</td> <td class="paramtype">struct <a class="el" href="../../de/d35/structdevice__node.html">device_node</a> * </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p class="definition">Definition at line <a class="el" href="../../d5/d96/device_8c_source.html#l00104">104</a> of file <a class="el" href="../../d5/d96/device_8c_source.html">device.c</a>.</p> </div> </div> </div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="../../dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="../../dir_317ea3797c15f4a1d9c156bc812661ca.html">sys</a></li><li class="navelem"><a class="el" href="../../d4/d7e/include_2sys_2device_8h.html">device.h</a></li> <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.16 </li> </ul> </div> </body> </html>