Newer
Older
UbixOS / doc / html / d5 / d96 / device_8c.html
<!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: sys/device.c 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&amp;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
   &#160;<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&amp;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&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('d5/d96/device_8c.html','../../');});
/* @license-end */
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">device.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;<a class="el" href="../../d4/d7e/include_2sys_2device_8h_source.html">sys/device.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../df/d63/spinlock_8h_source.html">ubixos/spinlock.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../d4/d03/kmalloc_8h_source.html">lib/kmalloc.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../da/d28/kprintf_8h_source.html">lib/kprintf.h</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="../../dc/da7/assert_8h_source.html">assert.h</a>&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for device.c:</div>
<div class="dyncontent">
<div class="center"><img src="../../da/d60/device_8c__incl.png" border="0" usemap="#sys_2device_8c" alt=""/></div>
<map name="sys_2device_8c" id="sys_2device_8c">
<area shape="rect" title=" " alt="" coords="272,5,367,32"/>
<area shape="rect" href="../../d4/d7e/include_2sys_2device_8h.html" title=" " alt="" coords="5,80,100,107"/>
<area shape="rect" href="../../df/d63/spinlock_8h.html" title=" " alt="" coords="125,80,247,107"/>
<area shape="rect" href="../../d4/d03/kmalloc_8h.html" title=" " alt="" coords="272,80,367,107"/>
<area shape="rect" href="../../da/d28/kprintf_8h.html" title=" " alt="" coords="391,80,477,107"/>
<area shape="rect" href="../../dc/da7/assert_8h.html" title=" " alt="" coords="501,80,570,107"/>
<area shape="rect" href="../../d0/d27/include_2sys_2types_8h.html" title=" " alt="" coords="207,155,298,181"/>
<area shape="rect" href="../../d0/d6f/__types_8h.html" title=" " alt="" coords="399,379,496,405"/>
<area shape="rect" href="../../d9/dab/select_8h.html" title=" " alt="" coords="337,229,430,256"/>
<area shape="rect" href="../../d6/d92/cdefs_8h.html" title=" " alt="" coords="275,304,364,331"/>
<area shape="rect" href="../../d6/d30/__timespec_8h.html" title=" " alt="" coords="388,304,507,331"/>
<area shape="rect" href="../../df/dc5/__timeval_8h.html" title=" " alt="" coords="531,304,636,331"/>
<area shape="rect" href="../../d6/da4/__sigset_8h.html" title=" " alt="" coords="660,304,760,331"/>
<area shape="rect" href="../../d1/d2d/stdarg_8h.html" title=" " alt="" coords="399,155,469,181"/>
</map>
</div>
</div>
<p><a href="../../d5/d96/device_8c_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="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a24bac04b529afec40daa960bd7e7b8ee"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d96/device_8c.html#a24bac04b529afec40daa960bd7e7b8ee">device_add</a> (int minor, char type, struct <a class="el" href="../../dc/de2/structdevice__interface.html">device_interface</a> *devInfo)</td></tr>
<tr class="separator:a24bac04b529afec40daa960bd7e7b8ee"><td class="memSeparator" colspan="2">&#160;</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> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d96/device_8c.html#a0002a4ec01ee11597c6751602f3e4c3d">device_find</a> (int major, int minor)</td></tr>
<tr class="separator:a0002a4ec01ee11597c6751602f3e4c3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6cc746d95021f087eb5aef767050e71"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d96/device_8c.html#ab6cc746d95021f087eb5aef767050e71">device_remove</a> (struct <a class="el" href="../../de/d35/structdevice__node.html">device_node</a> *deviceToDelete)</td></tr>
<tr class="separator:ab6cc746d95021f087eb5aef767050e71"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a24bac04b529afec40daa960bd7e7b8ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24bac04b529afec40daa960bd7e7b8ee">&#9670;&nbsp;</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&#160;</td>
          <td class="paramname"><em>minor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>type</em>, </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> *&#160;</td>
          <td class="paramname"><em>devInfo</em>&#160;</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="../../d5/d96/device_8c_a24bac04b529afec40daa960bd7e7b8ee_cgraph.png" border="0" usemap="#d5/d96/device_8c_a24bac04b529afec40daa960bd7e7b8ee_cgraph" alt=""/></div>
<map name="d5/d96/device_8c_a24bac04b529afec40daa960bd7e7b8ee_cgraph" id="d5/d96/device_8c_a24bac04b529afec40daa960bd7e7b8ee_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">&#9670;&nbsp;</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&#160;</td>
          <td class="paramname"><em>major</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>minor</em>&#160;</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="../../d5/d96/device_8c_a0002a4ec01ee11597c6751602f3e4c3d_cgraph.png" border="0" usemap="#d5/d96/device_8c_a0002a4ec01ee11597c6751602f3e4c3d_cgraph" alt=""/></div>
<map name="d5/d96/device_8c_a0002a4ec01ee11597c6751602f3e4c3d_cgraph" id="d5/d96/device_8c_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="ab6cc746d95021f087eb5aef767050e71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab6cc746d95021f087eb5aef767050e71">&#9670;&nbsp;</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> *&#160;</td>
          <td class="paramname"><em>deviceToDelete</em></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_a408b6d3a4a484720bc3ecfeac8947e3.html">sys</a></li><li class="navelem"><a class="el" href="../../d5/d96/device_8c.html">device.c</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>