bitrev.h 477 B

1234567891011121314151617181920212223
  1. /*
  2. * This file is released under the terms of GPL v2 and any later version.
  3. * See the file COPYING in the root directory of the source tree for details.
  4. *
  5. * Based on bitrev from the Linux kernel, by Akinobu Mita
  6. */
  7. #ifndef _LINUX_BITREV_H
  8. #define _LINUX_BITREV_H
  9. #include <linux/types.h>
  10. extern u8 const byte_rev_table[256];
  11. static inline u8 bitrev8(u8 byte)
  12. {
  13. return byte_rev_table[byte];
  14. }
  15. u16 bitrev16(u16 in);
  16. u32 bitrev32(u32 in);
  17. #endif /* _LINUX_BITREV_H */