nn::camera::CTR::IsBusy Function

Syntax

bool IsBusy(
     Port port
);

Arguments

Name Description
in port Specifies the port to check.

Return Values

Returns true if currently capturing; otherwise, returns false.

Description

Gets whether the camera is currently capturing image data.

In specific terms, the cameras begin capturing image data at the end of the next camera V-Blank after nn::camera::CTR::StartCapture is called; they continue to capture image data until the beginning of the next camera V-Blank after nn::camera::CTR::StopCapture is called.

If the aforementioned functions are called during a camera V-Blank, the camera state is updated during that V-Blank instead of the next V-Blank.

If the camera is stopped by nn::camera::CTR::Activate(SELECT_NONE) before the nn::camera::CTR::StopCapture function is called, this function may enter a state where it always returns true (depending on when nn::camera::CTR::Activate is called). In this case, another call to the nn::camera::CTR::Activate function on either camera will cause this function to return false again. To ensure that this function returns false while the camera is actually stopped, first call the nn::camera::CTR::StopCapture function; next, confirm that this function returns false; and finally stop the camera with nn::camera::CTR::Activate(SELECT_NONE).

Closing the cover of the system automatically stops the camera. For this reason, depending on the timing of when the cover is closed, this function may enter a state where it always returns true. When the cover is opened, the system automatically restarts the camera, and the above state is cancelled. But when a process to transition from the cover closed to sleep is implemented, be aware that if this function performs polling, it may not be able to exit from the loop.

Revision History

2010/11/01
Added an explanation about behavior when the camera is stopped and when the cover is closed.
2010/04/09
Added description text.
2010/01/07
Initial version.

CONFIDENTIAL