service: irs: Migrate service to new interface
This commit is contained in:
parent
a2f23746c2
commit
12b6162852
4 changed files with 260 additions and 407 deletions
|
@ -145,9 +145,8 @@ void ImageTransferProcessor::SetTransferMemoryAddress(Common::ProcessAddress t_m
|
|||
}
|
||||
|
||||
Core::IrSensor::ImageTransferProcessorState ImageTransferProcessor::GetState(
|
||||
std::vector<u8>& data) const {
|
||||
const auto size = GetDataSize(current_config.trimming_format);
|
||||
data.resize(size);
|
||||
std::span<u8> data) const {
|
||||
const auto size = std::min(GetDataSize(current_config.trimming_format), data.size());
|
||||
system.ApplicationMemory().ReadBlock(transfer_memory, data.data(), size);
|
||||
return processor_state;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <span>
|
||||
|
||||
#include "common/typed_address.h"
|
||||
#include "hid_core/irsensor/irs_types.h"
|
||||
#include "hid_core/irsensor/processor_base.h"
|
||||
|
@ -39,7 +41,7 @@ public:
|
|||
// Transfer memory where the image data will be stored
|
||||
void SetTransferMemoryAddress(Common::ProcessAddress t_mem);
|
||||
|
||||
Core::IrSensor::ImageTransferProcessorState GetState(std::vector<u8>& data) const;
|
||||
Core::IrSensor::ImageTransferProcessorState GetState(std::span<u8> data) const;
|
||||
|
||||
private:
|
||||
// This is nn::irsensor::ImageTransferProcessorConfig
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue