libnds
|
Camera functions for the ARM9. More...
#include <stdbool.h>
#include <stddef.h>
Enumerations | |
enum | CameraDevice { CAMERA_INNER = 0 , CAMERA_OUTER = 1 , CAMERA_NONE = 2 } |
Types of camera in a DSi. More... | |
Functions | |
bool | cameraDeinit (void) |
Deinitializes the camera driver. | |
bool | cameraInit (void) |
Initializes the camera driver. | |
bool | cameraSelect (CameraDevice device) |
Selects the active camera. | |
bool | cameraSetCaptureMode (u8 captureMode) |
Forcibly sets Capture mode. | |
bool | cameraStartTransfer (u16 *buffer, u8 captureMode, u8 ndmaId) |
Starts a camera transfer using the specified NDMA channel. | |
static void | cameraStopTransfer (void) |
Stops a camera transfer. | |
static bool | cameraTransferActive (void) |
Checks if a camera transfer is active. | |
Camera functions for the ARM9.
enum CameraDevice |
bool cameraDeinit | ( | void | ) |
Deinitializes the camera driver.
bool cameraInit | ( | void | ) |
Initializes the camera driver.
bool cameraSelect | ( | CameraDevice | device | ) |
Selects the active camera.
device | Camera to use (internal or external). |
bool cameraSetCaptureMode | ( | u8 | captureMode | ) |
Forcibly sets Capture mode.
captureMode |
Starts a camera transfer using the specified NDMA channel.
It sets the capture mode if the previous mode is unknown.
To check if the transfer is finished, use ndmaBusy() and cameraTransferActive(). If either of them is busy, the transfer is in progress.
buffer | Buffer where the captured image will be stored. |
captureMode | Normally MCUREG_APT_SEQ_CMD_PREVIEW or MCUREG_APT_SEQ_CMD_CAPTURE. |
ndmaId | NDMA channel to use (0 - 3). |
|
inlinestatic |
Stops a camera transfer.
Call this function after the NDMA transfer has ended.
|
inlinestatic |
Checks if a camera transfer is active.