1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>MIC_DoSampling</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">MIC_DoSampling <img src="../../image/NTR.gif"><img src="../../image/TWL.gif"></h1>
15
16<h2>Syntax</h2>
17
18<dl>
19  <dd>
20<CODE>#include &lt;nitro/spi.h&gt;</CODE><BR>
21  <PRE><CODE><A href="MICResult.html">MICResult</A> MIC_DoSampling(
22            <A href="MICSamplingType.html">MICSamplingType</A>  type,
23            void*            buf );</CODE></PRE>
24  </dd>
25
26</dl><h2>Arguments</h2>
27<TABLE border="1" width="100%">
28  <TBODY>
29    <TR>
30<TD width="300"><SPAN class="argument">type</SPAN></TD>
31<TD width="700">Sampling type as one of the <A href="MICSamplingType.html"><CODE>MICSamplingType</CODE></A> enumerated types.</TD>
32    </TR>
33    <TR>
34<TD><SPAN class="argument">buf</SPAN></TD>
35<TD>Pointer to the buffer where the sampling result is stored.</TD>
36    </TR>
37  </TBODY>
38</TABLE>
39
40<h2>Return Values</h2>
41<p>
42		Returns the processing result as a <A href="MICResult.html"><CODE>MICResult</CODE></A> enumerated type. If the processing completes successfully, returns <code>MIC_RESULT_SUCCESS</code>. If processing fails for some reason, returns some other value.
43</p>
44
45<H2>Description</H2>
46<P>Samples the microphone one time. Use the <A href="../pm/PM_SetAmp.html"><CODE>PM_SetAmp*</CODE></A> function to turn on the programmable gain amp before sampling.<BR>This function issues a request to the ARM7 processor to execute sampling, waits for the ARM7 processor to respond, and then returns the process result. This is the synchronous version of the <A href="MIC_DoSamplingAsync.html"><CODE>MIC_DoSamplingAsync</CODE></A> function. Where the input volume exceeds the minimum or maximum value, the output data will be clamped. You can use the <A href="../pm/PM_SetAmpGain.html"><CODE>PM_SetAmpGain*</CODE></A> functions in advance to adjust the input volume that can be sampled.
47</P>
48
49<H2>Note</H2>
50<P><FONT color=red>This function waits for a PXI interrupt for synchronization purposes. Do not call it when PXI interrupts are prohibited.</FONT></P>
51<P><FONT color=red>It has been confirmed that slight hardware noise is mixed with the microphone input on the TWL system. See <A href="./about_HardwareNoise.html">here</A> for a workaround.</FONT></P>
52
53<H2>See Also</H2>
54<P><A href="MIC_DoSamplingAsync.html"><CODE>MIC_DoSamplingAsync</CODE></A><BR> <A href="../pm/PM_SetAmpGain.html"><CODE>PM_SetAmpGain*</CODE></A></P>
55
56<H2>Revision History</H2>
57<P>
582009/06/25 Added description of using the <CODE>PM_SetAmp*</CODE> function.<br> 2005/03/08 Standardized the Japanese term for &quot;interrupt.&quot;<br> 2005/01/11 Revised return values.<BR> 2004/08/10 Added the description relating to the input volume.<BR> 2004/06/01 Initial version.
59</P>
60<hr><p>CONFIDENTIAL</p></body>
61</html>
62