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

Method get

libraries/BoolArray/BoolArray.cpp:39–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37
38
39uint8_t BoolArray::get(const uint16_t index)
40{
41 if (_array == NULL) return BOOLARRAY_INIT_ERROR;
42 if (index >= _size) return BOOLARRAY_SIZE_ERROR;
43 uint8_t by = index / 8;
44 uint8_t bi = index & 7;
45 return (_array[by] & _masks[bi]) > 0;
46}
47
48
49uint8_t BoolArray::set(const uint16_t index, const uint8_t value)

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36