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

Method toggle

libraries/BoolArray/BoolArray.cpp:61–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59
60
61uint8_t BoolArray::toggle(const uint16_t index)
62{
63 if (_array == NULL) return BOOLARRAY_INIT_ERROR;
64 if (index >= _size) return BOOLARRAY_SIZE_ERROR;
65 uint8_t by = index / 8;
66 uint8_t bi = index & 7;
67 _array[by] ^= _masks[bi];
68 return BOOLARRAY_OK;
69}
70
71
72uint8_t BoolArray::setAll(const uint8_t value)

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36