blob: 61cc806a1937fdf300ea42ae48c14779e28e0712 [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 */
Patrick Venturefa9d0c92018-12-13 16:38:27 -080022 explicit LpcMapperNuvoton(const internal::Sys* sys = &internal::sys_impl) :
Patrick Venture8b588562018-11-18 08:44:33 -080023 sys(sys){};
Patrick Venturee7728422018-11-14 20:16:33 -080024
25 std::pair<std::uint32_t, std::uint32_t>
26 mapWindow(std::uint32_t address, std::uint32_t length) override;
Patrick Venture8b588562018-11-18 08:44:33 -080027
28 private:
Patrick Venturefa9d0c92018-12-13 16:38:27 -080029 const internal::Sys* sys;
Patrick Venturee7728422018-11-14 20:16:33 -080030};
31
32} // namespace blobs