Newer
Older
UbixOS / doc / html / ramdrive_8cpp.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>UbixOS V2: src/sys/ubixfsv2/ramdrive.cpp File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
    <li><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="dirs.html"><span>Directories</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>Globals</span></a></li>
  </ul></div>
<div class="nav">
<a class="el" href="dir_897b6a2d7bab147dd1db58381aad3984.html">src</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_832905b1f7f5feaf61a306b40c0ac817.html">sys</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_21e0927e9dd41d8ff1206ca4f0555726.html">ubixfsv2</a></div>
<h1>ramdrive.cpp File Reference</h1><code>#include &lt;stdlib.h&gt;</code><br>
<code>#include &lt;stdio.h&gt;</code><br>
<code>#include &lt;<a class="el" href="string_8h-source.html">string.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="assert_8h-source.html">assert.h</a>&gt;</code><br>
<code>#include &quot;<a class="el" href="ubixfsv2_2device_8h-source.html">device.h</a>&quot;</code><br>

<p>
<a href="ramdrive_8cpp-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ramdrive_8cpp.html#fa106ea6087f9f8423b6ecc98dda7741">RAM_DRIVE_SIZE</a>&nbsp;&nbsp;&nbsp;1024*1024*100</td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ramdrive_8cpp.html#788c47c723973c46800d667ee8eaa979">dev_ramDestroy</a> (void)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structdevice__t.html">device_t</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ramdrive_8cpp.html#fc84c5ce562d095ec8a54c428f416ff1">dev_ramDrive</a> (void)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ramdrive_8cpp.html#38167738dfd96ad366c00f66c6ad30e0">ramDrive_read</a> (<a class="el" href="structdevice__t.html">device_t</a> *<a class="el" href="ethernetif_8c.html#cf6a82c73e7a9d99293d9ce0b8837faf">dev</a>, void *ptr, <a class="el" href="include_2ubixos_2types_8h.html#fa178be408981cc5edd64227b6332fc6">off_t</a> offset, <a class="el" href="include_2ubixos_2types_8h.html#7619b847aeded8a6d14cbfa212b2cdfb">size_t</a> length)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ramdrive_8cpp.html#79604a2fffa2b0d95884fec8c65a0051">ramDrive_write</a> (<a class="el" href="structdevice__t.html">device_t</a> *<a class="el" href="ethernetif_8c.html#cf6a82c73e7a9d99293d9ce0b8837faf">dev</a>, void *ptr, <a class="el" href="include_2ubixos_2types_8h.html#fa178be408981cc5edd64227b6332fc6">off_t</a> offset, <a class="el" href="include_2ubixos_2types_8h.html#7619b847aeded8a6d14cbfa212b2cdfb">size_t</a> length)</td></tr>

<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ramdrive_8cpp.html#3d93ebd0d0885d3fcff115d98e8b4aaf">ram_data</a> = 0x0</td></tr>

</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="fa106ea6087f9f8423b6ecc98dda7741"></a><!-- doxytag: member="ramdrive.cpp::RAM_DRIVE_SIZE" ref="fa106ea6087f9f8423b6ecc98dda7741" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define RAM_DRIVE_SIZE&nbsp;&nbsp;&nbsp;1024*1024*100          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="ramdrive_8cpp-source.html#l00039">39</a> of file <a class="el" href="ramdrive_8cpp-source.html">ramdrive.cpp</a>.
<p>
Referenced by <a class="el" href="ramdrive_8cpp-source.html#l00095">dev_ramDestroy()</a>, and <a class="el" href="ramdrive_8cpp-source.html#l00066">dev_ramDrive()</a>.
</div>
</div><p>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="788c47c723973c46800d667ee8eaa979"></a><!-- doxytag: member="ramdrive.cpp::dev_ramDestroy" ref="788c47c723973c46800d667ee8eaa979" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int dev_ramDestroy           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="ramdrive_8cpp-source.html#l00095">95</a> of file <a class="el" href="ramdrive_8cpp-source.html">ramdrive.cpp</a>.
<p>
References <a class="el" href="file_8c-source.html#l00396">fclose()</a>, <a class="el" href="file_8c-source.html#l00267">fopen()</a>, <a class="el" href="file_8c-source.html#l00193">fwrite()</a>, <a class="el" href="ramdrive_8cpp-source.html#l00037">ram_data</a>, and <a class="el" href="ramdrive_8cpp-source.html#l00039">RAM_DRIVE_SIZE</a>.
<p>
Referenced by <a class="el" href="main_8cpp-source.html#l00012">main()</a>.
</div>
</div><p>
<a class="anchor" name="fc84c5ce562d095ec8a54c428f416ff1"></a><!-- doxytag: member="ramdrive.cpp::dev_ramDrive" ref="fc84c5ce562d095ec8a54c428f416ff1" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structdevice__t.html">device_t</a>* dev_ramDrive           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="ramdrive_8cpp-source.html#l00066">66</a> of file <a class="el" href="ramdrive_8cpp-source.html">ramdrive.cpp</a>.
<p>
References <a class="el" href="file_8c-source.html#l00396">fclose()</a>, <a class="el" href="file_8c-source.html#l00267">fopen()</a>, <a class="el" href="file_8c-source.html#l00178">fread()</a>, <a class="el" href="ubixfsv2_2device_8h-source.html#l00051">device_t::major</a>, <a class="el" href="ramdrive_8cpp-source.html#l00037">ram_data</a>, <a class="el" href="ramdrive_8cpp-source.html#l00039">RAM_DRIVE_SIZE</a>, <a class="el" href="ramdrive_8cpp-source.html#l00043">ramDrive_read()</a>, <a class="el" href="ramdrive_8cpp-source.html#l00054">ramDrive_write()</a>, <a class="el" href="structdevice__t.html#9d3cb5a5fdcf892fe1a9683142174f7f">device_t::read</a>, <a class="el" href="ubixfsv2_2device_8h-source.html#l00053">device_t::sectors</a>, and <a class="el" href="structdevice__t.html#3bbbd39c26ac540dbbb934faffe752fb">device_t::write</a>.
<p>
Referenced by <a class="el" href="main_8cpp-source.html#l00012">main()</a>.
</div>
</div><p>
<a class="anchor" name="38167738dfd96ad366c00f66c6ad30e0"></a><!-- doxytag: member="ramdrive.cpp::ramDrive_read" ref="38167738dfd96ad366c00f66c6ad30e0" args="(device_t *dev, void *ptr, off_t offset, size_t length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static int ramDrive_read           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structdevice__t.html">device_t</a> *&nbsp;</td>
          <td class="paramname"> <em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="include_2ubixos_2types_8h.html#fa178be408981cc5edd64227b6332fc6">off_t</a>&nbsp;</td>
          <td class="paramname"> <em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="include_2ubixos_2types_8h.html#7619b847aeded8a6d14cbfa212b2cdfb">size_t</a>&nbsp;</td>
          <td class="paramname"> <em>length</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="ramdrive_8cpp-source.html#l00043">43</a> of file <a class="el" href="ramdrive_8cpp-source.html">ramdrive.cpp</a>.
<p>
References <a class="el" href="assert_8h-source.html#l00064">assert</a>, <a class="el" href="lib_2string_8h.html#e33b18edb618c656b9b795b9fce2316c">memcpy()</a>, and <a class="el" href="ramdrive_8cpp-source.html#l00037">ram_data</a>.
<p>
Referenced by <a class="el" href="ramdrive_8cpp-source.html#l00066">dev_ramDrive()</a>.
</div>
</div><p>
<a class="anchor" name="79604a2fffa2b0d95884fec8c65a0051"></a><!-- doxytag: member="ramdrive.cpp::ramDrive_write" ref="79604a2fffa2b0d95884fec8c65a0051" args="(device_t *dev, void *ptr, off_t offset, size_t length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static int ramDrive_write           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structdevice__t.html">device_t</a> *&nbsp;</td>
          <td class="paramname"> <em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>ptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="include_2ubixos_2types_8h.html#fa178be408981cc5edd64227b6332fc6">off_t</a>&nbsp;</td>
          <td class="paramname"> <em>offset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="include_2ubixos_2types_8h.html#7619b847aeded8a6d14cbfa212b2cdfb">size_t</a>&nbsp;</td>
          <td class="paramname"> <em>length</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="ramdrive_8cpp-source.html#l00054">54</a> of file <a class="el" href="ramdrive_8cpp-source.html">ramdrive.cpp</a>.
<p>
References <a class="el" href="assert_8h-source.html#l00064">assert</a>, <a class="el" href="lib_2string_8h.html#e33b18edb618c656b9b795b9fce2316c">memcpy()</a>, and <a class="el" href="ramdrive_8cpp-source.html#l00037">ram_data</a>.
<p>
Referenced by <a class="el" href="ramdrive_8cpp-source.html#l00066">dev_ramDrive()</a>.
</div>
</div><p>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="3d93ebd0d0885d3fcff115d98e8b4aaf"></a><!-- doxytag: member="ramdrive.cpp::ram_data" ref="3d93ebd0d0885d3fcff115d98e8b4aaf" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* <a class="el" href="ramdrive_8cpp.html#3d93ebd0d0885d3fcff115d98e8b4aaf">ram_data</a> = 0x0<code> [static]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

<p>
Definition at line <a class="el" href="ramdrive_8cpp-source.html#l00037">37</a> of file <a class="el" href="ramdrive_8cpp-source.html">ramdrive.cpp</a>.
<p>
Referenced by <a class="el" href="ramdrive_8cpp-source.html#l00095">dev_ramDestroy()</a>, <a class="el" href="ramdrive_8cpp-source.html#l00066">dev_ramDrive()</a>, <a class="el" href="ramdrive_8cpp-source.html#l00043">ramDrive_read()</a>, and <a class="el" href="ramdrive_8cpp-source.html#l00054">ramDrive_write()</a>.
</div>
</div><p>
<hr size="1"><address style="align: right;"><small>Generated on Tue Dec 5 23:35:02 2006 for UbixOS V2 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>