⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tos.platform.mica2.adccontrol.nc.html

📁 tinyos中文手册,是根据tinyos系统自带手册翻译过来的,虽然质量不好,但是对英文不强的人还是有用的
💻 HTML
字号:
<html><head><title>Interface: ADCControl</title></head><body><table BORDER="0" CELLPADDING="3" CELLSPACING="0" width="100%"><tr><td><font size="-1"><b><font color="blue"><a href="apps_p.html">Apps</a></font></b>&nbsp;&nbsp;&nbsp;<b><a href="components_p.html">Components</a></b>&nbsp;&nbsp;&nbsp;<b><a href="interfaces_p.html">Interfaces</a></b>&nbsp;&nbsp;&nbsp;<b><a href="allfiles_p.html">All Files</a></b>&nbsp;&nbsp;&nbsp;<b><a href="index.html">Source Tree</a></b>&nbsp;&nbsp;&nbsp;</font></td><td align="right"><font size="-1">source: <b><a href="tos.platform.mica2.ADCControl.nc.source">tos.platform.mica2.ADCControl.nc</a></b></font></td></tr></table><hr><h1 align="center">Interface: ADCControl</h1><p>  Controls various aspects of the ADC. <p><dl><dt>Components providing this interface:<dd>    <a href="tos.platform.mica2.ADCC.nc.html">tos.platform.mica2.ADCC</a><br>    <a href="tos.platform.mica2.ADCREFM.nc.html">tos.platform.mica2.ADCREFM</a><br></dl><p><dl><dt>Components requiring this interface:<dd>    <a href="tos.sensorboards.basicsb.PhotoM.nc.html">tos.sensorboards.basicsb.PhotoM</a><br>    <a href="tos.sensorboards.micasb.AccelM.nc.html">tos.sensorboards.micasb.AccelM</a><br>    <a href="tos.sensorboards.micasb.MagM.nc.html">tos.sensorboards.micasb.MagM</a><br>    <a href="tos.sensorboards.micasb.MicM.nc.html">tos.sensorboards.micasb.MicM</a><br>    <a href="tos.sensorboards.micasb.PhotoTempM.nc.html">tos.sensorboards.micasb.PhotoTempM</a><br></dl><p><table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><tr BGCOLOR="#CCCCFF"><td><h3>Commands</h3></td></tr></table><ul><li>         result_t     <a href="# result_t init(void)"><b>init</b>    </a>(void)<menu> Initializes the ADCControl structures.</menu><p><li>         result_t     <a href="# result_t setSamplingRate(uint8_t rate)"><b>setSamplingRate</b>    </a>(uint8_t rate)<menu> Sets the sampling rate of the ADC.</menu><p><li>         result_t     <a href="# result_t bindPort(uint8_t port, uint8_t adcPort)"><b>bindPort</b>    </a>(uint8_t port, uint8_t adcPort)<menu> Remaps a port in the ADC portmap <code>TOSH_adc_portmap</code>.</menu><p><li>          result_t     <a href="#  result_t manualCalibrate(void)"><b>manualCalibrate</b>    </a>(void)<menu> Initiates calibration of the of the ADC. </menu><p><li>          result_t     <a href="#  result_t autoCalibrate(uint16_t interval)"><b>autoCalibrate</b>    </a>(uint16_t interval)<menu> Initiates and sets the interval for repeated automatic calibration  of the ADC. </menu><p></ul><table BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><tr BGCOLOR="#CCCCFF"><td><h3>Commands - Details</h3></td></tr></table>    <a name=" result_t init(void)"></a>        <h4>init</h4>         result_t <b>init</b>(void)<P><menu> Initializes the ADCControl structures. <table border="0" cellpadding="0"><tr valign="top"><td><b>Returns:</b></td><td> SUCCESS if successful</td></tr></table></menu><hr>    <a name=" result_t setSamplingRate(uint8_t rate)"></a>        <h4>setSamplingRate</h4>         result_t <b>setSamplingRate</b>(uint8_t rate)<P><menu> Sets the sampling rate of the ADC. These are the lower three bits in the ADCSR register of the microprocessor. The <code>rate</code> parameter may use the following macros or its own value from the description below. <p> <pre>  TOS_ADCSample3750ns = 0   TOS_ADCSample7500ns = 1  TOS_ADCSample15us =   2  TOS_ADCSample30us =   3  TOS_ADCSample60us =   4  TOS_ADCSample120us =  5  TOS_ADCSample240us =  6  TOS_ADCSample480us =  7 </pre> <table border="0" cellpadding="0"></td></tr><tr valign="top"><td><br><b>Parameters:</b></td><td><menu><p STYLE="text-indent: -1cm"><b>rate</b> -  2^rate is the prescaler factor to the ADC. The rate of the ADC is the crystal frequency times the prescaler, or XTAL * 2^rate = 32kHz * 2^rate. </menu></td></tr><tr valign="top"><td><b>Returns:</b></td><td> SUCCESS if successful</td></tr></table></menu><hr>    <a name=" result_t bindPort(uint8_t port, uint8_t adcPort)"></a>        <h4>bindPort</h4>         result_t <b>bindPort</b>(uint8_t port, uint8_t adcPort)<P><menu> Remaps a port in the ADC portmap <code>TOSH_adc_portmap</code>. See <code>platform/mica/HPLADCC.td</code> for implementation. <table border="0" cellpadding="0"></td></tr><tr valign="top"><td><br><b>Parameters:</b></td><td><menu><p STYLE="text-indent: -1cm"><b>port</b> -  The port in the portmap you wish to modify </p><p STYLE="text-indent: -1cm"><b>adcPort</b> -  The ADC destination port that <code>port</code> binds to </menu></td></tr><tr valign="top"><td><b>Returns:</b></td><td> SUCCESS if successful</td></tr></table></menu><hr>    <a name="  result_t manualCalibrate(void)"></a>        <h4>manualCalibrate</h4>          result_t <b>manualCalibrate</b>(void)<P><menu> Initiates calibration of the of the ADC.  This may be a software or hardware calibration depending on the platform. <table border="0" cellpadding="0"><tr valign="top"><td><b>Returns:</b></td><td> SUCCESS if the calibration was successfully initiated</td></tr></table></menu><hr>    <a name="  result_t autoCalibrate(uint16_t interval)"></a>        <h4>autoCalibrate</h4>          result_t <b>autoCalibrate</b>(uint16_t interval)<P><menu> Initiates and sets the interval for repeated automatic calibration  of the ADC.  An interval value of 0 (zero) disables automatic calibration <table border="0" cellpadding="0"></td></tr><tr valign="top"><td><br><b>Parameters:</b></td><td><menu><p STYLE="text-indent: -1cm"><b>interval</b> -  The calibration interval in ms.  A value of 0 (zero) disables automatic calibration </menu></td></tr><tr valign="top"><td><b>Returns:</b></td><td> SUCCESS if auto calibration was enabled</td></tr></table></menu>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -