#pragma once #include #include #include namespace vamp_pico { class display { public: auto init() -> void; auto show_remote(link_status link, remote_display_state const &state, std::bool_t busy = false) -> void; auto accept_title(std::string_view identifier, std::string_view image) -> std::bool_t; auto reject_title(std::string_view identifier) -> void; auto title_ready() const -> std::bool_t; // At most four scanlines per call, with an 8 ms minimum write interval. auto poll(std::uint64_t now_ms) -> void; private: auto dirty(std::size_t begin, std::size_t end) -> void; title_cache title_{}; std::array dirty_{}; link_status link_{link_status::CONNECTING}; std::bool_t busy_{}; remote_display_state state_{}; std::uint64_t last_write_ms_{}; std::size_t next_row_{}; }; }