nn::camera::CTR::IsBusy Function

Syntax

bool IsBusy(
     Port port
);

Arguments

Name Description
in port Specifies the port to check.

Return Values

If currently capturing, returns true; 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 StartCapture, and they continue capturing until the beginning of the next camera V-Blank after calling 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.

When the camera is stopped with Activate( SELECT_NONE ) before calling the StopCapture function, this function may enter a state where it always returns true, depending on the timing when the Activate function is called. In this case, when either camera is set to the Activate function again, this function will return false. To ensure this function returns false while the camera is actually stopped, call the StopCapture function, then, after confirming that this function returns false, stop the camera with 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