# CAMERA_I2CActivate*

## Syntax

  `#include <twl/camera.h>`
  `CAMERAResult CAMERA_I2CActivate(CAMERASelect camera);`
  `CAMERAResult CAMERA_I2CActivateAsync(CAMERASelect camera, CAMERACallback callback, void *arg);`

## Arguments

camera | Specifies which camera to enable or sets both cameras to standby mode.
callback | Completion-time callback function. Specify `NULL` when not needed.
arg | Argument passed to the callback function. If `NULL` has been specified for callback, this value is simply ignored.

## Return Values

Returns `CAMERA_RESULT_SUCCESS` when successful. Returns errors on failure.

## Description

Starts a camera or places it in standby mode. This function starts the camera module itself. The `CAMERA_StartCapture` function must be called to start capturing.
The system has two built-in cameras: an inner camera (`CAMERA_SELECT_IN`) and an outer camera (`CAMERA_SELECT_OUT`). This function specifies which camera is started. The unspecified camera is automatically put into standby mode.
Both the inner and outer cameras can be placed into standby mode by specifying `CAMERA_SELECT_NONE`. To conserve power, we recommend specifying `CAMERA_SELECT_NONE` to place both cameras into standby mode when they are not in use.
Unlike the `CAMERA_I2CActivate` function, the `CAMERA_I2CActivateAsync` function returns control immediately and runs asynchronously. Use callback to confirm that processing has completed.
Note: Immediately after starting the camera, the images obtained from the first four frames may be extremely dark. Furthermore, in addition to the four frames above, stabilization of automatic exposure after a camera is started takes about 14 frames when indoors and 30 frames when outdoors.
Occasional Shifting of Captured Images
The captured image may shift if this function is called during image capture.
Before calling this function, first stop image capture using the `CAMERA_StopCapture` function and then call this function. After this function completes execution, restart image capture using the `CAMERA_StartCapture` function.

## See Also

`CAMERA_StartCapture`
`CAMERASelect`
`CAMERACallback`

## Revision History

2009/11/11 Explained occasional shifting of captured images.
2008/08/18 Revised the description of the time required for exposure adjustment immediately after a camera is started.
2008/07/16 Added information about the number of frames required for automatic exposure correction to stabilize.
2007/11/12 Initial version.

CONFIDENTIAL