blob: 47c7a4a989c9d02ebee5afdcb0573908ff31d3bc [file] [log] [blame]
Patrick Venturee7728422018-11-14 20:16:33 -08001#pragma once
2
Patrick Venture7b91cbc2018-11-28 14:24:41 -08003#include "internal/sys.hpp"
Patrick Venturee7728422018-11-14 20:16:33 -08004#include "lpc_interface.hpp"
5
Patrick Venture92973f12018-11-16 21:00:44 -08006#include <memory>
7
Patrick Venturee7728422018-11-14 20:16:33 -08008namespace blobs
9{
10
11class LpcMapperAspeed : public LpcMapperInterface
12{
13 public:
Patrick Venture7b91cbc2018-11-28 14:24:41 -080014 static std::unique_ptr<LpcMapperInterface>
15 createAspeedMapper(size_t regionSize);
Patrick Venturee7728422018-11-14 20:16:33 -080016
Patrick Venture7b91cbc2018-11-28 14:24:41 -080017 LpcMapperAspeed(size_t regionSize, const flash::internal::Sys* sys =
18 &flash::internal::sys_impl) :
19 regionSize(regionSize),
20 sys(sys){};
Patrick Venturee7728422018-11-14 20:16:33 -080021
22 std::pair<std::uint32_t, std::uint32_t>
23 mapWindow(std::uint32_t address, std::uint32_t length) override;
Patrick Venture7b91cbc2018-11-28 14:24:41 -080024
25 private:
26 size_t regionSize;
27 const flash::internal::Sys* sys;
Patrick Venturee7728422018-11-14 20:16:33 -080028};
29
30} // namespace blobs