Patrick Venture | e772842 | 2018-11-14 20:16:33 -0800 | [diff] [blame] | 1 | #pragma once |
2 | |||||
Patrick Venture | 7b91cbc | 2018-11-28 14:24:41 -0800 | [diff] [blame] | 3 | #include "internal/sys.hpp" |
Patrick Venture | 5251da9 | 2019-01-17 11:25:26 -0800 | [diff] [blame^] | 4 | #include "window_hw_interface.hpp" |
Patrick Venture | e772842 | 2018-11-14 20:16:33 -0800 | [diff] [blame] | 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 | |||||
Patrick Venture | 5251da9 | 2019-01-17 11:25:26 -0800 | [diff] [blame^] | 11 | class LpcMapperAspeed : public HardwareMapperInterface |
Patrick Venture | e772842 | 2018-11-14 20:16:33 -0800 | [diff] [blame] | 12 | { |
13 | public: | ||||
Patrick Venture | 5251da9 | 2019-01-17 11:25:26 -0800 | [diff] [blame^] | 14 | static std::unique_ptr<HardwareMapperInterface> |
Patrick Venture | 28abae7 | 2018-12-14 09:44:02 -0800 | [diff] [blame] | 15 | createAspeedMapper(std::size_t regionSize); |
Patrick Venture | e772842 | 2018-11-14 20:16:33 -0800 | [diff] [blame] | 16 | |
Patrick Venture | 28abae7 | 2018-12-14 09:44:02 -0800 | [diff] [blame] | 17 | LpcMapperAspeed(std::size_t regionSize, |
Patrick Venture | fa9d0c9 | 2018-12-13 16:38:27 -0800 | [diff] [blame] | 18 | const internal::Sys* sys = &internal::sys_impl) : |
Patrick Venture | 7b91cbc | 2018-11-28 14:24:41 -0800 | [diff] [blame] | 19 | regionSize(regionSize), |
20 | sys(sys){}; | ||||
Patrick Venture | e772842 | 2018-11-14 20:16:33 -0800 | [diff] [blame] | 21 | |
22 | std::pair<std::uint32_t, std::uint32_t> | ||||
23 | mapWindow(std::uint32_t address, std::uint32_t length) override; | ||||
Patrick Venture | 7b91cbc | 2018-11-28 14:24:41 -0800 | [diff] [blame] | 24 | |
25 | private: | ||||
Patrick Venture | 28abae7 | 2018-12-14 09:44:02 -0800 | [diff] [blame] | 26 | std::size_t regionSize; |
Patrick Venture | fa9d0c9 | 2018-12-13 16:38:27 -0800 | [diff] [blame] | 27 | const internal::Sys* sys; |
Patrick Venture | e772842 | 2018-11-14 20:16:33 -0800 | [diff] [blame] | 28 | }; |
29 | |||||
30 | } // namespace blobs |