Just a brute-force look-up-table bit-reverse for 8-bit words. I'm using it to control a SSP device that has LSB-first bit ordering via SPI which is MSB-first
Dependents: Adafruit-GP9002-Grayscale-VFD-Library
Just a 256 byte table to allow for reversing the order of the bits in a byte with a simple lookup operation.
Diff: bitreversetable256.h
- Revision:
- 0:3b7549f5f018
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bitreversetable256.h Mon May 09 09:21:23 2016 +0000 @@ -0,0 +1,4 @@ +#ifndef _BITREVERSETABLE256 +#define _BITREVERSETABLE256 +extern const unsigned char BitReverseTable256[]; +#endif