mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-04 02:22:15 +02:00
[irs] Add supported modes
This commit is contained in:
parent
84ef73fce9
commit
22d8ac4e80
@ -26,22 +26,22 @@ typedef struct {
|
|||||||
} PACKED irsPackedMomentProcessorConfig;
|
} PACKED irsPackedMomentProcessorConfig;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 exposure; ///< IR Sensor exposure time in microseconds.
|
u64 exposure; ///< IR Sensor exposure time in nanoseconds.
|
||||||
u32 ir_leds; ///< Controls IR leds. Can be all, group 1, group 2 or none.
|
u32 ir_leds; ///< Controls the IR leds. 0: All leds, 1: Bright group, 2: Dim group, 3: None.
|
||||||
u32 digital_gain; ///< IR sensor signal's digital gain.
|
u32 digital_gain; ///< IR sensor signal's digital gain.
|
||||||
u8 negative; ///< Inverts the captured image.
|
u8 negative; ///< Inverts the captured image. 0: Normal image, 1: Negative image.
|
||||||
u8 pad[7];
|
u8 pad[7];
|
||||||
u32 sensor_res; ///< IR Sensor resolution.
|
u32 sensor_res; ///< IR Sensor resolution. 0: 240x320, 1: 120x160, 2: 60x80.
|
||||||
} irsImageTransferProcessorConfig;
|
} irsImageTransferProcessorConfig;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u64 exposure; ///< IR Sensor exposure time in microseconds.
|
u64 exposure; ///< IR Sensor exposure time in nanoseconds.
|
||||||
u8 ir_leds; ///< Controls IR leds. Can be all, group 1, group 2 or none.
|
u8 ir_leds; ///< Controls the IR leds. 0: All leds, 1: Bright group, 2: Dim group, 3: None.
|
||||||
u8 digital_gain; ///< IR sensor signal's digital gain.
|
u8 digital_gain; ///< IR sensor signal's digital gain.
|
||||||
u8 negative; ///< Inverts the captured image.
|
u8 negative; ///< Inverts the captured image. 0: Normal image, 1: Negative image.
|
||||||
u8 pad[5];
|
u8 pad[5];
|
||||||
u32 unk_constant;//offset 0x10
|
u32 unk_constant;//offset 0x10
|
||||||
u8 sensor_res; ///< IR Sensor resolution.
|
u8 sensor_res; ///< IR Sensor resolution. 0: 240x320, 1: 120x160, 2: 60x80.
|
||||||
u8 pad2[3];
|
u8 pad2[3];
|
||||||
} irsPackedImageTransferProcessorConfig;
|
} irsPackedImageTransferProcessorConfig;
|
||||||
|
|
||||||
@ -79,4 +79,8 @@ Result irsStopImageProcessor(u32 IrCameraHandle);
|
|||||||
/// TODO: What does this really do?
|
/// TODO: What does this really do?
|
||||||
Result irsSuspendImageProcessor(u32 IrCameraHandle);
|
Result irsSuspendImageProcessor(u32 IrCameraHandle);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the default configuration for Image Transfer mode.
|
||||||
|
* Defaults are exposure 300us, IR LEDs all ON, 8x digital gain, normal image and resolution 240 x 320.
|
||||||
|
*/
|
||||||
void irsGetDefaultImageTransferProcessorConfig(irsImageTransferProcessorConfig *config);
|
void irsGetDefaultImageTransferProcessorConfig(irsImageTransferProcessorConfig *config);
|
||||||
|
@ -416,7 +416,6 @@ Result irsGetImageTransferProcessorState(u32 IrCameraHandle, void* buffer, size_
|
|||||||
void irsGetDefaultImageTransferProcessorConfig(irsImageTransferProcessorConfig *config) {
|
void irsGetDefaultImageTransferProcessorConfig(irsImageTransferProcessorConfig *config) {
|
||||||
memset(config, 0, sizeof(irsImageTransferProcessorConfig));
|
memset(config, 0, sizeof(irsImageTransferProcessorConfig));
|
||||||
|
|
||||||
//Set default exposure 300ms, IR LEDs all ON, 8x digital gain, normal image and resolution 240 x 320.
|
|
||||||
config->exposure = 300000;
|
config->exposure = 300000;
|
||||||
config->ir_leds = 0;
|
config->ir_leds = 0;
|
||||||
config->digital_gain = 8;
|
config->digital_gain = 8;
|
||||||
|
Loading…
Reference in New Issue
Block a user