nn::camera::CTR::IsBusy Function

Syntax

bool IsBusy(
     Port port
);

Parameters

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 calling nn::camera::CTR::StartCapture, and they continue capturing until the beginning of the next camera V-Blank after calling nn::camera::CTR::StopCapture.

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 was stopped by a call to nn::camera::CTR::Activate( SELECT_NONE ) before calling nn::camera::CTR::StopCapture, then depending on when the nn::camera::CTR::Activate function was called, it is possible that this function will always return true. In this case, when the nn::camera::CTR::Activate function is run on either camera again, this function will return false. To ensure this function returns false while the camera is actually stopped, call the nn::camera::CTR::StopCapture function, then, after confirming that this function returns false, 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