summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/irsensor/tera_plugin_processor.h
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2022-06-19 06:45:06 +0200
committergerman77 <juangerman-13@hotmail.com>2022-07-24 02:40:25 +0200
commit453970059528d564d9ef88f7f9096c05946fbefe (patch)
tree3b1a43e8dd51e5c03204108ac72c4cd33d5361c0 /src/core/hle/service/hid/irsensor/tera_plugin_processor.h
parentcore: hid: Add cammera support (diff)
downloadyuzu-453970059528d564d9ef88f7f9096c05946fbefe.tar
yuzu-453970059528d564d9ef88f7f9096c05946fbefe.tar.gz
yuzu-453970059528d564d9ef88f7f9096c05946fbefe.tar.bz2
yuzu-453970059528d564d9ef88f7f9096c05946fbefe.tar.lz
yuzu-453970059528d564d9ef88f7f9096c05946fbefe.tar.xz
yuzu-453970059528d564d9ef88f7f9096c05946fbefe.tar.zst
yuzu-453970059528d564d9ef88f7f9096c05946fbefe.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/hid/irsensor/tera_plugin_processor.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/core/hle/service/hid/irsensor/tera_plugin_processor.h b/src/core/hle/service/hid/irsensor/tera_plugin_processor.h
new file mode 100644
index 000000000..60f8057a5
--- /dev/null
+++ b/src/core/hle/service/hid/irsensor/tera_plugin_processor.h
@@ -0,0 +1,53 @@
+// 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::HID {
+class TeraPluginProcessor final : public ProcessorBase {
+public:
+ explicit TeraPluginProcessor(Core::IrSensor::DeviceFormat& device_format);
+ ~TeraPluginProcessor() 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::PackedTeraPluginProcessorConfig config);
+
+private:
+ // This is nn::irsensor::TeraPluginProcessorConfig
+ struct TeraPluginProcessorConfig {
+ u8 mode;
+ u8 unknown_1;
+ u8 unknown_2;
+ u8 unknown_3;
+ };
+ static_assert(sizeof(TeraPluginProcessorConfig) == 0x4,
+ "TeraPluginProcessorConfig is an invalid size");
+
+ struct TeraPluginProcessorState {
+ s64 sampling_number;
+ u64 timestamp;
+ Core::IrSensor::CameraAmbientNoiseLevel ambient_noise_level;
+ std::array<u8, 0x12c> data;
+ };
+ static_assert(sizeof(TeraPluginProcessorState) == 0x140,
+ "TeraPluginProcessorState is an invalid size");
+
+ TeraPluginProcessorConfig current_config{};
+ Core::IrSensor::DeviceFormat& device;
+};
+
+} // namespace Service::HID