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 | 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 LpcMapperAspeed : public LpcMapperInterface |
| 12 | { |
| 13 | public: |
Patrick Venture | 7b91cbc | 2018-11-28 14:24:41 -0800 | [diff] [blame] | 14 | static std::unique_ptr<LpcMapperInterface> |
| 15 | createAspeedMapper(size_t regionSize); |
Patrick Venture | e772842 | 2018-11-14 20:16:33 -0800 | [diff] [blame] | 16 | |
Patrick Venture | 7b91cbc | 2018-11-28 14:24:41 -0800 | [diff] [blame] | 17 | LpcMapperAspeed(size_t regionSize, const flash::internal::Sys* sys = |
| 18 | &flash::internal::sys_impl) : |
| 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: |
| 26 | size_t regionSize; |
| 27 | const flash::internal::Sys* sys; |
Patrick Venture | e772842 | 2018-11-14 20:16:33 -0800 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | } // namespace blobs |