Result CAMU_SynchronizeVsyncTiming(u32 select1, u32 select2)
Synchronizes the specified cameras' vsync timing.
Result CAMU_SetReceiving(Handle *event, void *dst, u32 port, u32 imageSize, s16 transferUnit)
Initiates the process of receiving a camera frame.
Result CAMU_FlipImage(u32 select, CAMU_Flip flip, CAMU_Context context)
Flips the image of the specified camera in the specified context.
Result camInit(void)
Initializes the cam service.
Result CAMU_SwitchContext(u32 select, CAMU_Context context)
Switches the specified camera's active context.
Result CAMU_SetNoiseFilter(u32 select, bool noiseFilter)
Sets whether the specified camera's noise filter is enabled.
CAMU_Contrast
Camera contrast patterns.
Definition: cam.h:123
@ CONTRAST_PATTERN_08
Pattern 8.
Definition: cam.h:131
@ CONTRAST_PATTERN_05
Pattern 5.
Definition: cam.h:128
@ CONTRAST_PATTERN_02
Pattern 2.
Definition: cam.h:125
@ CONTRAST_LOW
Low contrast. (5)
Definition: cam.h:137
@ CONTRAST_HIGH
High contrast. (7)
Definition: cam.h:139
@ CONTRAST_PATTERN_11
Pattern 11.
Definition: cam.h:134
@ CONTRAST_NORMAL
Normal contrast. (6)
Definition: cam.h:138
@ CONTRAST_PATTERN_06
Pattern 6.
Definition: cam.h:129
@ CONTRAST_PATTERN_04
Pattern 4.
Definition: cam.h:127
@ CONTRAST_PATTERN_01
Pattern 1.
Definition: cam.h:124
@ CONTRAST_PATTERN_09
Pattern 9.
Definition: cam.h:132
@ CONTRAST_PATTERN_07
Pattern 7.
Definition: cam.h:130
@ CONTRAST_PATTERN_10
Pattern 10.
Definition: cam.h:133
@ CONTRAST_PATTERN_03
Pattern 3.
Definition: cam.h:126
Result CAMU_GetSleepCamera(u32 *select)
Gets the current sleep camera.
Result CAMU_GetLatestVsyncTiming(s64 *timing, u32 port, u32 past)
Gets the vsync timing record of the specified camera for the specified number of signals.
Result CAMU_SetWhiteBalance(u32 select, CAMU_WhiteBalance whiteBalance)
Sets the white balance mode of the specified camera.
Result CAMU_IsTrimming(bool *trimming, u32 port)
Gets whether image trimming is enabled.
Result CAMU_GetImageQualityCalibrationData(CAMU_ImageQualityCalibrationData *data)
Gets the specified camera's image quality calibration data.
CAMU_Flip
Ways to flip the camera image.
Definition: cam.h:45
@ FLIP_NONE
No flip.
Definition: cam.h:46
@ FLIP_REVERSE
Reverse flip.
Definition: cam.h:49
@ FLIP_HORIZONTAL
Horizontal flip.
Definition: cam.h:47
@ FLIP_VERTICAL
Vertical flip.
Definition: cam.h:48
Result CAMU_SetTransferBytes(u32 port, u32 bytes, s16 width, s16 height)
Sets the number of bytes to transfer into an image buffer.
CAMU_Size
Camera image resolutions.
Definition: cam.h:53
@ SIZE_VGA
VGA size. (640x480)
Definition: cam.h:54
@ SIZE_CTR_TOP_LCD
CTR Top LCD size. (400x240)
Definition: cam.h:61
@ SIZE_DS_LCD
DS LCD size. (256x192)
Definition: cam.h:59
@ SIZE_CIF
CIF size. (352x288)
Definition: cam.h:57
@ SIZE_QVGA
QVGA size. (320x240)
Definition: cam.h:55
@ SIZE_QCIF
QCIF size. (176x144)
Definition: cam.h:58
@ SIZE_CTR_BOTTOM_LCD
CTR Bottom LCD size. (320x240)
Definition: cam.h:64
@ SIZE_DS_LCDx4
DS LCD x4 size. (512x384)
Definition: cam.h:60
@ SIZE_QQVGA
QQVGA size. (160x120)
Definition: cam.h:56
Result CAMU_ClearBuffer(u32 port)
Clears the buffer and error flags of the specified camera port.
Result CAMU_SetTransferLines(u32 port, s16 lines, s16 width, s16 height)
Sets the number of lines to transfer into an image buffer.
Result CAMU_SetAutoExposure(u32 select, bool autoExposure)
Sets whether auto exposure is enabled on the specified camera.
Result CAMU_GetBufferErrorInterruptEvent(Handle *event, u32 port)
Gets a handle to the event signaled on camera buffer errors.
Result CAMU_DriverFinalize(void)
Finalizes the camera driver.
Result CAMU_StartCapture(u32 port)
Begins capture on the specified camera port.
Result CAMU_WriteRegisterI2c(u32 select, u16 addr, u16 data)
Writes to the specified I2C register of the specified camera.
Result CAMU_GetTransferBytes(u32 *transferBytes, u32 port)
Gets the number of bytes to transfer into an image buffer.
Result CAMU_DriverInitialize(void)
Initializes the camera driver.
CAMU_OutputFormat
Camera image output formats.
Definition: cam.h:155
@ OUTPUT_RGB_565
RGB565.
Definition: cam.h:157
@ OUTPUT_YUV_422
YUV422.
Definition: cam.h:156
CAMU_FrameRate
Camera capture frame rates.
Definition: cam.h:68
@ FRAME_RATE_30_TO_10
30-10 FPS.
Definition: cam.h:81
@ FRAME_RATE_10
10 FPS.
Definition: cam.h:72
@ FRAME_RATE_30
30 FPS.
Definition: cam.h:77
@ FRAME_RATE_8_5
8.5 FPS.
Definition: cam.h:73
@ FRAME_RATE_15_TO_2
15-2 FPS.
Definition: cam.h:71
@ FRAME_RATE_20_TO_10
20-10 FPS.
Definition: cam.h:80
@ FRAME_RATE_5
5 FPS.
Definition: cam.h:74
@ FRAME_RATE_15_TO_5
15-5 FPS.
Definition: cam.h:70
@ FRAME_RATE_30_TO_5
30-5 FPS.
Definition: cam.h:78
@ FRAME_RATE_20
20 FPS.
Definition: cam.h:75
@ FRAME_RATE_15
15 FPS.
Definition: cam.h:69
@ FRAME_RATE_15_TO_10
15-10 FPS.
Definition: cam.h:79
@ FRAME_RATE_20_TO_5
20-5 FPS.
Definition: cam.h:76
Result CAMU_ReadMcuVariableI2cExclusive(u16 *data, u32 select, u16 addr)
Reads the specified MCU variable of the specified camera.
CAMU_LensCorrection
Camera lens correction modes.
Definition: cam.h:143
@ LENS_CORRECTION_ON_70
Edge-to-center brightness ratio of 70.
Definition: cam.h:145
@ LENS_CORRECTION_NORMAL
Normal lens correction. (70)
Definition: cam.h:150
@ LENS_CORRECTION_ON_90
Edge-to-center brightness ratio of 90.
Definition: cam.h:146
@ LENS_CORRECTION_BRIGHT
Bright lens correction. (90)
Definition: cam.h:151
@ LENS_CORRECTION_DARK
Dark lens correction. (OFF)
Definition: cam.h:149
@ LENS_CORRECTION_OFF
No lens correction.
Definition: cam.h:144
Result CAMU_GetActivatedCamera(u32 *select)
Gets the current activated camera.
Result CAMU_IsFinishedReceiving(bool *finishedReceiving, u32 port)
Gets whether the specified camera port has finished receiving image data.
CAMU_ShutterSoundType
Camera shutter sounds.
Definition: cam.h:161
@ SHUTTER_SOUND_TYPE_MOVIE_END
Shutter sound to end a movie.
Definition: cam.h:164
@ SHUTTER_SOUND_TYPE_MOVIE
Shutter sound to begin a movie.
Definition: cam.h:163
@ SHUTTER_SOUND_TYPE_NORMAL
Normal shutter sound.
Definition: cam.h:162
Result CAMU_IsAutoWhiteBalance(bool *autoWhiteBalance, u32 select)
Gets whether auto white balance is enabled on the specified camera.
CAMU_WhiteBalance
Camera white balance modes.
Definition: cam.h:85
@ WHITE_BALANCE_5200K
5200K white balance.
Definition: cam.h:89
@ WHITE_BALANCE_3200K
3200K white balance.
Definition: cam.h:87
@ WHITE_BALANCE_6000K
6000K white balance.
Definition: cam.h:90
@ WHITE_BALANCE_AUTO
Auto white balance.
Definition: cam.h:86
@ WHITE_BALANCE_7000K
7000K white balance.
Definition: cam.h:91
@ WHITE_BALANCE_4150K
4150K white balance.
Definition: cam.h:88
Result CAMU_IsBusy(bool *busy, u32 port)
Gets whether the specified camera port is busy.
Result CAMU_SetFrameRate(u32 select, CAMU_FrameRate frameRate)
Sets the frame rate of the given camera.
CAMU_Context
Camera contexts.
Definition: cam.h:35
@ CONTEXT_A
Context A.
Definition: cam.h:37
@ CONTEXT_B
Context B.
Definition: cam.h:38
@ CONTEXT_NONE
No context.
Definition: cam.h:36
@ CONTEXT_BOTH
Both contexts.
Definition: cam.h:41
Result CAMU_SetTrimmingParams(u32 port, s16 xStart, s16 yStart, s16 xEnd, s16 yEnd)
Sets the parameters used for trimming images.
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.
Result CAMU_SetSleepCamera(u32 select)
Sets the current sleep camera.
Result CAMU_SetBrightnessSynchronization(bool brightnessSynchronization)
Sets whether to enable synchronization of left and right camera brightnesses.
void camExit(void)
Closes the cam service.
Result CAMU_GetVsyncInterruptEvent(Handle *event, u32 port)
Gets a handle to the event signaled on vsync interrupts.
CAMU_Effect
Camera special effects.
Definition: cam.h:113
@ EFFECT_MONO
Mono effect.
Definition: cam.h:115
@ EFFECT_NEGATIVE
Negative effect.
Definition: cam.h:117
@ EFFECT_NEGAFILM
Negative film effect.
Definition: cam.h:118
@ EFFECT_SEPIA
Sepia effect.
Definition: cam.h:116
@ EFFECT_SEPIA01
Sepia effect.
Definition: cam.h:119
@ EFFECT_NONE
No effects.
Definition: cam.h:114
Result CAMU_GetTrimmingParams(s16 *xStart, s16 *yStart, s16 *xEnd, s16 *yEnd, u32 port)
Gets the parameters used for trimming images.
Result CAMU_StopCapture(u32 port)
Terminates capture on the specified camera port.
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.
Result CAMU_SetExposure(u32 select, s8 exposure)
Sets the exposure value of the specified camera.
Result CAMU_GetStereoCameraCalibrationData(CAMU_StereoCameraCalibrationData *data)
Gets the specified camera's stereo camera calibration data.
Result CAMU_SetStereoCameraCalibrationData(CAMU_StereoCameraCalibrationData data)
Sets the specified camera's stereo camera calibration data.
Result CAMU_SetPhotoMode(u32 select, CAMU_PhotoMode photoMode)
Sets the photo mode of the given camera.
Result CAMU_SetSize(u32 select, CAMU_Size size, CAMU_Context context)
Sets the image resolution of the given camera in the given context.
Result CAMU_IsAutoExposure(bool *autoExposure, u32 select)
Gets whether auto exposure is enabled on the specified camera.
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.
Result CAMU_SetContrast(u32 select, CAMU_Contrast contrast)
Sets the contrast mode of the given camera.
Result CAMU_SetWhiteBalanceWithoutBaseUp(u32 select, CAMU_WhiteBalance whiteBalance)
Sets the white balance mode of the specified camera.
Result CAMU_SetSharpness(u32 select, s8 sharpness)
Sets the sharpness of the specified camera.
Result CAMU_SetPackageParameterWithContext(CAMU_PackageParameterContext param)
Configures a camera with pre-packaged configuration data with a context.
Result CAMU_GetMaxLines(s16 *maxLines, s16 width, s16 height)
Gets the maximum number of lines that can be saved to an image buffer.
CAMU_PhotoMode
Camera photo modes.
Definition: cam.h:104
@ PHOTO_MODE_LETTER
Letter mode.
Definition: cam.h:109
@ PHOTO_MODE_NORMAL
Normal mode.
Definition: cam.h:105
@ PHOTO_MODE_PORTRAIT
Portrait mode.
Definition: cam.h:106
@ PHOTO_MODE_NIGHTVIEW
Night mode.
Definition: cam.h:108
@ PHOTO_MODE_LANDSCAPE
Landscape mode.
Definition: cam.h:107
Result CAMU_SetTrimming(u32 port, bool trimming)
Sets whether image trimming is enabled.
Result CAMU_SetEffect(u32 select, CAMU_Effect effect, CAMU_Context context)
Sets the special effects of the given camera in the given context.
Result CAMU_SetImageQualityCalibrationData(CAMU_ImageQualityCalibrationData data)
Sets the specified camera's image quality calibration data.
Result CAMU_WriteMcuVariableI2c(u32 select, u16 addr, u16 data)
Writes to the specified MCU variable of the specified camera.
Result CAMU_SetPackageParameterWithoutContext(CAMU_PackageParameterCameraSelect param)
Configures a camera with pre-packaged configuration data without a context.
Result CAMU_Activate(u32 select)
Activates the specified camera.
Result CAMU_GetSuitableY2rStandardCoefficient(Y2RU_StandardCoefficient *coefficient)
Gets the Y2R coefficient applied to image data by the camera.
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.
Result CAMU_PlayShutterSound(CAMU_ShutterSoundType sound)
Plays the specified shutter sound.
Result CAMU_ReadRegisterI2cExclusive(u16 *data, u32 select, u16 addr)
Reads the specified I2C register of the specified camera.
Result CAMU_SetOutputFormat(u32 select, CAMU_OutputFormat format, CAMU_Context context)
Sets the output format of the given camera in the given context.
Result CAMU_SetLensCorrection(u32 select, CAMU_LensCorrection lensCorrection)
Sets the lens correction mode of the given camera.
Result CAMU_SetAutoWhiteBalance(u32 select, bool autoWhiteBalance)
Sets whether auto white balance is enabled on the specified camera.
Result CAMU_GetMaxBytes(u32 *maxBytes, s16 width, s16 height)
Gets the maximum number of bytes that can be saved to an image buffer.
@ PORT_CAM2
CAM2 port.
Definition: cam.h:14
@ PORT_BOTH
Both ports.
Definition: cam.h:17
@ PORT_CAM1
CAM1 port.
Definition: cam.h:13
@ PORT_NONE
No port.
Definition: cam.h:12
Result CAMU_SetPackageParameterWithContextDetail(CAMU_PackageParameterContextDetail param)
Configures a camera with pre-packaged configuration data without a context and extra resolution detai...
@ SELECT_OUT1
Outer camera 1.
Definition: cam.h:23
@ SELECT_OUT2
Outer camera 2.
Definition: cam.h:25
@ SELECT_IN1_OUT2
Inner camera 1 and outer camera 2.
Definition: cam.h:30
@ SELECT_IN1
Inner camera 1.
Definition: cam.h:24
@ SELECT_ALL
All cameras.
Definition: cam.h:31
@ SELECT_NONE
No camera.
Definition: cam.h:22
@ SELECT_IN1_OUT1
Outer camera 1 and inner camera 1.
Definition: cam.h:28
@ SELECT_OUT1_OUT2
Both outer cameras.
Definition: cam.h:29
Image quality calibration data.
Definition: cam.h:168
u16 awbCcmL10Right
Right camera, left color correction matrix blue/green gain.
Definition: cam.h:176
u16 awbCcmL9Left
Left camera, left color correction matrix red/green gain.
Definition: cam.h:175
s16 kGL
Left color correction matrix green normalization coefficient.
Definition: cam.h:171
u16 awbX0Right
Right camera, color correction matrix position threshold.
Definition: cam.h:178
s16 aeBaseTarget
Auto exposure base target brightness.
Definition: cam.h:169
u16 awbCcmL9Right
Right camera, left color correction matrix red/green gain.
Definition: cam.h:174
s16 kBL
Left color correction matrix blue normalization coefficient.
Definition: cam.h:172
u16 awbCcmL10Left
Left camera, left color correction matrix blue/green gain.
Definition: cam.h:177
u16 awbX0Left
Left camera, color correction matrix position threshold.
Definition: cam.h:179
s16 ccmPosition
Color correction matrix position.
Definition: cam.h:173
s16 kRL
Left color correction matrix red normalization coefficient.
Definition: cam.h:170
Batch camera configuration for use without a context.
Definition: cam.h:202
s16 autoExposureWindowX
X of the region to use for auto exposure.
Definition: cam.h:215
u8 frameRate
CAMU_FrameRate Camera frame rate.
Definition: cam.h:209
s8 exposure
Camera exposure.
Definition: cam.h:204
s16 autoExposureWindowWidth
Width of the region to use for auto exposure.
Definition: cam.h:217
u8 whiteBalance
CAMU_WhiteBalance Camera white balance.
Definition: cam.h:205
s16 autoWhiteBalanceWindowX
X of the region to use for auto white balance.
Definition: cam.h:219
s16 autoExposureWindowHeight
Height of the region to use for auto exposure.
Definition: cam.h:218
u8 autoExposureOn
#bool Whether to automatically determine the proper exposure.
Definition: cam.h:207
s8 sharpness
Camera sharpness.
Definition: cam.h:206
s16 autoWhiteBalanceWindowWidth
Width of the region to use for auto white balance.
Definition: cam.h:221
u8 camera
Selected camera.
Definition: cam.h:203
s16 autoWhiteBalanceWindowHeight
Height of the region to use for auto white balance.
Definition: cam.h:222
u8 padding
Padding. (Aligns last 3 fields to 4 bytes)
Definition: cam.h:214
s16 autoExposureWindowY
Y of the region to use for auto exposure.
Definition: cam.h:216
u8 noiseFilterOn
#bool Whether to enable the camera's noise filter.
Definition: cam.h:213
s16 autoWhiteBalanceWindowY
Y of the region to use for auto white balance.
Definition: cam.h:220
u8 contrast
CAMU_Contrast Camera contrast.
Definition: cam.h:211
u8 autoWhiteBalanceOn
#bool Whether to automatically determine the white balance mode.
Definition: cam.h:208
u8 lensCorrection
CAMU_LensCorrection Camera lens correction.
Definition: cam.h:212
u8 photoMode
CAMU_PhotoMode Camera photo mode.
Definition: cam.h:210
Batch camera configuration for use with a context and with detailed size information.
Definition: cam.h:235
u8 camera
Selected camera.
Definition: cam.h:236
u8 flip
CAMU_Flip Camera image flip mode.
Definition: cam.h:238
s16 cropY0
First crop point Y.
Definition: cam.h:243
s16 height
Image height.
Definition: cam.h:241
s16 cropY1
Second crop point Y.
Definition: cam.h:245
u8 effect
CAMU_Effect Camera image special effects.
Definition: cam.h:239
s16 cropX1
Second crop point X.
Definition: cam.h:244
u8 context
CAMU_Context Selected context.
Definition: cam.h:237
s16 width
Image width.
Definition: cam.h:240
s16 cropX0
First crop point X.
Definition: cam.h:242
Batch camera configuration for use with a context.
Definition: cam.h:226
u8 flip
CAMU_Flip Camera image flip mode.
Definition: cam.h:229
u8 size
CAMU_Size Camera image resolution.
Definition: cam.h:231
u8 effect
CAMU_Effect Camera image special effects.
Definition: cam.h:230
u8 context
CAMU_Context Selected context.
Definition: cam.h:228
u8 camera
Selected camera.
Definition: cam.h:227
Stereo camera calibration data.
Definition: cam.h:183
float distanceCameras
Distance between left and right cameras.
Definition: cam.h:195
float translationY
Y axis translation to match the left camera image with the right.
Definition: cam.h:189
float scale
Scale to match the left camera image with the right.
Definition: cam.h:186
s16 imageHeight
Image height.
Definition: cam.h:197
float distanceToChart
Distance between cameras and measurement chart.
Definition: cam.h:194
u8 isValidRotationXY
#bool Whether the X and Y rotation data is valid.
Definition: cam.h:184
float rotationX
X axis rotation to match the left camera image with the right.
Definition: cam.h:190
float rotationZ
Z axis rotation to match the left camera image with the right.
Definition: cam.h:187
float rotationY
Y axis rotation to match the left camera image with the right.
Definition: cam.h:191
float translationX
X axis translation to match the left camera image with the right.
Definition: cam.h:188
s16 imageWidth
Image width.
Definition: cam.h:196
float angleOfViewLeft
Left camera angle of view.
Definition: cam.h:193
float angleOfViewRight
Right camera angle of view.
Definition: cam.h:192
int64_t s64
64-bit signed integer
Definition: types.h:29
#define BIT(n)
Creates a bitmask from a bit number.
Definition: types.h:47
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
int8_t s8
8-bit signed integer
Definition: types.h:26
int16_t s16
16-bit signed integer
Definition: types.h:27
u32 Handle
Resource handle.
Definition: types.h:41
s32 Result
Function result.
Definition: types.h:42
uint16_t u16
16-bit unsigned integer
Definition: types.h:22
uint32_t u32
32-bit unsigned integer
Definition: types.h:23
Y2R service for hardware YUV->RGB conversions.
Y2RU_StandardCoefficient
Preset conversion coefficients based on ITU standards for the YUV->RGB formula.
Definition: y2r.h:87