blob: 4c3a43f7be3d111078b7f71dbc8769f2196e3f91 [file] [log] [blame] [view]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.hardware.adc
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div>
## **PROTOCOLS**
## Device {#Device}
*Defined in [fuchsia.hardware.adc/adc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.adc/adc.fidl;l=8)*
### GetNormalizedSample {#Device.GetNormalizedSample}
<p>Get sample normalized to [0.0-1.0]</p>
#### Request {#Device.GetNormalizedSample_Request}
&lt;EMPTY&gt;
#### Response {#Device.GetNormalizedSample_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Device_GetNormalizedSample_Result'>Device_GetNormalizedSample_Result</a></code>
</td>
</tr>
</table>
### GetResolution {#Device.GetResolution}
<p>Get adc resolution in number of bits</p>
#### Request {#Device.GetResolution_Request}
&lt;EMPTY&gt;
#### Response {#Device.GetResolution_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Device_GetResolution_Result'>Device_GetResolution_Result</a></code>
</td>
</tr>
</table>
### GetSample {#Device.GetSample}
<p>Get sample - raw count from adc</p>
#### Request {#Device.GetSample_Request}
&lt;EMPTY&gt;
#### Response {#Device.GetSample_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>result</code></td>
<td>
<code><a class='link' href='#Device_GetSample_Result'>Device_GetSample_Result</a></code>
</td>
</tr>
</table>
## **STRUCTS**
### Device_GetNormalizedSample_Response {#Device_GetNormalizedSample_Response data-text="Device_GetNormalizedSample_Response"}
*Defined in [fuchsia.hardware.adc/adc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.adc/adc.fidl;l=20)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Device_GetNormalizedSample_Response.value">
<td><code>value</code></td>
<td>
<code>float32</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### Device_GetResolution_Response {#Device_GetResolution_Response data-text="Device_GetResolution_Response"}
*Defined in [fuchsia.hardware.adc/adc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.adc/adc.fidl;l=10)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Device_GetResolution_Response.resolution">
<td><code>resolution</code></td>
<td>
<code>uint8</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### Device_GetSample_Response {#Device_GetSample_Response data-text="Device_GetSample_Response"}
*Defined in [fuchsia.hardware.adc/adc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.adc/adc.fidl;l=15)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Device_GetSample_Response.value">
<td><code>value</code></td>
<td>
<code>uint32</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
## **UNIONS**
### Device_GetNormalizedSample_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Device_GetNormalizedSample_Result data-text="Device_GetNormalizedSample_Result"}
*Defined in [fuchsia.hardware.adc/adc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.adc/adc.fidl;l=20)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Device_GetNormalizedSample_Result.response">
<td><h3 id="Device_GetNormalizedSample_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Device_GetNormalizedSample_Response'>Device_GetNormalizedSample_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Device_GetNormalizedSample_Result.err">
<td><h3 id="Device_GetNormalizedSample_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td></td>
</tr>
</table>
### Device_GetResolution_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Device_GetResolution_Result data-text="Device_GetResolution_Result"}
*Defined in [fuchsia.hardware.adc/adc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.adc/adc.fidl;l=10)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Device_GetResolution_Result.response">
<td><h3 id="Device_GetResolution_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Device_GetResolution_Response'>Device_GetResolution_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Device_GetResolution_Result.err">
<td><h3 id="Device_GetResolution_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td></td>
</tr>
</table>
### Device_GetSample_Result [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Device_GetSample_Result data-text="Device_GetSample_Result"}
*Defined in [fuchsia.hardware.adc/adc.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.adc/adc.fidl;l=15)*
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Device_GetSample_Result.response">
<td><h3 id="Device_GetSample_Result.response" class="add-link hide-from-toc">1</h3></td>
<td><code>response</code></td>
<td>
<code><a class='link' href='#Device_GetSample_Response'>Device_GetSample_Response</a></code>
</td>
<td></td>
</tr>
<tr id="Device_GetSample_Result.err">
<td><h3 id="Device_GetSample_Result.err" class="add-link hide-from-toc">2</h3></td>
<td><code>err</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#status'>status</a></code>
</td>
<td></td>
</tr>
</table>