# 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 callback function. Specify `NULL` if this is unnecessary.
arg | Arguments to pass to the completion callback function. This is simply ignored if `NULL` was specified for `callback`.

## Return Values

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

## Description

Starts the cameras or places them in standby mode. This function starts the camera module itself. The `CAMERA_StartCapture` function must be called to start capturing.
The system has two internal cameras: an inner camera (`CAMERA_SELECT_IN`) and an outer camera (`CAMERA_SELECT_OUT`). The camera specified to this function is started. The unspecified camera will automatically be 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 will return control immediately and run 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. Including these four frames, automatic exposure will take approximately 14 frames indoors and 30 frames outdoors to stabilize after the camera is started.

## See Also

`CAMERA_StartCapture`
`CAMERASelect
CAMERACallback`

## Revision History

2008/08/18 Revised the description of the time taken to adjust the exposure immediately after the camera is started.
2008/07/16 Added a note about the number of frames taken for automatic exposure correction to stabilize.
2007/11/12 Initial version.

CONFIDENTIAL