Randomizing the choice of ports (uint8_t bitmask) efficiently
Assuming I have 4 ports that may be on and off, and are represented by the LSBs of a uint8_t mask, meaning 0b00001001 means ports 0, 3 are on.
Assuming I have 4 ports that may be on and off, and are represented by the LSBs of a uint8_t mask, meaning 0b00001001 means ports 0, 3 are on.