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

Method setAll

libraries/BoolArray/BoolArray.cpp:72–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70
71
72uint8_t BoolArray::setAll(const uint8_t value)
73{
74 if (_array == NULL) return BOOLARRAY_INIT_ERROR;
75 uint8_t *p = _array;
76 uint8_t t = _bytes;
77 if (value == 0)
78 {
79 while(t--) *p++ = 0;
80 }
81 else
82 {
83 while(t--) *p++ = 0xFF;
84 }
85 return BOOLARRAY_OK;
86}
87
88
89// -- END OF FILE --

Callers 1

unittestFunction · 0.45

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.36