1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" /> 7<title>SetReceiving</title> 8 </head> 9 <body> 10<h1><CODE>nn::camera::CTR::SetReceiving</CODE> Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14void SetReceiving( 15 <a href="../../../nn/os/Event/Overview.html">nn::os::Event</a> * pEvent, 16 void * pDst, 17 <a href="../../../nn/camera/CTR/Port.html">Port</a> port, 18 size_t imageSize, 19 s16 transferUnit 20); 21</pre> 22 </div> 23<h2>Arguments</h2> 24 <div class="section"> 25 <table class="arguments"> 26 <thead> 27 <tr> 28 <td width="15" /> 29<th>Name</th> 30<td>Description</td> 31 </tr> 32 </thead> 33 <tr> 34<td>out</td> 35<th>pEvent</th> 36<td>Event caused upon completion of a transfer.</td> 37 </tr> 38 <tr> 39<td>out</td> 40<th>pDst</th> 41<td>Image data transfer destination.</td> 42 </tr> 43 <tr> 44<td>in</td> 45<th>port</th> 46<td>Specifies the port that loads image data.</td> 47 </tr> 48 <tr> 49<td>in</td> 50<th>imageSize</th> 51<td>Specifies the total size (frame size) to transfer. This must be an integer multiple of <SPAN class="argument">transferUnit</SPAN>.</td> 52 </tr> 53 <tr> 54<td>in</td> 55<th>transferUnit</th> 56<td>Specifies the size (width × number of lines) to transfer per cycle.</td> 57 </tr> </table> 58 </div> 59<h2>Return Values</h2> 60 <div class="section"> 61None. 62 </div> 63<h2>Description</h2> 64 <div class="section"> 65<p>Configures loading of image data. Only a single frame is received, so this must be set per each camera frame.</p><p> 66The image size specified in <SPAN class="argument">imageSize</SPAN> is twice the number of pixels in the image. If you have specified the number of transfer lines by using the <CODE>SetTransferLines</CODE> function, set the <SPAN class="argument">transferUnit</SPAN> argument to <CODE>image width × the number of transfer lines × 2</CODE>. The doubling is because two bytes are used for each pixel. If have you enabled trimming by using the <CODE>SetTrimming</CODE> function, note that the image's pixel count and width are set to their post-trimming values. If you have specified the number of transfer bytes by using the <CODE>SetTransferBytes</CODE> function, use that value as the <SPAN class="argument">transferUnit</SPAN> argument to this function. 67 </p><P> 68 The output data formats are as follows. 69 </P><P><B>YUV4:2:2(YCbCr)</B><table><tr><td>Bits 31-24</td><td>Bits 23-16</td><td>Bits 15-8</td><td>Bits 7-0</td></tr><tr><td>V (n)</td><td>Y (n+1)</td><td>U (n)</td><td>Y (n)</td></tr></table></P><p> 70 The <SPAN class="argument">pEvent</SPAN> value obtained by this function is in the signaled state when transmission is complete. The only way to clear this state is to call <CODE>Finalize</CODE> on <SPAN class="argument">pEvent</SPAN> or pass <SPAN class="argument">pEvent</SPAN> to one of the <CODE>SetReceiving</CODE> functions. 71 </p><p> 72 After the application approves and the camera transitions to the sleep state, non-signaled dummy events are returned to <SPAN class="argument">pEvent</SPAN> regardless of the load settings. 73 </p><p> 74Do not finalize the <B>pEvent</B> obtained with this function until <CODE>y2r::CTR::Finalize</CODE> executes. 75 </p></div> 76<h2>Revision History</h2> 77 <div class="section"> 78 <dl class="history"> 79 <dt>2010/12/29</dt> 80<dd>Added an explanation about handling events.<br /> 81 </dd> 82 <dt>2010/12/28</dt> 83<dd>Added an explanation of how transmission-complete events are handled after sleep approval.<br /> 84 </dd> 85 <dt>2010/09/24</dt> 86<dd>Added a description about specifying the number of transfer bytes, and edited the description. 87 </dd> 88 <dt>2010/06/17</dt> 89<dd>Explained the conditions for clearing an event's signaled state.<br /> 90 </dd> 91 <dt>2010/02/02</dt> 92<dd>Initial version.<br /> 93 </dd> 94 </dl> 95 </div> 96 <hr><p>CONFIDENTIAL</p></body> 97</html>