Refactor pins to be user-provided

This commit is contained in:
BlackMark 2022-05-26 15:16:09 +02:00
parent 2bad84d2e6
commit 1c01b17f4d

View File

@ -7,14 +7,14 @@
#include "../clock.hpp" #include "../clock.hpp"
#include "../io/io.hpp" #include "../io/io.hpp"
template <typename Spi> template <typename Spi, io::P RstPin, io::P DcPin, io::P BusyPin>
class Epd { class Epd {
static constexpr auto width = uint16_t{200}; static constexpr auto width = uint16_t{200};
static constexpr auto height = uint16_t{200}; static constexpr auto height = uint16_t{200};
io::Pin<io::P::C1> m_rst; io::Pin<RstPin> m_rst;
io::Pin<io::P::C0> m_dc; io::Pin<DcPin> m_dc;
io::Pin<io::P::C2> m_bsy; io::Pin<BusyPin> m_bsy;
public: public:
Epd() = default; Epd() = default;