libctru  v1.6.0
Data Structures | Enumerations | Functions
cam.h File Reference

CAM service for using the 3DS's front and back cameras. More...

#include <3ds/services/y2r.h>
#include <3ds/types.h>

Go to the source code of this file.

Data Structures

struct  CAMU_ImageQualityCalibrationData
 Image quality calibration data. More...
 
struct  CAMU_StereoCameraCalibrationData
 Stereo camera calibration data. More...
 
struct  CAMU_PackageParameterCameraSelect
 Batch camera configuration for use without a context. More...
 
struct  CAMU_PackageParameterContext
 Batch camera configuration for use with a context. More...
 
struct  CAMU_PackageParameterContextDetail
 Batch camera configuration for use with a context and with detailed size information. More...
 

Enumerations

enum  {
  PORT_NONE = 0x0,
  PORT_CAM1 = BIT(0),
  PORT_CAM2 = BIT(1),
  PORT_BOTH = PORT_CAM1 | PORT_CAM2
}
 Camera connection target ports. More...
 
enum  {
  SELECT_NONE = 0x0,
  SELECT_OUT1 = BIT(0),
  SELECT_IN1 = BIT(1),
  SELECT_OUT2 = BIT(2),
  SELECT_IN1_OUT1 = SELECT_OUT1 | SELECT_IN1,
  SELECT_OUT1_OUT2 = SELECT_OUT1 | SELECT_OUT2,
  SELECT_IN1_OUT2 = SELECT_IN1 | SELECT_OUT2,
  SELECT_ALL = SELECT_OUT1 | SELECT_IN1 | SELECT_OUT2
}
 Camera combinations. More...
 
enum  CAMU_Context {
  CONTEXT_NONE = 0x0,
  CONTEXT_A = BIT(0),
  CONTEXT_B = BIT(1),
  CONTEXT_BOTH = CONTEXT_A | CONTEXT_B
}
 Camera contexts. More...
 
enum  CAMU_Flip {
  FLIP_NONE = 0x0,
  FLIP_HORIZONTAL = 0x1,
  FLIP_VERTICAL = 0x2,
  FLIP_REVERSE = 0x3
}
 Ways to flip the camera image. More...
 
enum  CAMU_Size {
  SIZE_VGA = 0x0,
  SIZE_QVGA = 0x1,
  SIZE_QQVGA = 0x2,
  SIZE_CIF = 0x3,
  SIZE_QCIF = 0x4,
  SIZE_DS_LCD = 0x5,
  SIZE_DS_LCDx4 = 0x6,
  SIZE_CTR_TOP_LCD = 0x7,
  SIZE_CTR_BOTTOM_LCD = SIZE_QVGA
}
 Camera image resolutions. More...
 
enum  CAMU_FrameRate {
  FRAME_RATE_15 = 0x0,
  FRAME_RATE_15_TO_5 = 0x1,
  FRAME_RATE_15_TO_2 = 0x2,
  FRAME_RATE_10 = 0x3,
  FRAME_RATE_8_5 = 0x4,
  FRAME_RATE_5 = 0x5,
  FRAME_RATE_20 = 0x6,
  FRAME_RATE_20_TO_5 = 0x7,
  FRAME_RATE_30 = 0x8,
  FRAME_RATE_30_TO_5 = 0x9,
  FRAME_RATE_15_TO_10 = 0xA,
  FRAME_RATE_20_TO_10 = 0xB,
  FRAME_RATE_30_TO_10 = 0xC
}
 Camera capture frame rates. More...
 
enum  CAMU_WhiteBalance {
  WHITE_BALANCE_AUTO = 0x0,
  WHITE_BALANCE_3200K = 0x1,
  WHITE_BALANCE_4150K = 0x2,
  WHITE_BALANCE_5200K = 0x3,
  WHITE_BALANCE_6000K = 0x4,
  WHITE_BALANCE_7000K = 0x5,
  WHITE_BALANCE_NORMAL = WHITE_BALANCE_AUTO,
  WHITE_BALANCE_TUNGSTEN = WHITE_BALANCE_3200K,
  WHITE_BALANCE_WHITE_FLUORESCENT_LIGHT = WHITE_BALANCE_4150K,
  WHITE_BALANCE_DAYLIGHT = WHITE_BALANCE_5200K,
  WHITE_BALANCE_CLOUDY = WHITE_BALANCE_6000K,
  WHITE_BALANCE_HORIZON = WHITE_BALANCE_6000K,
  WHITE_BALANCE_SHADE = WHITE_BALANCE_7000K
}
 Camera white balance modes. More...
 
enum  CAMU_PhotoMode {
  PHOTO_MODE_NORMAL = 0x0,
  PHOTO_MODE_PORTRAIT = 0x1,
  PHOTO_MODE_LANDSCAPE = 0x2,
  PHOTO_MODE_NIGHTVIEW = 0x3,
  PHOTO_MODE_LETTER = 0x4
}
 Camera photo modes. More...
 
enum  CAMU_Effect {
  EFFECT_NONE = 0x0,
  EFFECT_MONO = 0x1,
  EFFECT_SEPIA = 0x2,
  EFFECT_NEGATIVE = 0x3,
  EFFECT_NEGAFILM = 0x4,
  EFFECT_SEPIA01 = 0x5
}
 Camera special effects. More...
 
enum  CAMU_Contrast {
  CONTRAST_PATTERN_01 = 0x0,
  CONTRAST_PATTERN_02 = 0x1,
  CONTRAST_PATTERN_03 = 0x2,
  CONTRAST_PATTERN_04 = 0x3,
  CONTRAST_PATTERN_05 = 0x4,
  CONTRAST_PATTERN_06 = 0x5,
  CONTRAST_PATTERN_07 = 0x6,
  CONTRAST_PATTERN_08 = 0x7,
  CONTRAST_PATTERN_09 = 0x8,
  CONTRAST_PATTERN_10 = 0x9,
  CONTRAST_PATTERN_11 = 0xA,
  CONTRAST_LOW = CONTRAST_PATTERN_05,
  CONTRAST_NORMAL = CONTRAST_PATTERN_06,
  CONTRAST_HIGH = CONTRAST_PATTERN_07
}
 Camera contrast patterns. More...
 
enum  CAMU_LensCorrection {
  LENS_CORRECTION_OFF = 0x0,
  LENS_CORRECTION_ON_70 = 0x1,
  LENS_CORRECTION_ON_90 = 0x2,
  LENS_CORRECTION_DARK = LENS_CORRECTION_OFF,
  LENS_CORRECTION_NORMAL = LENS_CORRECTION_ON_70,
  LENS_CORRECTION_BRIGHT = LENS_CORRECTION_ON_90
}
 Camera lens correction modes. More...
 
enum  CAMU_OutputFormat {
  OUTPUT_YUV_422 = 0x0,
  OUTPUT_RGB_565 = 0x1
}
 Camera image output formats. More...
 
enum  CAMU_ShutterSoundType {
  SHUTTER_SOUND_TYPE_NORMAL = 0x0,
  SHUTTER_SOUND_TYPE_MOVIE = 0x1,
  SHUTTER_SOUND_TYPE_MOVIE_END = 0x2
}
 Camera shutter sounds. More...
 

Functions

Result camInit (void)
 Initializes the cam service. More...
 
void camExit (void)
 Closes the cam service. More...
 
Result CAMU_StartCapture (u32 port)
 Begins capture on the specified camera port. More...
 
Result CAMU_StopCapture (u32 port)
 Terminates capture on the specified camera port. More...
 
Result CAMU_IsBusy (bool *busy, u32 port)
 Gets whether the specified camera port is busy. More...
 
Result CAMU_ClearBuffer (u32 port)
 Clears the buffer and error flags of the specified camera port. More...
 
Result CAMU_GetVsyncInterruptEvent (Handle *event, u32 port)
 Gets a handle to the event signaled on vsync interrupts. More...
 
Result CAMU_GetBufferErrorInterruptEvent (Handle *event, u32 port)
 Gets a handle to the event signaled on camera buffer errors. More...
 
Result CAMU_SetReceiving (Handle *event, void *dst, u32 port, u32 imageSize, s16 transferUnit)
 Initiates the process of receiving a camera frame. More...
 
Result CAMU_IsFinishedReceiving (bool *finishedReceiving, u32 port)
 Gets whether the specified camera port has finished receiving image data. More...
 
Result CAMU_SetTransferLines (u32 port, s16 lines, s16 width, s16 height)
 Sets the number of lines to transfer into an image buffer. More...
 
Result CAMU_GetMaxLines (s16 *maxLines, s16 width, s16 height)
 Gets the maximum number of lines that can be saved to an image buffer. More...
 
Result CAMU_SetTransferBytes (u32 port, u32 bytes, s16 width, s16 height)
 Sets the number of bytes to transfer into an image buffer. More...
 
Result CAMU_GetTransferBytes (u32 *transferBytes, u32 port)
 Gets the number of bytes to transfer into an image buffer. More...
 
Result CAMU_GetMaxBytes (u32 *maxBytes, s16 width, s16 height)
 Gets the maximum number of bytes that can be saved to an image buffer. More...
 
Result CAMU_SetTrimming (u32 port, bool trimming)
 Sets whether image trimming is enabled. More...
 
Result CAMU_IsTrimming (bool *trimming, u32 port)
 Gets whether image trimming is enabled. More...
 
Result CAMU_SetTrimmingParams (u32 port, s16 xStart, s16 yStart, s16 xEnd, s16 yEnd)
 Sets the parameters used for trimming images. More...
 
Result CAMU_GetTrimmingParams (s16 *xStart, s16 *yStart, s16 *xEnd, s16 *yEnd, u32 port)
 Gets the parameters used for trimming images. More...
 
Result CAMU_SetTrimmingParamsCenter (u32 port, s16 trimWidth, s16 trimHeight, s16 camWidth, s16 camHeight)
 Sets the parameters used for trimming images, relative to the center of the image. More...
 
Result CAMU_Activate (u32 select)
 Activates the specified camera. More...
 
Result CAMU_SwitchContext (u32 select, CAMU_Context context)
 Switches the specified camera's active context. More...
 
Result CAMU_SetExposure (u32 select, s8 exposure)
 Sets the exposure value of the specified camera. More...
 
Result CAMU_SetWhiteBalance (u32 select, CAMU_WhiteBalance whiteBalance)
 Sets the white balance mode of the specified camera. More...
 
Result CAMU_SetWhiteBalanceWithoutBaseUp (u32 select, CAMU_WhiteBalance whiteBalance)
 Sets the white balance mode of the specified camera. More...
 
Result CAMU_SetSharpness (u32 select, s8 sharpness)
 Sets the sharpness of the specified camera. More...
 
Result CAMU_SetAutoExposure (u32 select, bool autoExposure)
 Sets whether auto exposure is enabled on the specified camera. More...
 
Result CAMU_IsAutoExposure (bool *autoExposure, u32 select)
 Gets whether auto exposure is enabled on the specified camera. More...
 
Result CAMU_SetAutoWhiteBalance (u32 select, bool autoWhiteBalance)
 Sets whether auto white balance is enabled on the specified camera. More...
 
Result CAMU_IsAutoWhiteBalance (bool *autoWhiteBalance, u32 select)
 Gets whether auto white balance is enabled on the specified camera. More...
 
Result CAMU_FlipImage (u32 select, CAMU_Flip flip, CAMU_Context context)
 Flips the image of the specified camera in the specified context. More...
 
Result CAMU_SetDetailSize (u32 select, s16 width, s16 height, s16 cropX0, s16 cropY0, s16 cropX1, s16 cropY1, CAMU_Context context)
 Sets the image resolution of the given camera in the given context, in detail. More...
 
Result CAMU_SetSize (u32 select, CAMU_Size size, CAMU_Context context)
 Sets the image resolution of the given camera in the given context. More...
 
Result CAMU_SetFrameRate (u32 select, CAMU_FrameRate frameRate)
 Sets the frame rate of the given camera. More...
 
Result CAMU_SetPhotoMode (u32 select, CAMU_PhotoMode photoMode)
 Sets the photo mode of the given camera. More...
 
Result CAMU_SetEffect (u32 select, CAMU_Effect effect, CAMU_Context context)
 Sets the special effects of the given camera in the given context. More...
 
Result CAMU_SetContrast (u32 select, CAMU_Contrast contrast)
 Sets the contrast mode of the given camera. More...
 
Result CAMU_SetLensCorrection (u32 select, CAMU_LensCorrection lensCorrection)
 Sets the lens correction mode of the given camera. More...
 
Result CAMU_SetOutputFormat (u32 select, CAMU_OutputFormat format, CAMU_Context context)
 Sets the output format of the given camera in the given context. More...
 
Result CAMU_SetAutoExposureWindow (u32 select, s16 x, s16 y, s16 width, s16 height)
 Sets the region to base auto exposure off of for the specified camera. More...
 
Result CAMU_SetAutoWhiteBalanceWindow (u32 select, s16 x, s16 y, s16 width, s16 height)
 Sets the region to base auto white balance off of for the specified camera. More...
 
Result CAMU_SetNoiseFilter (u32 select, bool noiseFilter)
 Sets whether the specified camera's noise filter is enabled. More...
 
Result CAMU_SynchronizeVsyncTiming (u32 select1, u32 select2)
 Synchronizes the specified cameras' vsync timing. More...
 
Result CAMU_GetLatestVsyncTiming (s64 *timing, u32 port, u32 past)
 Gets the vsync timing record of the specified camera for the specified number of signals. More...
 
Result CAMU_GetStereoCameraCalibrationData (CAMU_StereoCameraCalibrationData *data)
 Gets the specified camera's stereo camera calibration data. More...
 
Result CAMU_SetStereoCameraCalibrationData (CAMU_StereoCameraCalibrationData data)
 Sets the specified camera's stereo camera calibration data. More...
 
Result CAMU_WriteRegisterI2c (u32 select, u16 addr, u16 data)
 Writes to the specified I2C register of the specified camera. More...
 
Result CAMU_WriteMcuVariableI2c (u32 select, u16 addr, u16 data)
 Writes to the specified MCU variable of the specified camera. More...
 
Result CAMU_ReadRegisterI2cExclusive (u16 *data, u32 select, u16 addr)
 Reads the specified I2C register of the specified camera. More...
 
Result CAMU_ReadMcuVariableI2cExclusive (u16 *data, u32 select, u16 addr)
 Reads the specified MCU variable of the specified camera. More...
 
Result CAMU_SetImageQualityCalibrationData (CAMU_ImageQualityCalibrationData data)
 Sets the specified camera's image quality calibration data. More...
 
Result CAMU_GetImageQualityCalibrationData (CAMU_ImageQualityCalibrationData *data)
 Gets the specified camera's image quality calibration data. More...
 
Result CAMU_SetPackageParameterWithoutContext (CAMU_PackageParameterCameraSelect param)
 Configures a camera with pre-packaged configuration data without a context. More...
 
Result CAMU_SetPackageParameterWithContext (CAMU_PackageParameterContext param)
 Configures a camera with pre-packaged configuration data with a context. More...
 
Result CAMU_SetPackageParameterWithContextDetail (CAMU_PackageParameterContextDetail param)
 Configures a camera with pre-packaged configuration data without a context and extra resolution details. More...
 
Result CAMU_GetSuitableY2rStandardCoefficient (Y2RU_StandardCoefficient *coefficient)
 Gets the Y2R coefficient applied to image data by the camera. More...
 
Result CAMU_PlayShutterSound (CAMU_ShutterSoundType sound)
 Plays the specified shutter sound. More...
 
Result CAMU_DriverInitialize (void)
 Initializes the camera driver.
 
Result CAMU_DriverFinalize (void)
 Finalizes the camera driver.
 
Result CAMU_GetActivatedCamera (u32 *select)
 Gets the current activated camera. More...
 
Result CAMU_GetSleepCamera (u32 *select)
 Gets the current sleep camera. More...
 
Result CAMU_SetSleepCamera (u32 select)
 Sets the current sleep camera. More...
 
Result CAMU_SetBrightnessSynchronization (bool brightnessSynchronization)
 Sets whether to enable synchronization of left and right camera brightnesses. More...
 

Detailed Description

CAM service for using the 3DS's front and back cameras.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Camera connection target ports.

Enumerator
PORT_NONE 

No port.

PORT_CAM1 

CAM1 port.

PORT_CAM2 

CAM2 port.

PORT_BOTH 

Both ports.

◆ anonymous enum

anonymous enum

Camera combinations.

Enumerator
SELECT_NONE 

No camera.

SELECT_OUT1 

Outer camera 1.

SELECT_IN1 

Inner camera 1.

SELECT_OUT2 

Outer camera 2.

SELECT_IN1_OUT1 

Outer camera 1 and inner camera 1.

SELECT_OUT1_OUT2 

Both outer cameras.

SELECT_IN1_OUT2 

Inner camera 1 and outer camera 2.

SELECT_ALL 

All cameras.

◆ CAMU_Context

Camera contexts.

Enumerator
CONTEXT_NONE 

No context.

CONTEXT_A 

Context A.

CONTEXT_B 

Context B.

CONTEXT_BOTH 

Both contexts.

◆ CAMU_Contrast

Camera contrast patterns.

Enumerator
CONTRAST_PATTERN_01 

Pattern 1.

CONTRAST_PATTERN_02 

Pattern 2.

CONTRAST_PATTERN_03 

Pattern 3.

CONTRAST_PATTERN_04 

Pattern 4.

CONTRAST_PATTERN_05 

Pattern 5.

CONTRAST_PATTERN_06 

Pattern 6.

CONTRAST_PATTERN_07 

Pattern 7.

CONTRAST_PATTERN_08 

Pattern 8.

CONTRAST_PATTERN_09 

Pattern 9.

CONTRAST_PATTERN_10 

Pattern 10.

CONTRAST_PATTERN_11 

Pattern 11.

CONTRAST_LOW 

Low contrast. (5)

CONTRAST_NORMAL 

Normal contrast. (6)

CONTRAST_HIGH 

High contrast. (7)

◆ CAMU_Effect

Camera special effects.

Enumerator
EFFECT_NONE 

No effects.

EFFECT_MONO 

Mono effect.

EFFECT_SEPIA 

Sepia effect.

EFFECT_NEGATIVE 

Negative effect.

EFFECT_NEGAFILM 

Negative film effect.

EFFECT_SEPIA01 

Sepia effect.

◆ CAMU_Flip

enum CAMU_Flip

Ways to flip the camera image.

Enumerator
FLIP_NONE 

No flip.

FLIP_HORIZONTAL 

Horizontal flip.

FLIP_VERTICAL 

Vertical flip.

FLIP_REVERSE 

Reverse flip.

◆ CAMU_FrameRate

Camera capture frame rates.

Enumerator
FRAME_RATE_15 

15 FPS.

FRAME_RATE_15_TO_5 

15-5 FPS.

FRAME_RATE_15_TO_2 

15-2 FPS.

FRAME_RATE_10 

10 FPS.

FRAME_RATE_8_5 

8.5 FPS.

FRAME_RATE_5 

5 FPS.

FRAME_RATE_20 

20 FPS.

FRAME_RATE_20_TO_5 

20-5 FPS.

FRAME_RATE_30 

30 FPS.

FRAME_RATE_30_TO_5 

30-5 FPS.

FRAME_RATE_15_TO_10 

15-10 FPS.

FRAME_RATE_20_TO_10 

20-10 FPS.

FRAME_RATE_30_TO_10 

30-10 FPS.

◆ CAMU_LensCorrection

Camera lens correction modes.

Enumerator
LENS_CORRECTION_OFF 

No lens correction.

LENS_CORRECTION_ON_70 

Edge-to-center brightness ratio of 70.

LENS_CORRECTION_ON_90 

Edge-to-center brightness ratio of 90.

LENS_CORRECTION_DARK 

Dark lens correction. (OFF)

LENS_CORRECTION_NORMAL 

Normal lens correction. (70)

LENS_CORRECTION_BRIGHT 

Bright lens correction. (90)

◆ CAMU_OutputFormat

Camera image output formats.

Enumerator
OUTPUT_YUV_422 

YUV422.

OUTPUT_RGB_565 

RGB565.

◆ CAMU_PhotoMode

Camera photo modes.

Enumerator
PHOTO_MODE_NORMAL 

Normal mode.

PHOTO_MODE_PORTRAIT 

Portrait mode.

PHOTO_MODE_LANDSCAPE 

Landscape mode.

PHOTO_MODE_NIGHTVIEW 

Night mode.

PHOTO_MODE_LETTER 

Letter mode.

◆ CAMU_ShutterSoundType

Camera shutter sounds.

Enumerator
SHUTTER_SOUND_TYPE_NORMAL 

Normal shutter sound.

SHUTTER_SOUND_TYPE_MOVIE 

Shutter sound to begin a movie.

SHUTTER_SOUND_TYPE_MOVIE_END 

Shutter sound to end a movie.

◆ CAMU_Size

enum CAMU_Size

Camera image resolutions.

Enumerator
SIZE_VGA 

VGA size. (640x480)

SIZE_QVGA 

QVGA size. (320x240)

SIZE_QQVGA 

QQVGA size. (160x120)

SIZE_CIF 

CIF size. (352x288)

SIZE_QCIF 

QCIF size. (176x144)

SIZE_DS_LCD 

DS LCD size. (256x192)

SIZE_DS_LCDx4 

DS LCD x4 size. (512x384)

SIZE_CTR_TOP_LCD 

CTR Top LCD size. (400x240)

SIZE_CTR_BOTTOM_LCD 

CTR Bottom LCD size. (320x240)

◆ CAMU_WhiteBalance

Camera white balance modes.

Enumerator
WHITE_BALANCE_AUTO 

Auto white balance.

WHITE_BALANCE_3200K 

3200K white balance.

WHITE_BALANCE_4150K 

4150K white balance.

WHITE_BALANCE_5200K 

5200K white balance.

WHITE_BALANCE_6000K 

6000K white balance.

WHITE_BALANCE_7000K 

7000K white balance.

Function Documentation

◆ camExit()

void camExit ( void  )

Closes the cam service.

This will internally call CAMU_DriverFinalize and close the handle of the service.

Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ camInit()

Result camInit ( void  )

Initializes the cam service.

This will internally get the handle of the service, and on success call CAMU_DriverInitialize.

Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ CAMU_Activate()

Result CAMU_Activate ( u32  select)

Activates the specified camera.

Parameters
selectCamera to use.
Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ CAMU_ClearBuffer()

Result CAMU_ClearBuffer ( u32  port)

Clears the buffer and error flags of the specified camera port.

Parameters
portPort to clear.
Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ CAMU_FlipImage()

Result CAMU_FlipImage ( u32  select,
CAMU_Flip  flip,
CAMU_Context  context 
)

Flips the image of the specified camera in the specified context.

Parameters
selectCamera to use.
flipFlip mode to use.
contextContext to use.

◆ CAMU_GetActivatedCamera()

Result CAMU_GetActivatedCamera ( u32 select)

Gets the current activated camera.

Parameters
selectPointer to output the current activated camera to.

◆ CAMU_GetBufferErrorInterruptEvent()

Result CAMU_GetBufferErrorInterruptEvent ( Handle event,
u32  port 
)

Gets a handle to the event signaled on camera buffer errors.

Parameters
eventPointer to output the event handle to.
portPort to use.

◆ CAMU_GetImageQualityCalibrationData()

Result CAMU_GetImageQualityCalibrationData ( CAMU_ImageQualityCalibrationData data)

Gets the specified camera's image quality calibration data.

Parameters
dataPointer to write the quality data to.

◆ CAMU_GetLatestVsyncTiming()

Result CAMU_GetLatestVsyncTiming ( s64 timing,
u32  port,
u32  past 
)

Gets the vsync timing record of the specified camera for the specified number of signals.

Parameters
timingPointer to write timing data to. (size "past * sizeof(s64)")
portPort to use.
pastNumber of past timings to retrieve.

◆ CAMU_GetMaxBytes()

Result CAMU_GetMaxBytes ( u32 maxBytes,
s16  width,
s16  height 
)

Gets the maximum number of bytes that can be saved to an image buffer.

Parameters
maxBytesPointer to write the maximum number of bytes to.
widthWidth of the image.
heightHeight of the image.
Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ CAMU_GetMaxLines()

Result CAMU_GetMaxLines ( s16 maxLines,
s16  width,
s16  height 
)

Gets the maximum number of lines that can be saved to an image buffer.

Parameters
maxLinesPointer to write the maximum number of lines to.
widthWidth of the image.
heightHeight of the image.

◆ CAMU_GetSleepCamera()

Result CAMU_GetSleepCamera ( u32 select)

Gets the current sleep camera.

Parameters
selectPointer to output the current sleep camera to.

◆ CAMU_GetStereoCameraCalibrationData()

Result CAMU_GetStereoCameraCalibrationData ( CAMU_StereoCameraCalibrationData data)

Gets the specified camera's stereo camera calibration data.

Parameters
dataPointer to output the stereo camera data to.

◆ CAMU_GetSuitableY2rStandardCoefficient()

Result CAMU_GetSuitableY2rStandardCoefficient ( Y2RU_StandardCoefficient coefficient)

Gets the Y2R coefficient applied to image data by the camera.

Parameters
coefficientPointer to output the Y2R coefficient to.

◆ CAMU_GetTransferBytes()

Result CAMU_GetTransferBytes ( u32 transferBytes,
u32  port 
)

Gets the number of bytes to transfer into an image buffer.

Parameters
transferBytesPointer to write the number of bytes to.
portPort to use.

◆ CAMU_GetTrimmingParams()

Result CAMU_GetTrimmingParams ( s16 xStart,
s16 yStart,
s16 xEnd,
s16 yEnd,
u32  port 
)

Gets the parameters used for trimming images.

Parameters
xStartPointer to write the start X coordinate to.
yStartPointer to write the start Y coordinate to.
xEndPointer to write the end X coordinate to.
yEndPointer to write the end Y coordinate to.
portPort to use.

◆ CAMU_GetVsyncInterruptEvent()

Result CAMU_GetVsyncInterruptEvent ( Handle event,
u32  port 
)

Gets a handle to the event signaled on vsync interrupts.

Parameters
eventPointer to output the event handle to.
portPort to use.

◆ CAMU_IsAutoExposure()

Result CAMU_IsAutoExposure ( bool *  autoExposure,
u32  select 
)

Gets whether auto exposure is enabled on the specified camera.

Parameters
autoExposurePointer to output the auto exposure state to.
selectCamera to use.

◆ CAMU_IsAutoWhiteBalance()

Result CAMU_IsAutoWhiteBalance ( bool *  autoWhiteBalance,
u32  select 
)

Gets whether auto white balance is enabled on the specified camera.

Parameters
autoWhiteBalancePointer to output the auto white balance state to.
selectCamera to use.

◆ CAMU_IsBusy()

Result CAMU_IsBusy ( bool *  busy,
u32  port 
)

Gets whether the specified camera port is busy.

Parameters
busyPointer to output the busy state to.
portPort to check.

◆ CAMU_IsFinishedReceiving()

Result CAMU_IsFinishedReceiving ( bool *  finishedReceiving,
u32  port 
)

Gets whether the specified camera port has finished receiving image data.

Parameters
finishedReceivingPointer to output the receiving status to.
portPort to check.

◆ CAMU_IsTrimming()

Result CAMU_IsTrimming ( bool *  trimming,
u32  port 
)

Gets whether image trimming is enabled.

Parameters
trimmingPointer to output the trim state to.
portPort to use.

◆ CAMU_PlayShutterSound()

Result CAMU_PlayShutterSound ( CAMU_ShutterSoundType  sound)

Plays the specified shutter sound.

Parameters
soundShutter sound to play.
Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ CAMU_ReadMcuVariableI2cExclusive()

Result CAMU_ReadMcuVariableI2cExclusive ( u16 data,
u32  select,
u16  addr 
)

Reads the specified MCU variable of the specified camera.

Parameters
dataPointer to read data to.
selectCamera to read from.
addrAddress to read.

◆ CAMU_ReadRegisterI2cExclusive()

Result CAMU_ReadRegisterI2cExclusive ( u16 data,
u32  select,
u16  addr 
)

Reads the specified I2C register of the specified camera.

Parameters
dataPointer to read data to.
selectCamera to read from.
addrAddress to read.

◆ CAMU_SetAutoExposure()

Result CAMU_SetAutoExposure ( u32  select,
bool  autoExposure 
)

Sets whether auto exposure is enabled on the specified camera.

Parameters
selectCamera to use.
autoWhiteBalanceWhether auto exposure is enabled.
Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ CAMU_SetAutoExposureWindow()

Result CAMU_SetAutoExposureWindow ( u32  select,
s16  x,
s16  y,
s16  width,
s16  height 
)

Sets the region to base auto exposure off of for the specified camera.

Parameters
selectCamera to use.
xX of the region.
yY of the region.
widthWidth of the region.
heightHeight of the region.

◆ CAMU_SetAutoWhiteBalance()

Result CAMU_SetAutoWhiteBalance ( u32  select,
bool  autoWhiteBalance 
)

Sets whether auto white balance is enabled on the specified camera.

Parameters
selectCamera to use.
autoWhiteBalanceWhether auto white balance is enabled.
Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ CAMU_SetAutoWhiteBalanceWindow()

Result CAMU_SetAutoWhiteBalanceWindow ( u32  select,
s16  x,
s16  y,
s16  width,
s16  height 
)

Sets the region to base auto white balance off of for the specified camera.

Parameters
selectCamera to use.
xX of the region.
yY of the region.
widthWidth of the region.
heightHeight of the region.

◆ CAMU_SetBrightnessSynchronization()

Result CAMU_SetBrightnessSynchronization ( bool  brightnessSynchronization)

Sets whether to enable synchronization of left and right camera brightnesses.

Parameters
brightnessSynchronizationWhether to enable brightness synchronization.

◆ CAMU_SetContrast()

Result CAMU_SetContrast ( u32  select,
CAMU_Contrast  contrast 
)

Sets the contrast mode of the given camera.

Parameters
selectCamera to use.
contrastContrast mode to use.

◆ CAMU_SetDetailSize()

Result CAMU_SetDetailSize ( u32  select,
s16  width,
s16  height,
s16  cropX0,
s16  cropY0,
s16  cropX1,
s16  cropY1,
CAMU_Context  context 
)

Sets the image resolution of the given camera in the given context, in detail.

Parameters
selectCamera to use.
widthWidth to use.
heightHeight to use.
cropX0First crop point X.
cropY0First crop point Y.
cropX1Second crop point X.
cropY1Second crop point Y.
contextContext to use.

◆ CAMU_SetEffect()

Result CAMU_SetEffect ( u32  select,
CAMU_Effect  effect,
CAMU_Context  context 
)

Sets the special effects of the given camera in the given context.

Parameters
selectCamera to use.
effectEffect to use.
contextContext to use.

◆ CAMU_SetExposure()

Result CAMU_SetExposure ( u32  select,
s8  exposure 
)

Sets the exposure value of the specified camera.

Parameters
selectCamera to use.
exposureExposure value to use.

◆ CAMU_SetFrameRate()

Result CAMU_SetFrameRate ( u32  select,
CAMU_FrameRate  frameRate 
)

Sets the frame rate of the given camera.

Parameters
selectCamera to use.
frameRateFrame rate to use.
Examples
camera/video/source/main.c.

◆ CAMU_SetImageQualityCalibrationData()

Result CAMU_SetImageQualityCalibrationData ( CAMU_ImageQualityCalibrationData  data)

Sets the specified camera's image quality calibration data.

Parameters
dataData to set.

◆ CAMU_SetLensCorrection()

Result CAMU_SetLensCorrection ( u32  select,
CAMU_LensCorrection  lensCorrection 
)

Sets the lens correction mode of the given camera.

Parameters
selectCamera to use.
lensCorrectionLens correction mode to use.

◆ CAMU_SetNoiseFilter()

Result CAMU_SetNoiseFilter ( u32  select,
bool  noiseFilter 
)

Sets whether the specified camera's noise filter is enabled.

Parameters
selectCamera to use.
noiseFilterWhether the noise filter is enabled.
Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ CAMU_SetOutputFormat()

Result CAMU_SetOutputFormat ( u32  select,
CAMU_OutputFormat  format,
CAMU_Context  context 
)

Sets the output format of the given camera in the given context.

Parameters
selectCamera to use.
formatFormat to output.
contextContext to use.
Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ CAMU_SetPackageParameterWithContext()

Result CAMU_SetPackageParameterWithContext ( CAMU_PackageParameterContext  param)

Configures a camera with pre-packaged configuration data with a context.

Parameters
Parameterto use.

◆ CAMU_SetPackageParameterWithContextDetail()

Result CAMU_SetPackageParameterWithContextDetail ( CAMU_PackageParameterContextDetail  param)

Configures a camera with pre-packaged configuration data without a context and extra resolution details.

Parameters
Parameterto use.

◆ CAMU_SetPackageParameterWithoutContext()

Result CAMU_SetPackageParameterWithoutContext ( CAMU_PackageParameterCameraSelect  param)

Configures a camera with pre-packaged configuration data without a context.

Parameters
Parameterto use.

◆ CAMU_SetPhotoMode()

Result CAMU_SetPhotoMode ( u32  select,
CAMU_PhotoMode  photoMode 
)

Sets the photo mode of the given camera.

Parameters
selectCamera to use.
photoModePhoto mode to use.

◆ CAMU_SetReceiving()

Result CAMU_SetReceiving ( Handle event,
void *  dst,
u32  port,
u32  imageSize,
s16  transferUnit 
)

Initiates the process of receiving a camera frame.

Parameters
eventPointer to output the completion event handle to.
dstBuffer to write data to.
portPort to receive from.
imageSizeSize of the image to receive.
transferUnitTransfer unit to use when receiving.
Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ CAMU_SetSharpness()

Result CAMU_SetSharpness ( u32  select,
s8  sharpness 
)

Sets the sharpness of the specified camera.

Parameters
selectCamera to use.
sharpnessSharpness to use.

◆ CAMU_SetSize()

Result CAMU_SetSize ( u32  select,
CAMU_Size  size,
CAMU_Context  context 
)

Sets the image resolution of the given camera in the given context.

Parameters
selectCamera to use.
sizeSize to use.
contextContext to use.
Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ CAMU_SetSleepCamera()

Result CAMU_SetSleepCamera ( u32  select)

Sets the current sleep camera.

Parameters
selectCamera to set.

◆ CAMU_SetStereoCameraCalibrationData()

Result CAMU_SetStereoCameraCalibrationData ( CAMU_StereoCameraCalibrationData  data)

Sets the specified camera's stereo camera calibration data.

Parameters
dataData to set.

◆ CAMU_SetTransferBytes()

Result CAMU_SetTransferBytes ( u32  port,
u32  bytes,
s16  width,
s16  height 
)

Sets the number of bytes to transfer into an image buffer.

Parameters
portPort to use.
bytesBytes to transfer.
widthWidth of the image.
heightHeight of the image.
Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ CAMU_SetTransferLines()

Result CAMU_SetTransferLines ( u32  port,
s16  lines,
s16  width,
s16  height 
)

Sets the number of lines to transfer into an image buffer.

Parameters
portPort to use.
linesLines to transfer.
widthWidth of the image.
heightHeight of the image.

◆ CAMU_SetTrimming()

Result CAMU_SetTrimming ( u32  port,
bool  trimming 
)

Sets whether image trimming is enabled.

Parameters
portPort to use.
trimmingWhether image trimming is enabled.
Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ CAMU_SetTrimmingParams()

Result CAMU_SetTrimmingParams ( u32  port,
s16  xStart,
s16  yStart,
s16  xEnd,
s16  yEnd 
)

Sets the parameters used for trimming images.

Parameters
portPort to use.
xStartStart X coordinate.
yStartStart Y coordinate.
xEndEnd X coordinate.
yEndEnd Y coordinate.

◆ CAMU_SetTrimmingParamsCenter()

Result CAMU_SetTrimmingParamsCenter ( u32  port,
s16  trimWidth,
s16  trimHeight,
s16  camWidth,
s16  camHeight 
)

Sets the parameters used for trimming images, relative to the center of the image.

Parameters
portPort to use.
trimWidthTrim width.
trimHeightTrim height.
camWidthCamera width.
camHeightCamera height.

◆ CAMU_SetWhiteBalance()

Result CAMU_SetWhiteBalance ( u32  select,
CAMU_WhiteBalance  whiteBalance 
)

Sets the white balance mode of the specified camera.

Parameters
selectCamera to use.
whiteBalanceWhite balance mode to use.

◆ CAMU_SetWhiteBalanceWithoutBaseUp()

Result CAMU_SetWhiteBalanceWithoutBaseUp ( u32  select,
CAMU_WhiteBalance  whiteBalance 
)

Sets the white balance mode of the specified camera.

TODO: Explain "without base up"?

Parameters
selectCamera to use.
whiteBalanceWhite balance mode to use.

◆ CAMU_StartCapture()

Result CAMU_StartCapture ( u32  port)

Begins capture on the specified camera port.

Parameters
portPort to begin capture on.
Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ CAMU_StopCapture()

Result CAMU_StopCapture ( u32  port)

Terminates capture on the specified camera port.

Parameters
portPort to terminate capture on.
Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ CAMU_SwitchContext()

Result CAMU_SwitchContext ( u32  select,
CAMU_Context  context 
)

Switches the specified camera's active context.

Parameters
selectCamera to use.
contextContext to use.

◆ CAMU_SynchronizeVsyncTiming()

Result CAMU_SynchronizeVsyncTiming ( u32  select1,
u32  select2 
)

Synchronizes the specified cameras' vsync timing.

Parameters
select1First camera.
select2Second camera.
Examples
camera/image/source/main.c, and camera/video/source/main.c.

◆ CAMU_WriteMcuVariableI2c()

Result CAMU_WriteMcuVariableI2c ( u32  select,
u16  addr,
u16  data 
)

Writes to the specified MCU variable of the specified camera.

Parameters
selectCamera to write to.
addrAddress to write to.
dataData to write.

◆ CAMU_WriteRegisterI2c()

Result CAMU_WriteRegisterI2c ( u32  select,
u16  addr,
u16  data 
)

Writes to the specified I2C register of the specified camera.

Parameters
selectCamera to write to.
addrAddress to write to.
dataData to write.