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

Method get

libraries/NibbleArray/nibbleArray.cpp:33–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31
32
33uint8_t nibbleArray::get(const uint16_t index)
34{
35 if (index > _size)
36 {
37 return NIBBLEARRAY_ERROR_INDEX; // disable this check for more speed
38 }
39 if (index & 1) return _arr[index/2] & 0x0F;
40 return _arr[index/2] >> 4;
41}
42
43
44uint8_t nibbleArray::set(const uint16_t index, uint8_t value)

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36