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_I2CContextSwitch*</TITLE> 8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">CAMERA_I2CContextSwitch* <IMG src="../image/TWL.gif" align="middle"></H1> 12<H2>Syntax</H2> 13<DL> 14 <DD> 15 <CODE>#include <twl/camera.h></CODE><BR> 16 <BR> 17 <CODE><A href="CAMERAResult.html">CAMERAResult</A> CAMERA_I2CContextSwitch(<A href="CAMERASelect.html">CAMERASelect</A> camera, <A href="CAMERAContext.html">CAMERAContext</A> context);</CODE> 18 <BR> 19 <CODE><A href="CAMERAResult.html">CAMERAResult</A> CAMERA_I2CContextSwitchAsync(<A href="CAMERASelect.html">CAMERASelect</A> camera, <A href="CAMERAContext.html">CAMERAContext</A> context, <A href="CAMERACallback.html">CAMERACallback</A> callback, void *arg);</CODE> 20</DL> 21<H2>Arguments</H2> 22<TABLE border="1" width="100%"> 23 <TBODY> 24 <TR> 25 <TD width="13%"><EM><STRONG>camera</STRONG></EM></TD> 26 <TD width="87%">Camera to change the context for (<CODE>CAMERA_SELECT_IN</CODE> or <CODE>CAMERA_SELECT_OUT</CODE>).</TD> 27 </TR> 28 <TR> 29 <TD width="13%"><EM><STRONG>context</STRONG></EM></TD> 30 <TD width="87%">Context to change.</TD> 31 </TR> 32 <TR> 33 <TD width="13%"><EM><STRONG>callback</STRONG></EM></TD> 34 <TD width="87%">Function that is called when asynchronous processing has completed.</TD> 35 </TR> 36 <TR> 37 <TD width="13%"><EM><STRONG>arg</STRONG></EM></TD> 38 <TD width="87%">Arguments when the callback function is invoked.</TD> 39 </TR> 40 </TBODY> 41</TABLE> 42 43<H2>Return Values</H2> 44<P>Returns <CODE>CAMERA_RESULT_SUCCESS</CODE> if changes were possible.</P> 45 46<H2>Description</H2> 47<P> 48Switches the camera settings context. It is faster to switch the context than to configure settings individually.<BR><BR> To switch the settings for the specified camera to the specified context (A or B), you cannot set <SPAN class="argument">camera</SPAN> to <CODE>CAMERA_SELECT_NONE</CODE> or <SPAN class="argument">context</SPAN> to <CODE>CAMERA_CONTEXT_BOTH</CODE>.<BR> <BR> Unlike <code>CAMERA_I2CContextSwitch</code>, the <code>CAMERA_I2CContextSwitchAsync</code> function will return control immediately and run asynchronously. Use <SPAN class="argument">callback</SPAN> to confirm that processing has completed. 49</P> 50 51<H2>See Also</H2> 52<P><CODE><A href="CAMERASelect.html">CAMERASelect</A>, <A href="CAMERAContext.html">CAMERAContext</A>, <A href="CAMERACallback.html">CAMERACallback</A>, <A href="CAMERAResult.html">CAMERAResult</A></CODE></P> 53<H2>Revision History</H2> 54<P>2007/10/12 Initial version.</P> 55<hr><p>CONFIDENTIAL</p></body> 56</HTML> 57