Difference between revisions of "Camera Services"
Jump to navigation
Jump to search
Steveice10 (talk | contribs) (Initial cam:u docs.) |
|||
Line 13: | Line 13: | ||
|- | |- | ||
| 0x00010040 | | 0x00010040 | ||
− | | | + | | StartCapture(Port port) |
+ | |- | ||
+ | | 0x00020040 | ||
+ | | StopCapture(Port port) | ||
+ | |- | ||
+ | | 0x00030040 | ||
+ | | IsBusy(bool* busy, Port port) | ||
|- | |- | ||
| 0x00040040 | | 0x00040040 | ||
− | | | + | | ClearBuffer(Port port) |
|- | |- | ||
| 0x00050040 | | 0x00050040 | ||
− | | | + | | GetVsyncInterruptEvent(Handle* event, Port port) |
|- | |- | ||
| 0x00060040 | | 0x00060040 | ||
− | | | + | | GetBufferErrorInterruptEvent(Handle* event, Port port) |
|- | |- | ||
| 0x00070102 | | 0x00070102 | ||
− | | | + | | SetReceiving(Handle* event, void* dst, Port port, u32 imageSize, s16 transferUnit) |
+ | |- | ||
+ | | 0x00080040 | ||
+ | | IsFinishedReceiving(bool* finishedReceiving, Port port) | ||
|- | |- | ||
| 0x00090100 | | 0x00090100 | ||
− | | | + | | SetTransferLines(Port port, s16 lines, s16 width, s16 height) |
|- | |- | ||
| 0x000A0080 | | 0x000A0080 | ||
− | | | + | | GetMaxLines(s16* maxLines, s16 width, s16 height) |
+ | |- | ||
+ | | 0x000B0100 | ||
+ | | SetTransferBytes(Port port, u32 bytes, s16 width, s16 height) | ||
|- | |- | ||
| 0x000C0040 | | 0x000C0040 | ||
− | | | + | | GetTransferBytes(u32* transferBytes, Port port) |
+ | |- | ||
+ | | 0x000D0080 | ||
+ | | GetMaxBytes(u32* maxBytes, s16 width, s16 height) | ||
|- | |- | ||
| 0x000E0080 | | 0x000E0080 | ||
− | | | + | | SetTrimming(Port port, bool trimming) |
+ | |- | ||
+ | | 0x000F0040 | ||
+ | | IsTrimming(bool* trimming, Port port) | ||
+ | |- | ||
+ | | 0x00100140 | ||
+ | | SetTrimmingParams(Port port, s16 xStart, s16 yStart, s16 xEnd, s16 yEnd) | ||
+ | |- | ||
+ | | 0x00110040 | ||
+ | | GetTrimmingParams(s16* xStart, s16* yStart, s16* xEnd, s16* yEnd, Port port) | ||
|- | |- | ||
| 0x00120140 | | 0x00120140 | ||
− | | | + | | SetTrimmingParamsCenter(Port port, s16 trimWidth, s16 trimHeight, s16 camWidth, s16 camHeight) |
|- | |- | ||
| 0x00130040 | | 0x00130040 | ||
− | | | + | | Activate(CameraSelect select) |
|- | |- | ||
| 0x00140080 | | 0x00140080 | ||
− | | | + | | SwitchContext(CameraSelect select, Context context) |
+ | |- | ||
+ | | 0x00150080 | ||
+ | | SetExposure(CameraSelect select, s8 exposure) | ||
+ | |- | ||
+ | | 0x00160080 | ||
+ | | SetWhiteBalance(CameraSelect select, WhiteBalance whiteBalance) | ||
+ | |- | ||
+ | | 0x00170080 | ||
+ | | SetWhiteBalanceWithoutBaseUp(CameraSelect select, WhiteBalance whiteBalance) | ||
+ | |- | ||
+ | | 0x00180080 | ||
+ | | SetSharpness(CameraSelect select, s8 sharpness) | ||
+ | |- | ||
+ | | 0x00190080 | ||
+ | | SetAutoExposure(CameraSelect select, bool autoExposure) | ||
+ | |- | ||
+ | | 0x001A0040 | ||
+ | | IsAutoExposure(bool* autoExposure, CameraSelect select) | ||
+ | |- | ||
+ | | 0x001B0080 | ||
+ | | SetAutoWhiteBalance(CameraSelect select, bool autoWhiteBalance) | ||
+ | |- | ||
+ | | 0x001C0040 | ||
+ | | IsAutoWhiteBalance(bool* autoWhiteBalance, CameraSelect select) | ||
+ | |- | ||
+ | | 0x001D00C0 | ||
+ | | FlipImage(CameraSelect select, Flip flip, Context context) | ||
|- | |- | ||
| 0x001E0200 | | 0x001E0200 | ||
− | | | + | | SetDetailSize(CameraSelect select, s16 width, s16 height, s16 cropX0, s16 cropY0, s16 cropX1, s16 cropY1, Context context) |
|- | |- | ||
| 0x001F00C0 | | 0x001F00C0 | ||
− | | | + | | SetSize(CameraSelect select, Size size, Context context) |
|- | |- | ||
| 0x00200080 | | 0x00200080 | ||
− | | | + | | SetFrameRate(CameraSelect select, FrameRate frameRate) |
+ | |- | ||
+ | | 0x00210080 | ||
+ | | SetPhotoMode(CameraSelect select, PhotoMode photoMode) | ||
+ | |- | ||
+ | | 0x002200C0 | ||
+ | | SetEffect(CameraSelect select, Effect effect, Context context) | ||
|- | |- | ||
| 0x00230080 | | 0x00230080 | ||
− | | | + | | SetContrast(CameraSelect select, Contrast contrast) |
+ | |- | ||
+ | | 0x00240080 | ||
+ | | SetLensCorrection(CameraSelect select, LensCorrection lensCorrection) | ||
+ | |- | ||
+ | | 0x002500C0 | ||
+ | | SetOutputFormat(CameraSelect select, OutputFormat format, Context context) | ||
+ | |- | ||
+ | | 0x00260140 | ||
+ | | SetAutoExposureWindow(CameraSelect select, s16 x, s16 y, s16 width, s16 height) | ||
+ | |- | ||
+ | | 0x00270140 | ||
+ | | SetAutoWhiteBalanceWindow(CameraSelect select, s16 x, s16 y, s16 width, s16 height) | ||
+ | |- | ||
+ | | 0x00280080 | ||
+ | | SetNoiseFilter(CameraSelect select, bool noiseFilter) | ||
+ | |- | ||
+ | | 0x00290080 | ||
+ | | SynchronizeVsyncTiming(CameraSelect select1, CameraSelect select2) | ||
+ | |- | ||
+ | | 0x002A0080 | ||
+ | | GetLatestVsyncTiming(s64* timing, Port port, u32 past) | ||
+ | |- | ||
+ | | 0x002B0000 | ||
+ | | GetStereoCameraCalibrationData(StereoCameraCalibrationData* data) | ||
+ | |- | ||
+ | | 0x002C0400 | ||
+ | | SetStereoCameraCalibrationData(StereoCameraCalibrationData data) | ||
+ | |- | ||
+ | | 0x002D00C0 | ||
+ | | WriteRegisterI2c(CameraSelect select, u16 addr, u16 data) | ||
+ | |- | ||
+ | | 0x002E00C0 | ||
+ | | WriteMcuVariableI2c(CameraSelect select, u16 addr, u16 data) | ||
+ | |- | ||
+ | | 0x002F0080 | ||
+ | | ReadRegisterI2cExclusive(u16* data, CameraSelect select, u16 addr) | ||
+ | |- | ||
+ | | 0x00300080 | ||
+ | | ReadMcuVariableI2cExclusive(u16* data, CameraSelect select, u16 addr) | ||
+ | |- | ||
+ | | 0x00310180 | ||
+ | | SetImageQualityCalibrationData(ImageQualityCalibrationData data) | ||
+ | |- | ||
+ | | 0x00320000 | ||
+ | | GetImageQualityCalibrationData(ImageQualityCalibrationData* data) | ||
+ | |- | ||
+ | | 0x003302C0 | ||
+ | | SetPackageParameterWithoutContext(PackageParameterCameraSelect param) | ||
+ | |- | ||
+ | | 0x00340140 | ||
+ | | SetPackageParameterWithContext(PackageParameterContext param) | ||
+ | |- | ||
+ | | 0x003501C0 | ||
+ | | SetPackageParameterWithContextDetail(PackageParameterContextDetail param) | ||
+ | |- | ||
+ | | 0x00360000 | ||
+ | | GetSuitableY2rStandardCoefficient(StandardCoefficient* coefficient) | ||
+ | |- | ||
+ | | 0x00370202 | ||
+ | | PlayShutterSoundWithWave(u8* waveData, s32 size, ChannelParam param, OptionInfo info) | ||
+ | |- | ||
+ | | 0x00380040 | ||
+ | | PlayShutterSound(ShutterSoundType sound) | ||
|- | |- | ||
| 0x00390000 | | 0x00390000 | ||
− | | | + | | DriverInitialize() |
|- | |- | ||
| 0x003A0000 | | 0x003A0000 | ||
− | | | + | | DriverFinalize() |
+ | |- | ||
+ | | 0x003B0000 | ||
+ | | GetActivatedCamera(CameraSelect* select) | ||
+ | |- | ||
+ | | 0x003C0000 | ||
+ | | GetSleepCamera(CameraSelect* select) | ||
+ | |- | ||
+ | | 0x003D0040 | ||
+ | | SetSleepCamera(CameraSelect select) | ||
+ | |- | ||
+ | | 0x003E0040 | ||
+ | | SetBrightnessSynchronization(bool brightnessSynchronization) | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''enum Port''' | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Enum | ||
+ | ! Value | ||
+ | |- | ||
+ | | PORT_NONE | ||
+ | | 0x0 | ||
+ | |- | ||
+ | | PORT_CAM1 | ||
+ | | 0x1 << 0x0 | ||
+ | |- | ||
+ | | PORT_CAM2 | ||
+ | | 0x1 << 0x1 | ||
+ | |- | ||
+ | | PORT_BOTH | ||
+ | | |PORT_CAM1 | PORT_CAM2 | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''enum CameraSelect''' | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Enum | ||
+ | ! Value | ||
+ | |- | ||
+ | | SELECT_NONE | ||
+ | | 0x0 | ||
+ | |- | ||
+ | | SELECT_OUT1 | ||
+ | | 0x1 << 0x0 | ||
+ | |- | ||
+ | | SELECT_IN1 | ||
+ | | 0x1 << 0x1 | ||
+ | |- | ||
+ | | SELECT_OUT2 | ||
+ | | 0x1 << 0x2 | ||
+ | |- | ||
+ | | 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 | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''enum Context''' | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Enum | ||
+ | ! Value | ||
+ | |- | ||
+ | | CONTEXT_NONE | ||
+ | | 0x0 | ||
+ | |- | ||
+ | | CONTEXT_A | ||
+ | | 0x1 << 0x0 | ||
+ | |- | ||
+ | | CONTEXT_B | ||
+ | | 0x1 << 0x1 | ||
+ | |- | ||
+ | | CONTEXT_BOTH | ||
+ | | |CONTEXT_A | CONTEXT_B | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''enum Flip''' | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Enum | ||
+ | ! Value | ||
+ | |- | ||
+ | | FLIP_NONE | ||
+ | | 0x0 | ||
+ | |- | ||
+ | | FLIP_HORIZONTAL | ||
+ | | 0x1 | ||
+ | |- | ||
+ | | FLIP_VERTICAL | ||
+ | | 0x2 | ||
+ | |- | ||
+ | | FLIP_REVERSE | ||
+ | | 0x3 | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''enum Size''' | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Enum | ||
+ | ! Value | ||
+ | |- | ||
+ | | 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 | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''enum FrameRate''' | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Enum | ||
+ | ! Value | ||
+ | |- | ||
+ | | 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 | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''enum WhiteBalance''' | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Enum | ||
+ | ! Value | ||
+ | |- | ||
+ | | 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_MAX | ||
+ | | 0x6 | ||
+ | |- | ||
+ | | 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 | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''enum PhotoMode''' | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Enum | ||
+ | ! Value | ||
+ | |- | ||
+ | | PHOTO_MODE_NORMAL | ||
+ | | 0x0 | ||
+ | |- | ||
+ | | PHOTO_MODE_PORTRAIT | ||
+ | | 0x1 | ||
+ | |- | ||
+ | | PHOTO_MODE_LANDSCAPE | ||
+ | | 0x2 | ||
+ | |- | ||
+ | | PHOTO_MODE_NIGHTVIEW | ||
+ | | 0x3 | ||
+ | |- | ||
+ | | PHOTO_MODE_LETTER | ||
+ | | 0x4 | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''enum Effect''' | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Enum | ||
+ | ! Value | ||
+ | |- | ||
+ | | EFFECT_NONE | ||
+ | | 0x0 | ||
+ | |- | ||
+ | | EFFECT_MONO | ||
+ | | 0x1 | ||
+ | |- | ||
+ | | EFFECT_SEPIA | ||
+ | | 0x2 | ||
+ | |- | ||
+ | | EFFECT_NEGATIVE | ||
+ | | 0x3 | ||
+ | |- | ||
+ | | EFFECT_NEGAFILM | ||
+ | | 0x4 | ||
+ | |- | ||
+ | | EFFECT_SEPIA01 | ||
+ | | 0x5 | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''enum Contrast''' | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Enum | ||
+ | ! Value | ||
+ | |- | ||
+ | | 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 | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''enum LensCorrection''' | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Enum | ||
+ | ! Value | ||
+ | |- | ||
+ | | 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 | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''enum OutputFormat''' | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Enum | ||
+ | ! Value | ||
+ | |- | ||
+ | | OUTPUT_YUV_422 | ||
+ | | 0x0 | ||
+ | |- | ||
+ | | OUTPUT_RGB_565 | ||
+ | | 0x1 | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''enum ShutterSoundType''' | ||
+ | {| class="wikitable" border="1" | ||
+ | |- | ||
+ | ! Enum | ||
+ | ! Value | ||
+ | |- | ||
+ | | SHUTTER_SOUND_TYPE_NORMAL | ||
+ | | 0x0 | ||
+ | |- | ||
+ | | SHUTTER_SOUND_TYPE_MOVIE | ||
+ | | 0x1 | ||
+ | |- | ||
+ | | SHUTTER_SOUND_TYPE_MOVIE_END | ||
+ | | 0x2 | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''struct ImageQualityCalibrationData''' | ||
+ | {| class="wikitable" border="1" | ||
+ | ! Type | ||
+ | ! Field | ||
+ | |- | ||
+ | | s16 | ||
+ | | aeBaseTarget | ||
+ | |- | ||
+ | | s16 | ||
+ | | kRL | ||
+ | |- | ||
+ | | s16 | ||
+ | | kGL | ||
+ | |- | ||
+ | | s16 | ||
+ | | kBL | ||
+ | |- | ||
+ | | s16 | ||
+ | | ccmPosition | ||
+ | |- | ||
+ | | u16 | ||
+ | | awbCcmL9Right | ||
+ | |- | ||
+ | | u16 | ||
+ | | awbCcmL9Left | ||
+ | |- | ||
+ | | u16 | ||
+ | | awbCcmL10Right | ||
+ | |- | ||
+ | | u16 | ||
+ | | awbCcmL10Left | ||
+ | |- | ||
+ | | u16 | ||
+ | | awbX0Right | ||
+ | |- | ||
+ | | u16 | ||
+ | | awbX0Left | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''struct StereoCameraCalibrationData''' | ||
+ | {| class="wikitable" border="1" | ||
+ | ! Type | ||
+ | ! Field | ||
+ | |- | ||
+ | | bool | ||
+ | | isValidRotationXY | ||
+ | |- | ||
+ | | bool[3] | ||
+ | | reservedFlag | ||
+ | |- | ||
+ | | float | ||
+ | | scale | ||
+ | |- | ||
+ | | float | ||
+ | | rotationZ | ||
+ | |- | ||
+ | | float | ||
+ | | translationX | ||
+ | |- | ||
+ | | float | ||
+ | | translationY | ||
+ | |- | ||
+ | | float | ||
+ | | rotationX | ||
+ | |- | ||
+ | | float | ||
+ | | rotationY | ||
+ | |- | ||
+ | | float | ||
+ | | angleOfViewRight | ||
+ | |- | ||
+ | | float | ||
+ | | angleOfViewLeft | ||
+ | |- | ||
+ | | float | ||
+ | | distanceToChart | ||
+ | |- | ||
+ | | float | ||
+ | | distanceCameras | ||
+ | |- | ||
+ | | s16 | ||
+ | | imageWidth | ||
+ | |- | ||
+ | | s16 | ||
+ | | imageHeight | ||
+ | |- | ||
+ | | u8[16] | ||
+ | | reserved | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''struct PackageParameterCameraSelect''' | ||
+ | {| class="wikitable" border="1" | ||
+ | ! Type | ||
+ | ! Field | ||
+ | |- | ||
+ | | enum CameraSelect : 8 | ||
+ | | camera | ||
+ | |- | ||
+ | | s8 | ||
+ | | exposure | ||
+ | |- | ||
+ | | enum WhiteBalance : 8 | ||
+ | | whiteBalance | ||
+ | |- | ||
+ | | s8 | ||
+ | | sharpness | ||
+ | |- | ||
+ | | bool | ||
+ | | autoExposureOn | ||
+ | |- | ||
+ | | bool | ||
+ | | autoWhiteBalanceOn | ||
+ | |- | ||
+ | | enum FrameRate : 8 | ||
+ | | frameRate | ||
+ | |- | ||
+ | | enum PhotoMode : 8 | ||
+ | | photoMode | ||
+ | |- | ||
+ | | u8 | ||
+ | | contrast | ||
+ | |- | ||
+ | | enum LensCorrection : 8 | ||
+ | | lensCorrection | ||
+ | |- | ||
+ | | bool | ||
+ | | noiseFilterOn | ||
+ | |- | ||
+ | | u8 | ||
+ | | padding | ||
+ | |- | ||
+ | | s16 | ||
+ | | autoExposureWindowX | ||
+ | |- | ||
+ | | s16 | ||
+ | | autoExposureWindowY | ||
+ | |- | ||
+ | | s16 | ||
+ | | autoExposureWindowWidth | ||
+ | |- | ||
+ | | s16 | ||
+ | | autoExposureWindowHeight | ||
+ | |- | ||
+ | | s16 | ||
+ | | autoWhiteBalanceWindowX | ||
+ | |- | ||
+ | | s16 | ||
+ | | autoWhiteBalanceWindowY | ||
+ | |- | ||
+ | | s16 | ||
+ | | autoWhiteBalanceWindowWidth | ||
+ | |- | ||
+ | | s16 | ||
+ | | autoWhiteBalanceWindowHeight | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''struct PackageParameterContext''' | ||
+ | {| class="wikitable" border="1" | ||
+ | ! Type | ||
+ | ! Field | ||
+ | |- | ||
+ | | enum CameraSelect : 8 | ||
+ | | camera | ||
+ | |- | ||
+ | | enum Context : 8 | ||
+ | | context | ||
+ | |- | ||
+ | | enum Flip : 8 | ||
+ | | flip | ||
+ | |- | ||
+ | | enum Effect : 8 | ||
+ | | effect | ||
+ | |- | ||
+ | | enum Size : 8 | ||
+ | | size | ||
+ | |} | ||
+ | |||
+ | |||
+ | '''struct PackageParameterContextDetail''' | ||
+ | {| class="wikitable" border="1" | ||
+ | ! Type | ||
+ | ! Field | ||
+ | |- | ||
+ | | enum CameraSelect : 8 | ||
+ | | camera | ||
+ | |- | ||
+ | | enum Context : 8 | ||
+ | | context | ||
+ | |- | ||
+ | | enum Flip : 8 | ||
+ | | flip | ||
+ | |- | ||
+ | | enum Effect : 8 | ||
+ | | effect | ||
+ | |- | ||
+ | | s16 | ||
+ | | width | ||
+ | |- | ||
+ | | s16 | ||
+ | | height | ||
+ | |- | ||
+ | | s16 | ||
+ | | cropX0 | ||
+ | |- | ||
+ | | s16 | ||
+ | | cropY0 | ||
+ | |- | ||
+ | | s16 | ||
+ | | cropX1 | ||
+ | |- | ||
+ | | s16 | ||
+ | | cropY1 | ||
|} | |} | ||
Revision as of 15:06, 3 September 2015
cam:c (PORT_REG)
cam:s (PORT_CAL)
cam:q (PORT_QTM)
This was added with New3DS.
cam:u (PORT_USER)
Command Header | Description |
---|---|
0x00010040 | StartCapture(Port port) |
0x00020040 | StopCapture(Port port) |
0x00030040 | IsBusy(bool* busy, Port port) |
0x00040040 | ClearBuffer(Port port) |
0x00050040 | GetVsyncInterruptEvent(Handle* event, Port port) |
0x00060040 | GetBufferErrorInterruptEvent(Handle* event, Port port) |
0x00070102 | SetReceiving(Handle* event, void* dst, Port port, u32 imageSize, s16 transferUnit) |
0x00080040 | IsFinishedReceiving(bool* finishedReceiving, Port port) |
0x00090100 | SetTransferLines(Port port, s16 lines, s16 width, s16 height) |
0x000A0080 | GetMaxLines(s16* maxLines, s16 width, s16 height) |
0x000B0100 | SetTransferBytes(Port port, u32 bytes, s16 width, s16 height) |
0x000C0040 | GetTransferBytes(u32* transferBytes, Port port) |
0x000D0080 | GetMaxBytes(u32* maxBytes, s16 width, s16 height) |
0x000E0080 | SetTrimming(Port port, bool trimming) |
0x000F0040 | IsTrimming(bool* trimming, Port port) |
0x00100140 | SetTrimmingParams(Port port, s16 xStart, s16 yStart, s16 xEnd, s16 yEnd) |
0x00110040 | GetTrimmingParams(s16* xStart, s16* yStart, s16* xEnd, s16* yEnd, Port port) |
0x00120140 | SetTrimmingParamsCenter(Port port, s16 trimWidth, s16 trimHeight, s16 camWidth, s16 camHeight) |
0x00130040 | Activate(CameraSelect select) |
0x00140080 | SwitchContext(CameraSelect select, Context context) |
0x00150080 | SetExposure(CameraSelect select, s8 exposure) |
0x00160080 | SetWhiteBalance(CameraSelect select, WhiteBalance whiteBalance) |
0x00170080 | SetWhiteBalanceWithoutBaseUp(CameraSelect select, WhiteBalance whiteBalance) |
0x00180080 | SetSharpness(CameraSelect select, s8 sharpness) |
0x00190080 | SetAutoExposure(CameraSelect select, bool autoExposure) |
0x001A0040 | IsAutoExposure(bool* autoExposure, CameraSelect select) |
0x001B0080 | SetAutoWhiteBalance(CameraSelect select, bool autoWhiteBalance) |
0x001C0040 | IsAutoWhiteBalance(bool* autoWhiteBalance, CameraSelect select) |
0x001D00C0 | FlipImage(CameraSelect select, Flip flip, Context context) |
0x001E0200 | SetDetailSize(CameraSelect select, s16 width, s16 height, s16 cropX0, s16 cropY0, s16 cropX1, s16 cropY1, Context context) |
0x001F00C0 | SetSize(CameraSelect select, Size size, Context context) |
0x00200080 | SetFrameRate(CameraSelect select, FrameRate frameRate) |
0x00210080 | SetPhotoMode(CameraSelect select, PhotoMode photoMode) |
0x002200C0 | SetEffect(CameraSelect select, Effect effect, Context context) |
0x00230080 | SetContrast(CameraSelect select, Contrast contrast) |
0x00240080 | SetLensCorrection(CameraSelect select, LensCorrection lensCorrection) |
0x002500C0 | SetOutputFormat(CameraSelect select, OutputFormat format, Context context) |
0x00260140 | SetAutoExposureWindow(CameraSelect select, s16 x, s16 y, s16 width, s16 height) |
0x00270140 | SetAutoWhiteBalanceWindow(CameraSelect select, s16 x, s16 y, s16 width, s16 height) |
0x00280080 | SetNoiseFilter(CameraSelect select, bool noiseFilter) |
0x00290080 | SynchronizeVsyncTiming(CameraSelect select1, CameraSelect select2) |
0x002A0080 | GetLatestVsyncTiming(s64* timing, Port port, u32 past) |
0x002B0000 | GetStereoCameraCalibrationData(StereoCameraCalibrationData* data) |
0x002C0400 | SetStereoCameraCalibrationData(StereoCameraCalibrationData data) |
0x002D00C0 | WriteRegisterI2c(CameraSelect select, u16 addr, u16 data) |
0x002E00C0 | WriteMcuVariableI2c(CameraSelect select, u16 addr, u16 data) |
0x002F0080 | ReadRegisterI2cExclusive(u16* data, CameraSelect select, u16 addr) |
0x00300080 | ReadMcuVariableI2cExclusive(u16* data, CameraSelect select, u16 addr) |
0x00310180 | SetImageQualityCalibrationData(ImageQualityCalibrationData data) |
0x00320000 | GetImageQualityCalibrationData(ImageQualityCalibrationData* data) |
0x003302C0 | SetPackageParameterWithoutContext(PackageParameterCameraSelect param) |
0x00340140 | SetPackageParameterWithContext(PackageParameterContext param) |
0x003501C0 | SetPackageParameterWithContextDetail(PackageParameterContextDetail param) |
0x00360000 | GetSuitableY2rStandardCoefficient(StandardCoefficient* coefficient) |
0x00370202 | PlayShutterSoundWithWave(u8* waveData, s32 size, ChannelParam param, OptionInfo info) |
0x00380040 | PlayShutterSound(ShutterSoundType sound) |
0x00390000 | DriverInitialize() |
0x003A0000 | DriverFinalize() |
0x003B0000 | GetActivatedCamera(CameraSelect* select) |
0x003C0000 | GetSleepCamera(CameraSelect* select) |
0x003D0040 | SetSleepCamera(CameraSelect select) |
0x003E0040 | SetBrightnessSynchronization(bool brightnessSynchronization) |
enum Port
Enum | Value |
---|---|
PORT_NONE | 0x0 |
PORT_CAM1 | 0x1 << 0x0 |
PORT_CAM2 | 0x1 << 0x1 |
PORT_BOTH | PORT_CAM1 | PORT_CAM2 |
enum CameraSelect
Enum | Value |
---|---|
SELECT_NONE | 0x0 |
SELECT_OUT1 | 0x1 << 0x0 |
SELECT_IN1 | 0x1 << 0x1 |
SELECT_OUT2 | 0x1 << 0x2 |
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 |
enum Context
Enum | Value |
---|---|
CONTEXT_NONE | 0x0 |
CONTEXT_A | 0x1 << 0x0 |
CONTEXT_B | 0x1 << 0x1 |
CONTEXT_BOTH | CONTEXT_A | CONTEXT_B |
enum Flip
Enum | Value |
---|---|
FLIP_NONE | 0x0 |
FLIP_HORIZONTAL | 0x1 |
FLIP_VERTICAL | 0x2 |
FLIP_REVERSE | 0x3 |
enum Size
Enum | Value |
---|---|
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 |
enum FrameRate
Enum | Value |
---|---|
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 |
enum WhiteBalance
Enum | Value |
---|---|
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_MAX | 0x6 |
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 |
enum PhotoMode
Enum | Value |
---|---|
PHOTO_MODE_NORMAL | 0x0 |
PHOTO_MODE_PORTRAIT | 0x1 |
PHOTO_MODE_LANDSCAPE | 0x2 |
PHOTO_MODE_NIGHTVIEW | 0x3 |
PHOTO_MODE_LETTER | 0x4 |
enum Effect
Enum | Value |
---|---|
EFFECT_NONE | 0x0 |
EFFECT_MONO | 0x1 |
EFFECT_SEPIA | 0x2 |
EFFECT_NEGATIVE | 0x3 |
EFFECT_NEGAFILM | 0x4 |
EFFECT_SEPIA01 | 0x5 |
enum Contrast
Enum | Value |
---|---|
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 |
enum LensCorrection
Enum | Value |
---|---|
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 |
enum OutputFormat
Enum | Value |
---|---|
OUTPUT_YUV_422 | 0x0 |
OUTPUT_RGB_565 | 0x1 |
enum ShutterSoundType
Enum | Value |
---|---|
SHUTTER_SOUND_TYPE_NORMAL | 0x0 |
SHUTTER_SOUND_TYPE_MOVIE | 0x1 |
SHUTTER_SOUND_TYPE_MOVIE_END | 0x2 |
struct ImageQualityCalibrationData
Type | Field |
---|---|
s16 | aeBaseTarget |
s16 | kRL |
s16 | kGL |
s16 | kBL |
s16 | ccmPosition |
u16 | awbCcmL9Right |
u16 | awbCcmL9Left |
u16 | awbCcmL10Right |
u16 | awbCcmL10Left |
u16 | awbX0Right |
u16 | awbX0Left |
struct StereoCameraCalibrationData
Type | Field |
---|---|
bool | isValidRotationXY |
bool[3] | reservedFlag |
float | scale |
float | rotationZ |
float | translationX |
float | translationY |
float | rotationX |
float | rotationY |
float | angleOfViewRight |
float | angleOfViewLeft |
float | distanceToChart |
float | distanceCameras |
s16 | imageWidth |
s16 | imageHeight |
u8[16] | reserved |
struct PackageParameterCameraSelect
Type | Field |
---|---|
enum CameraSelect : 8 | camera |
s8 | exposure |
enum WhiteBalance : 8 | whiteBalance |
s8 | sharpness |
bool | autoExposureOn |
bool | autoWhiteBalanceOn |
enum FrameRate : 8 | frameRate |
enum PhotoMode : 8 | photoMode |
u8 | contrast |
enum LensCorrection : 8 | lensCorrection |
bool | noiseFilterOn |
u8 | padding |
s16 | autoExposureWindowX |
s16 | autoExposureWindowY |
s16 | autoExposureWindowWidth |
s16 | autoExposureWindowHeight |
s16 | autoWhiteBalanceWindowX |
s16 | autoWhiteBalanceWindowY |
s16 | autoWhiteBalanceWindowWidth |
s16 | autoWhiteBalanceWindowHeight |
struct PackageParameterContext
Type | Field |
---|---|
enum CameraSelect : 8 | camera |
enum Context : 8 | context |
enum Flip : 8 | flip |
enum Effect : 8 | effect |
enum Size : 8 | size |
struct PackageParameterContextDetail
Type | Field |
---|---|
enum CameraSelect : 8 | camera |
enum Context : 8 | context |
enum Flip : 8 | flip |
enum Effect : 8 | effect |
s16 | width |
s16 | height |
s16 | cropX0 |
s16 | cropY0 |
s16 | cropX1 |
s16 | cropY1 |
y2r:u
Command Header | Description |
---|---|
0x00010040 | SetInputFormat(InputFormat) |
0x0002... | GetInputFormat() |
0x00030040 | SetOutputFormat(OutputFormat) |
0x0004... | GetOutputFormat() |
0x00050040 | SetRotation(Rotation) |
0x0006... | GetRotation() |
0x00070040 | SetBlockAlignment(BlockAlignment) |
0x0008... | GetBlockAlignment() |
0x0009... | SetCntBit16(Value) |
0x000A... | GetCntBit16() |
0x000B... | SetCntBit17(Value) |
0x000C... | GetCntBit17() |
0x000D0040 | SetTransferEndInterrupt(bool) |
0x000E... | GetTransferEndInterrupt() |
0x000F0000 | GetTransferEndEvent(Handle*) |
0x00100102 | SetSendingY |
0x00110102 | SetSendingU |
0x00120102 | SetSendingV |
0x00130102 | SetSendingYUYV |
0x00140000 | IsDoneSendingYUYV(bool* state) |
0x00150000 | IsDoneSendingY(bool* state) |
0x00160000 | IsDoneSendingU(bool* state) |
0x00170000 | IsDoneSendingV(bool* state) |
0x00180102 | SetReceiving(unsigned int pDst, unsigned int imageSize, short transferUnit, short transferStride, 0, Handle dstProcess). |
0x00190000 | IsDoneReceiving(bool* state) |
0x001A0040 | SetInputLineWidth(short) |
0x001B... | GetInputLineWidth() |
0x001C0040 | SetInputLines(short) |
0x001D... | GetInputLines() |
0x001E.... | SetCoefficient(0x10-byte CoefficientStruct) |
0x001F.... | GetCoefficient() |
0x00200040 | SetStandardCoefficient(StandardCoefficient)
This command is equivalent to SetCoefficient(GenerateStandardCoefficient(StandardCoefficient)). |
0x0021.... | GenerateStandardCoefficient(StandardCoefficient) |
0x00220040 | SetAlpha(short) |
0x0023.... | GetAlpha() |
0x0024.... | SetUnknownParams(0x20 bytes UnknownParamBlock) |
0x0025.... | GetUnknownParams |
0x00260000 | StartConversion |
0x00270000 | StopConversion |
0x00280000 | IsBusyConversion(bool * state) |
0x002901C0 | SetConversionParams |
0x002A0000 | PingProcess(unsigned char * connectedNumber) |
0x002B0000 | DriverInitialize |
0x002C0000 | DriverFinalize |
0x002D.... | GetConversionParams |
InputFormat
Enum | Value |
---|---|
INPUT_YUV422_INDIV_8 | 0x0 |
INPUT_YUV420_INDIV_8 | 0x1 |
INPUT_YUV422_INDIV_16 | 0x2 |
INPUT_YUV420_INDIV_16 | 0x3 |
INPUT_YUV422_BATCH | 0x4 |
OutputFormat
Enum | Value |
---|---|
OUTPUT_RGB_32 | 0x0 |
OUTPUT_RGB_24 | 0x1 |
OUTPUT_RGB_16_555 | 0x2 |
OUTPUT_RGB_16_565 | 0x3 |
Rotation
Enum | Value |
---|---|
ROTATION_NONE | 0x0 |
ROTATION_CLOCKWISE_90 | 0x1 |
ROTATION_CLOCKWISE_180 | 0x2 |
ROTATION_CLOCKWISE_270 | 0x3 |
BlockAlignment
Enum | Value | Description |
---|---|---|
BLOCK_LINE | 0x0 | Output buffer's pixels are arranged linearly. Used when outputting to the framebuffer. |
BLOCK_8_BY_8 | 0x1 | Output buffer's pixels are morton swizzled. Used when outputting to a GPU texture. |
StandardCoefficient
Enum | Value |
---|---|
COEFFICIENT_ITU_R_BT_601 | 0x0 |
COEFFICIENT_ITU_R_BT_709 | 0x1 |
COEFFICIENT_ITU_R_BT_601_SCALING | 0x2 |
COEFFICIENT_ITU_R_BT_709_SCALING | 0x3 |
COEFFICIENT_MAX | 0x4 |