MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / BoolArray

Class BoolArray

libraries/BoolArray/BoolArray.h:27–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25
26
27class BoolArray
28{
29public:
30 BoolArray();
31 ~BoolArray();
32
33 uint8_t begin(const uint16_t size);
34
35 uint16_t size() { return _size; };
36 uint8_t memory() { return _bytes; };
37
38 uint8_t setAll(const uint8_t value);
39 uint8_t clear() { return setAll(0); };
40 uint8_t get(const uint16_t index);
41 uint8_t set(const uint16_t index, const uint8_t value);
42 uint8_t toggle(const uint16_t index);
43
44private:
45 uint8_t _masks[8] = {1, 2, 4, 8, 16, 32, 64, 128};
46 uint8_t * _array;
47 uint16_t _size = 0;
48 uint8_t _bytes = 0;
49};
50
51
52// -- END OF FILE --

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected