Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
cpu_endian.c File Reference
Byte order conversion. More...
Go to the source code of this file.
Functions | |
| uint16_t | swapInt16 (uint16_t value) |
| Reverse the byte order of a 16-bit word. | |
| uint32_t | swapInt32 (uint32_t value) |
| Reverse the byte order of a 32-bit word. | |
| uint64_t | swapInt64 (uint64_t value) |
| Reverse the byte order of a 64-bit word. | |
| uint8_t | reverseInt4 (uint8_t value) |
| Reverse bit order in a 4-bit word. | |
| uint8_t | reverseInt8 (uint8_t value) |
| Reverse bit order in a byte. | |
| uint16_t | reverseInt16 (uint16_t value) |
| Reverse bit order in a 16-bit word. | |
| uint32_t | reverseInt32 (uint32_t value) |
| Reverse bit order in a 32-bit word. | |
| uint64_t | reverseInt64 (uint64_t value) |
| Reverse bit order in a 64-bit word. | |
Detailed Description
Byte order conversion.
License
Copyright (C) 2010-2017 Oryx Embedded SARL. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version:
- 1.7.6
Definition in file cpu_endian.c.
Function Documentation
| uint16_t reverseInt16 | ( | uint16_t | value ) |
Reverse bit order in a 16-bit word.
- Parameters:
-
[in] value 16-bit value
- Returns:
- 16-bit value with bit order reversed
Definition at line 104 of file cpu_endian.c.
| uint32_t reverseInt32 | ( | uint32_t | value ) |
Reverse bit order in a 32-bit word.
- Parameters:
-
[in] value 32-bit value
- Returns:
- 32-bit value with bit order reversed
Definition at line 121 of file cpu_endian.c.
| uint8_t reverseInt4 | ( | uint8_t | value ) |
Reverse bit order in a 4-bit word.
- Parameters:
-
[in] value 4-bit value
- Returns:
- 4-bit value with bit order reversed
Definition at line 73 of file cpu_endian.c.
| uint64_t reverseInt64 | ( | uint64_t | value ) |
Reverse bit order in a 64-bit word.
- Parameters:
-
[in] value 64-bit value
- Returns:
- 64-bit value with bit order reversed
Definition at line 139 of file cpu_endian.c.
| uint8_t reverseInt8 | ( | uint8_t | value ) |
Reverse bit order in a byte.
- Parameters:
-
[in] value 8-bit value
- Returns:
- 8-bit value with bit order reversed
Definition at line 88 of file cpu_endian.c.
| uint16_t swapInt16 | ( | uint16_t | value ) |
Reverse the byte order of a 16-bit word.
- Parameters:
-
[in] value 16-bit value
- Returns:
- 16-bit value with byte order swapped
Definition at line 37 of file cpu_endian.c.
| uint32_t swapInt32 | ( | uint32_t | value ) |
Reverse the byte order of a 32-bit word.
- Parameters:
-
[in] value 32-bit value
- Returns:
- 32-bit value with byte order swapped
Definition at line 49 of file cpu_endian.c.
| uint64_t swapInt64 | ( | uint64_t | value ) |
Reverse the byte order of a 64-bit word.
- Parameters:
-
[in] value 64-bit value
- Returns:
- 64-bit value with byte order swapped
Definition at line 61 of file cpu_endian.c.
Generated on Tue Jul 12 2022 17:10:19 by
1.7.2