OpenNet
ByteOrder.h
Aller à la documentation de ce fichier.
1 
2 // Product OpenNet
3 
8 
9 // TEST COVERAGE 2019-05-03 KMS - Martin Dubois, ing.
10 
11 #pragma once
12 
13 #ifndef _OPEN_NET_NO_FUNCTION_
14 
15 // Functions
17 
29 unsigned short ByteOrder_Swap16(unsigned short aIn)
30 {
31  return ((aIn >> 8) | (aIn << 8));
32 }
33 
45 unsigned int ByteOrder_Swap32(unsigned int aIn)
46 {
47  return ((aIn >> 24) | ((aIn >> 8) & 0x0000ff00) | ((aIn << 8) & 0x00ff0000) | (aIn << 24));
48 }
49 
50 #endif // ! _OPEN_NET_NO_FUNCTION_
unsigned short ByteOrder_Swap16(unsigned short aIn)
Renverse l'ordre des octets.
Definition: ByteOrder.h:29
unsigned int ByteOrder_Swap32(unsigned int aIn)
Renverse l'ordre des octets.
Definition: ByteOrder.h:45