blob: 0bb25af08648fb0ffb3462feb433b1a9f06efc5c [file] [log] [blame]
Patrick Venturee7728422018-11-14 20:16:33 -08001#pragma once
2
Patrick Venture8b588562018-11-18 08:44:33 -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 LpcMapperNuvoton : public LpcMapperInterface
12{
13 public:
14 static std::unique_ptr<LpcMapperInterface> createNuvotonMapper();
15
Patrick Venture8b588562018-11-18 08:44:33 -080016 /**
17 * Create an LpcMapper for Nuvoton.
18 *
19 * @param[in] a sys call interface pointer.
20 * @todo Needs reserved memory region's physical address and size.
21 */
22 explicit LpcMapperNuvoton(
23 const flash::internal::Sys* sys = &flash::internal::sys_impl) :
24 sys(sys){};
Patrick Venturee7728422018-11-14 20:16:33 -080025
26 std::pair<std::uint32_t, std::uint32_t>
27 mapWindow(std::uint32_t address, std::uint32_t length) override;
Patrick Venture8b588562018-11-18 08:44:33 -080028
29 private:
30 const flash::internal::Sys* sys;
Patrick Venturee7728422018-11-14 20:16:33 -080031};
32
33} // namespace blobs