srecord: bitrev.h Source File

srecord 1.65.0

Loading...
Searching...
No Matches
bitrev.h
Go to the documentation of this file.
1//
2// srecord - Manipulate EPROM load files
3// Copyright (C) 2009-2011 Peter Miller
4//
5// This program is free software; you can redistribute it and/or modify
6// it under the terms of the GNU Lesser General Public License as published by
7// the Free Software Foundation; either version 3 of the License, or (at
8// your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13// General Public License for more details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with this program. If not, see <http://www.gnu.org/licenses/>.
17//
18
19#ifndef SRECORD_BITREV_H
20#define SRECORD_BITREV_H
21
22namespace srecord
23{
24
25/**
26 * The bitrev8 function is used to reverse the order of the bits in an
27 * 8-bit number. This function is its own inverse.
28 *
29 * @param value
30 * The value to be reversed.
31 */
32 unsigned char bitrev8(unsigned char value);
33
34/**
35 * The bitrev16 function is used to reverse the order of the bits in an
36 * 16-bit number. This function is its own inverse.
37 *
38 * @param value
39 * The value to be reversed.
40 */
41 unsigned short bitrev16(unsigned short value);
42
43/**
44 * The bitrev24 function is used to reverse the order of the bits in an
45 * 24-bit number. This function is its own inverse.
46 *
47 * @param value
48 * The value to be reversed.
49 */
50 unsigned long bitrev24(unsigned long value);
51
52/**
53 * The bitrev32 function is used to reverse the order of the bits in an
54 * 32-bit number. This function is its own inverse.
55 *
56 * @param value
57 * The value to be reversed.
58 */
59 unsigned long bitrev32(unsigned long value);
60
61/**
62 * The bitrev40 function is used to reverse the order of the bits in an
63 * 40-bit number. This function is its own inverse.
64 *
65 * @param value
66 * The value to be reversed.
67 */
68 unsigned long long bitrev40(unsigned long long value);
69
70/**
71 * The bitrev48 function is used to reverse the order of the bits in an
72 * 48-bit number. This function is its own inverse.
73 *
74 * @param value
75 * The value to be reversed.
76 */
77 unsigned long long bitrev48(unsigned long long value);
78
79/**
80 * The bitrev56 function is used to reverse the order of the bits in an
81 * 56-bit number. This function is its own inverse.
82 *
83 * @param value
84 * The value to be reversed.
85 */
86 unsigned long long bitrev56(unsigned long long value);
87
88/**
89 * The bitrev64 function is used to reverse the order of the bits in an
90 * 64-bit number. This function is its own inverse.
91 *
92 * @param value
93 * The value to be reversed.
94 */
95 unsigned long long bitrev64(unsigned long long value);
96
97};
98
99// vim: set ts=8 sw=4 et :
100#endif // SRECORD_BITREV_H
srecord
Definition adler16.h:25
srecord::bitrev16
unsigned short bitrev16(unsigned short value)
The bitrev16 function is used to reverse the order of the bits in an 16-bit number.
srecord::bitrev64
unsigned long long bitrev64(unsigned long long value)
The bitrev64 function is used to reverse the order of the bits in an 64-bit number.
srecord::bitrev48
unsigned long long bitrev48(unsigned long long value)
The bitrev48 function is used to reverse the order of the bits in an 48-bit number.
srecord::bitrev56
unsigned long long bitrev56(unsigned long long value)
The bitrev56 function is used to reverse the order of the bits in an 56-bit number.
srecord::bitrev32
unsigned long bitrev32(unsigned long value)
The bitrev32 function is used to reverse the order of the bits in an 32-bit number.
srecord::bitrev40
unsigned long long bitrev40(unsigned long long value)
The bitrev40 function is used to reverse the order of the bits in an 40-bit number.
srecord::bitrev8
unsigned char bitrev8(unsigned char value)
The bitrev8 function is used to reverse the order of the bits in an 8-bit number.
srecord::bitrev24
unsigned long bitrev24(unsigned long value)
The bitrev24 function is used to reverse the order of the bits in an 24-bit number.