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

Method begin

libraries/BoolArray/BoolArray.cpp:28–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27
28uint8_t BoolArray::begin(const uint16_t size)
29{
30 if (size > BOOLARRAY_MAXSIZE) return BOOLARRAY_SIZE_ERROR;
31 _size = size;
32 _bytes = (_size + 7) / 8;
33 if (_array) free(_array);
34 _array = (byte*) malloc(_bytes);
35 return BOOLARRAY_OK;
36}
37
38
39uint8_t BoolArray::get(const uint16_t index)

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36