blob: a61d9569b4da35bf368625c64b42f988d577b440 [file] [log] [blame]
Mike Dunn0dd9c7a92013-04-12 11:59:17 -07001/*
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
8#ifndef _LINUX_BITREV_H
9#define _LINUX_BITREV_H
10
11#include <linux/types.h>
12
13extern u8 const byte_rev_table[256];
14
15static inline u8 bitrev8(u8 byte)
16{
17 return byte_rev_table[byte];
18}
19
20u16 bitrev16(u16 in);
21u32 bitrev32(u32 in);
22
23#endif /* _LINUX_BITREV_H */