nn::camera::CTR::SetReceiving Function

Syntax

void SetReceiving(
     nn::os::Event * pEvent,
     void * pDst,
     Port port,
     size_t imageSize,
     s16 transferUnit
);

Arguments

Name Description
out pEvent Event caused upon completion of a transfer.
out pDst Image data transfer destination.
in port Specifies the port that loads image data.
in imageSize Specifies the total size (frame size) to transfer. This must be an integer multiple of transferUnit.
in transferUnit Specifies the size (width × number of lines) to transfer per cycle.

Return Values

None.

Description

Configures loading of image data. Only a single frame is received, so this must be set per each camera frame.

The image size specified in imageSize is twice the number of pixels in the image. If you have specified the number of transfer lines by using the SetTransferLines function, set the transferUnit argument to image width × the number of transfer lines × 2. The doubling is because two bytes are used for each pixel. If have you enabled trimming by using the SetTrimming function, note that the image's pixel count and width are set to their post-trimming values. If you have specified the number of transfer bytes by using the SetTransferBytes function, use that value as the transferUnit argument to this function.

The output data formats are as follows.

YUV4:2:2(YCbCr)

Bits 31-24Bits 23-16Bits 15-8Bits 7-0
V (n)Y (n+1)U (n)Y (n)

The pEvent value obtained by this function is in the signaled state when transmission is complete. The only way to clear this state is to call Finalize on pEvent or pass pEvent to one of the SetReceiving functions.

After the application approves and the camera transitions to the sleep state, non-signaled dummy events are returned to pEvent regardless of the load settings.

Do not finalize the pEvent obtained with this function until y2r::CTR::Finalize executes.

Revision History

2010/12/29
Added an explanation about handling events.
2010/12/28
Added an explanation of how transmission-complete events are handled after sleep approval.
2010/09/24
Added a description about specifying the number of transfer bytes, and edited the description.
2010/06/17
Explained the conditions for clearing an event's signaled state.
2010/02/02
Initial version.

CONFIDENTIAL