diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-07-24 19:31:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-24 19:31:28 +0200 |
commit | 5af06d14337a61d9ed1093079d13f68cbb1f5451 (patch) | |
tree | 88df3fada076b04c2ab2da8972d1d785f492b520 /src/core/hle/service/hid/irsensor/ir_led_processor.h | |
parent | Merge pull request #8545 from Kelebek1/Audio (diff) | |
parent | yuzu: Add webcam support and rebase to latest master (diff) | |
download | yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.tar yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.tar.gz yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.tar.bz2 yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.tar.lz yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.tar.xz yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.tar.zst yuzu-5af06d14337a61d9ed1093079d13f68cbb1f5451.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/hid/irsensor/ir_led_processor.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/core/hle/service/hid/irsensor/ir_led_processor.h b/src/core/hle/service/hid/irsensor/ir_led_processor.h new file mode 100644 index 000000000..c3d8693c9 --- /dev/null +++ b/src/core/hle/service/hid/irsensor/ir_led_processor.h @@ -0,0 +1,47 @@ +// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +#include "common/bit_field.h" +#include "common/common_types.h" +#include "core/hid/irs_types.h" +#include "core/hle/service/hid/irsensor/processor_base.h" + +namespace Service::IRS { +class IrLedProcessor final : public ProcessorBase { +public: + explicit IrLedProcessor(Core::IrSensor::DeviceFormat& device_format); + ~IrLedProcessor() override; + + // Called when the processor is initialized + void StartProcessor() override; + + // Called when the processor is suspended + void SuspendProcessor() override; + + // Called when the processor is stopped + void StopProcessor() override; + + // Sets config parameters of the camera + void SetConfig(Core::IrSensor::PackedIrLedProcessorConfig config); + +private: + // This is nn::irsensor::IrLedProcessorConfig + struct IrLedProcessorConfig { + Core::IrSensor::CameraLightTarget light_target; + }; + static_assert(sizeof(IrLedProcessorConfig) == 0x4, "IrLedProcessorConfig is an invalid size"); + + struct IrLedProcessorState { + s64 sampling_number; + u64 timestamp; + std::array<u8, 0x8> data; + }; + static_assert(sizeof(IrLedProcessorState) == 0x18, "IrLedProcessorState is an invalid size"); + + IrLedProcessorConfig current_config{}; + Core::IrSensor::DeviceFormat& device; +}; + +} // namespace Service::IRS |