tools: tie devmem io handler into lpc handler
The lpc handler requires mapping memory on the host.
Change-Id: Ic851dfa6c06d10566f66153ce7915cf5ad66992b
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/tools/lpc.hpp b/tools/lpc.hpp
index 21c776d..1ccecc2 100644
--- a/tools/lpc.hpp
+++ b/tools/lpc.hpp
@@ -3,6 +3,7 @@
#include "blob_interface.hpp"
#include "interface.hpp"
#include "internal/sys.hpp"
+#include "io.hpp"
#include <cstdint>
@@ -20,10 +21,10 @@
class LpcDataHandler : public DataInterface
{
public:
- LpcDataHandler(BlobInterface* blob,
+ LpcDataHandler(BlobInterface* blob, HostIoInterface* io,
const internal::Sys* sys = &internal::sys_impl) :
blob(blob),
- sys(sys){};
+ io(io), sys(sys){};
bool sendContents(const std::string& input, std::uint16_t session) override;
blobs::FirmwareBlobHandler::UpdateFlags supportedType() const override
@@ -33,6 +34,7 @@
private:
BlobInterface* blob;
+ HostIoInterface* io;
const internal::Sys* sys;
};