| Patrick Venture | e772842 | 2018-11-14 20:16:33 -0800 | [diff] [blame] | 1 | #pragma once | 
|  | 2 |  | 
| Patrick Venture | 8b58856 | 2018-11-18 08:44:33 -0800 | [diff] [blame] | 3 | #include "internal/sys.hpp" | 
| Patrick Venture | e772842 | 2018-11-14 20:16:33 -0800 | [diff] [blame] | 4 | #include "lpc_interface.hpp" | 
|  | 5 |  | 
| Patrick Venture | 92973f1 | 2018-11-16 21:00:44 -0800 | [diff] [blame] | 6 | #include <memory> | 
|  | 7 |  | 
| Patrick Venture | e772842 | 2018-11-14 20:16:33 -0800 | [diff] [blame] | 8 | namespace blobs | 
|  | 9 | { | 
|  | 10 |  | 
|  | 11 | class LpcMapperNuvoton : public LpcMapperInterface | 
|  | 12 | { | 
|  | 13 | public: | 
|  | 14 | static std::unique_ptr<LpcMapperInterface> createNuvotonMapper(); | 
|  | 15 |  | 
| Patrick Venture | 8b58856 | 2018-11-18 08:44:33 -0800 | [diff] [blame] | 16 | /** | 
|  | 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 Venture | e772842 | 2018-11-14 20:16:33 -0800 | [diff] [blame] | 25 |  | 
|  | 26 | std::pair<std::uint32_t, std::uint32_t> | 
|  | 27 | mapWindow(std::uint32_t address, std::uint32_t length) override; | 
| Patrick Venture | 8b58856 | 2018-11-18 08:44:33 -0800 | [diff] [blame] | 28 |  | 
|  | 29 | private: | 
|  | 30 | const flash::internal::Sys* sys; | 
| Patrick Venture | e772842 | 2018-11-14 20:16:33 -0800 | [diff] [blame] | 31 | }; | 
|  | 32 |  | 
|  | 33 | } // namespace blobs |