Skip to content

Instantly share code, notes, and snippets.

@kisssko
Last active February 3, 2022 10:11
Show Gist options
  • Save kisssko/b65a9286ce2a1c7748b0b505029b2495 to your computer and use it in GitHub Desktop.
Save kisssko/b65a9286ce2a1c7748b0b505029b2495 to your computer and use it in GitHub Desktop.
REV8
#define REV8(V) ((((V) & 0x01) << 7) | \
(((V) & 0x02) << 5) | \
(((V) & 0x04) << 3) | \
(((V) & 0x08) << 1) | \
(((V) & 0x10) >> 1) | \
(((V) & 0x20) >> 3) | \
(((V) & 0x40) >> 5) | \
(((V) & 0x80) >> 7))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment