1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>CAMERA_I2CAutoWhiteBalance*</TITLE>
8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">CAMERA_I2CAutoWhiteBalance* <IMG src="../image/TWL.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14  <DD>
15<CODE>#include &lt;twl/camera.h&gt;</CODE><BR> <BR> <CODE><A href="CAMERAResult.html">CAMERAResult</A> CAMERA_I2CAutoWhiteBalance(<A href="CAMERASelect.html">CAMERASelect</A> camera, BOOL on);</CODE> <BR> <CODE><A href="CAMERAResult.html">CAMERAResult</A> CAMERA_I2CAutoWhiteBalanceAsync(<A href="CAMERASelect.html">CAMERASelect</A> camera, BOOL on, <A href="CAMERACallback.html">CAMERACallback</A> callback, void *arg);</CODE>
16</DL>
17<H2>Arguments</H2>
18<TABLE border="1" width="100%">
19  <TBODY>
20    <TR>
21<TD width="13%"><EM><STRONG>camera</STRONG></EM></TD>
22<TD width="87%">Camera to configure (<CODE>CAMERA_SELECT_IN</CODE>, <CODE>CAMERA_SELECT_OUT</CODE>, or <CODE>CAMERA_SELECT_BOTH</CODE>).</TD>
23    </TR>
24    <TR>
25<TD width="13%"><EM><STRONG>on</STRONG></EM></TD>
26<TD width="87%">If <CODE>TRUE</CODE>, the auto-adjustment feature is enabled. If <CODE>FALSE</CODE>, it is disabled.</TD>
27    </TR>
28    <TR>
29<TD width="13%"><EM><STRONG>callback</STRONG></EM></TD>
30<TD width="87%">Function that is called when asynchronous processing has completed.</TD>
31    </TR>
32    <TR>
33<TD width="13%"><EM><STRONG>arg</STRONG></EM></TD>
34<TD width="87%">Arguments when the callback function is invoked.</TD>
35    </TR>
36  </TBODY>
37</TABLE>
38
39<H2>Return Values</H2>
40<P>Returns <CODE>CAMERA_RESULT_SUCCESS</CODE> if configuration was successful.</P>
41
42<H2>Description</H2>
43<P>
44Enables or disables the auto-adjustment feature for the camera's white balance when it is set to &quot;auto&quot; with <a href="CAMERAWhiteBalance.html"><CODE>CAMERA_WHITE_BALANCE_NORMAL</CODE></a>. The exposure value is unstable immediately after the camera is started with the <a href="CAMERA_I2CActivate.html"><CODE>CAMERA_I2CActivate</CODE></a> function. A value of <CODE>INVALID_COMMAND</CODE> is returned if <a href="CAMERAWhiteBalance.html"><CODE>CAMERA_WHITE_BALANCE_NORMAL</CODE></a> is not set. Calling the <a href="CAMERA_I2CWhiteBalance.html"><CODE>CAMERA_I2CWhiteBalance</CODE></a> function resets the value set by this function and enables the auto-adjustment feature.<BR><BR> Unlike <code>CAMERA_I2CAutoWhiteBalance</code>, the <code>CAMERA_I2CAutoWhiteBalanceAsync</code> function returns control immediately and runs asynchronously. Use <SPAN class="argument">callback</SPAN> to confirm that processing has completed.<br><br> <font color="red"><B>Note:</B></font><br> If camera settings are changed using any of the <code>CAMERA_I2C*</code> functions, the changes may be delayed for approximately one frame before they are applied. Consequently, note that if camera settings are changed while capturing, the application may not be able to get an updated image (an image with changes applied) at the time the application intended.
45</P>
46
47<H2>See Also</H2>
48<P><A href="CAMERASelect.html"><CODE>CAMERASelect</CODE></A><BR> <A href="CAMERACallback.html"><CODE>CAMERACallback</CODE></A><BR> <A href="CAMERAResult.html"><CODE>CAMERAResult</CODE></A></P>
49<H2>Revision History</H2>
50<P>
512009/03/25 Added a note on changes to camera settings during capture operations. <br>2008/10/30 Noted that <CODE>CAMERA_SELECT_BOTH</CODE> can also be specified. <br>2008/08/22 Initial version.</P>
52<hr><p>CONFIDENTIAL</p></body>
53</HTML>
54