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

Function bitSet64

libraries/bitHelpers/bitHelpers.cpp:513–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

511// optimized for performance
512
513void bitSet64(uint64_t & x, uint8_t n)
514{
515 if (n > 47) x |= (0x1000000000000 << (n - 48));
516 else if (n > 31) x |= (0x100000000 << (n - 32));
517 else if (n > 23) x |= (0x1000000 << (n - 24));
518 else if (n > 15) x |= (0x10000 << (n - 16));
519 else x |= (0x1 << n);
520}
521
522
523void bitClear64(uint64_t & x, uint8_t n)

Callers 1

bitWrite64Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected