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

Method get

libraries/BitArray/BitArray.cpp:71–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69
70
71uint32_t BitArray::get(const uint16_t index)
72{
73 // if (_error != BA_OK) return BA_ERR;
74 // if (index >= _size) return BA_IDX_RANGE;
75 uint32_t v = 0;
76 uint16_t pos = index * _bits;
77
78 for (uint8_t i = _bits; i-- > 0;)
79 {
80 v <<= 1;
81 v += _bitget(pos + i);
82 }
83 return v;
84}
85
86
87uint32_t BitArray::set(const uint16_t index, uint32_t value)

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36