[device]Add IR API description
authorpr.jung <pr.jung@samsung.com>
Fri, 15 Apr 2016 01:38:02 +0000 (10:38 +0900)
committerPureum Jung <pr.jung@samsung.com>
Fri, 15 Apr 2016 01:46:10 +0000 (10:46 +0900)
Change-Id: Ibb530abb1df17b77dbeb7cbba5acedf5f270d297
Signed-off-by: pr.jung <pr.jung@samsung.com>
org.tizen.guides/html/native/system/device_n.htm
org.tizen.tutorials/html/native/system/device_tutorial_n.htm

index 5bbb1a3..02e2614 100644 (file)
@@ -41,6 +41,8 @@
    <p>Get the number of displays, the maximum brightness of the display, the current brightness, and the display state. You can also change the current brightness and the display state using the Display API (in <a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__DEVICE__DISPLAY__MODULE.html">mobile</a> and <a href="../../../../org.tizen.native.wearable.apireference/group__CAPI__SYSTEM__DEVICE__DISPLAY__MODULE.html">wearable</a> applications).</p></li>\r
    <li>Haptic\r
    <p>Get the number of haptic devices. You can also open or close the haptic handle, and request the vibration effects to play or stop using the Haptic API (in <a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__DEVICE__HAPTIC__MODULE.html">mobile</a> and <a href="../../../../org.tizen.native.wearable.apireference/group__CAPI__SYSTEM__DEVICE__HAPTIC__MODULE.html">wearable</a> applications).</p></li>\r
+   <li>IR\r
+   <p>Get the information whether IR device is available. You can also transmit IR pattern using the IR API (in <a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__DEVICE__IR__MODULE.html">mobile</a> and <a href="../../../../org.tizen.native.wearable.apireference/group__CAPI__SYSTEM__DEVICE__IR__MODULE.html">wearable</a> applications).</p></li>\r
    <li>LED\r
    <p>Get the maximum and current brightness of the camera flash LED. You can also change the current brightness of the camera flash LED, and request the service LED to play or stop effects using the Led API (in <a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__DEVICE__LED__MODULE.html">mobile</a> and <a href="../../../../org.tizen.native.wearable.apireference/group__CAPI__SYSTEM__DEVICE__LED__MODULE.html">wearable</a> applications).</p></li>\r
    <li>Power\r
index f9306df..32776e3 100644 (file)
@@ -28,6 +28,7 @@
                        <ul class="toc">
                        <li><a href="#display">Controlling the Display</a></li>
                        <li><a href="#haptic">Controlling Haptic Devices</a></li>
+                       <li><a href="#ir">Controlling IR Devices</a></li>
                        <li><a href="#led">Controlling LED Devices</a></li>
                        <li><a href="#power">Controlling the Power State</a></li>
                        </ul></li>
@@ -60,6 +61,8 @@
        <p>Control display devices.</p></li>
        <li><a href="#haptic">Controlling Haptic Devices</a>
        <p>Control haptic devices.</p></li>
+       <li><a href="#ir">Controlling IR Devices</a>
+       <p>Control IR devices.</p></li>
        <li><a href="#led">Controlling LED Devices</a>
        <p>Control LED devices.</p></li>
        <li><a href="#power">Controlling the Power State</a>
@@ -212,6 +215,41 @@ error = device_haptic_close(0, handle);
 </li>
 </ol>
 
+<h2 id="ir" name="ir">Controlling IR Devices</h2>
+
+<p>To control IR devices:</p>
+               <ol>
+               <li>
+<p>To use the functions and data types of the IR API (in <a href="../../../../org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__DEVICE__IR__MODULE.html">mobile</a> and <a href="../../../../org.tizen.native.wearable.apireference/group__CAPI__SYSTEM__DEVICE__IR__MODULE.html">wearable</a> applications), include the <span style="font-family: Courier New,Courier,monospace;">&lt;device/ir.h&gt;</span> header file in your application:</p>
+<pre class="prettyprint">
+#include &lt;device/ir.h&gt;</pre>
+</li>
+
+<li>To manage a ir device:
+<ol type="a">
+<li>Bring information whether IR is available with the <span style="font-family: Courier New,Courier,monospace;">device_ir_is_available()</span> function.
+<p>The function check whether IR device is available.</p>
+<pre class="prettyprint">
+bool avail;
+int error;
+error = device_ir_is_available(&amp;avail);
+</pre>
+</li>
+
+<li>Transmit IR pattern with the <span style="font-family: Courier New,Courier,monospace;">device_ir_transmit()</span> function.
+<p>The device transmit ir pattern with specific carrier frequency.</p>
+<pre class="prettyprint">
+int error;
+int carrier_frequency;
+int *pattern;
+error = device_ir_transmit(carrier_frequency, pattern, size);
+</pre>
+</li>
+
+</ol>
+</li>
+</ol>
+
 <h2 id="led" name="led">Controlling LED Devices</h2>
 
 <p>To control LED devices:</p>