11 #ifndef __CD4067_HEADER
12 #define __CD4067_HEADER
16 #include "../tool/out_pin.hpp"
17 #include "../tool/fake_button.hpp"
20 template<u
int8_t master, u
int8_t d0, u
int8_t d1, u
int8_t d2, u
int8_t d3,
bool high_state = 0>
30 pinMode(master, INPUT_PULLUP);
32 pinMode(master, INPUT);
35 #define READ(x) in_[x].update(high_state == digitalRead(master));
73 void copy(T & vector, uint8_t
const & pos) {
74 for(uint8_t
i = 0;
i < 16; ++
i) {
75 vector[pos +
i] = in_[
i].state();
78 tool::fake_button_class
const &
operator[](uint8_t
const & pos)
const {
91 #endif //__CD4067_HEADER
void update()
Definition: CD4067.hpp:34
Definition: CD4067.hpp:21
tool::fake_button_class const & operator[](uint8_t const &pos) const
Definition: CD4067.hpp:78
void copy(T &vector, uint8_t const &pos)
Definition: CD4067.hpp:73
CD4067_class()
Definition: CD4067.hpp:23