Loading...
Searching...
No Matches
endian.in.h File Reference

Go to the source code of this file.

## Macros

#define | _GET_BYTE(x, n)
#define | _PED_SWAP16(x)
#define | _PED_SWAP32(x)
#define | _PED_SWAP64(x)
#define | PED_BE16_TO_CPU(x)
#define | PED_BE32_TO_CPU(x)
#define | PED_BE64_TO_CPU(x)
#define | PED_CPU_TO_BE16(x)
#define | PED_CPU_TO_BE32(x)
#define | PED_CPU_TO_BE64(x)
#define | PED_CPU_TO_LE16(x)
#define | PED_CPU_TO_LE32(x)
#define | PED_CPU_TO_LE64(x)
#define | PED_LE16_TO_CPU(x)
#define | PED_LE32_TO_CPU(x)
#define | PED_LE64_TO_CPU(x)
#define | PED_SWAP16(x)
#define | PED_SWAP32(x)
#define | PED_SWAP64(x)

## Macro Definition Documentation

## _GET_BYTE

#define _GET_BYTE | ( |  | x,
|  |  | n )

Value:
( ((x) >> (8 * (n))) & 0xff )

## _PED_SWAP16

#define _PED_SWAP16 | ( |  | x | ) |

Value:
( (_GET_BYTE(x, 0) << 8) \
+ (_GET_BYTE(x, 1) << 0) )
_GET_BYTE
#define _GET_BYTE(x, n)
Definition endian.h:28

## _PED_SWAP32

#define _PED_SWAP32 | ( |  | x | ) |

Value:
( (_GET_BYTE(x, 0) << 24) \
+ (_GET_BYTE(x, 1) << 16) \
+ (_GET_BYTE(x, 2) << 8) \
+ (_GET_BYTE(x, 3) << 0) )

## _PED_SWAP64

#define _PED_SWAP64 | ( |  | x | ) |

Value:
( (_GET_BYTE(x, 0) << 56) \
+ (_GET_BYTE(x, 1) << 48) \
+ (_GET_BYTE(x, 2) << 40) \
+ (_GET_BYTE(x, 3) << 32) \
+ (_GET_BYTE(x, 4) << 24) \
+ (_GET_BYTE(x, 5) << 16) \
+ (_GET_BYTE(x, 6) << 8) \
+ (_GET_BYTE(x, 7) << 0) )

## PED_BE16_TO_CPU

#define PED_BE16_TO_CPU | ( |  | x | ) |

Value:
PED_SWAP16(x)
PED_SWAP16
#define PED_SWAP16(x)
Definition endian.h:47

## PED_BE32_TO_CPU

#define PED_BE32_TO_CPU | ( |  | x | ) |

Value:
PED_SWAP32(x)
PED_SWAP32
#define PED_SWAP32(x)
Definition endian.h:48

## PED_BE64_TO_CPU

#define PED_BE64_TO_CPU | ( |  | x | ) |

Value:
PED_SWAP64(x)
PED_SWAP64
#define PED_SWAP64(x)
Definition endian.h:49

## PED_CPU_TO_BE16

#define PED_CPU_TO_BE16 | ( |  | x | ) |

Value:
PED_SWAP16(x)

## PED_CPU_TO_BE32

#define PED_CPU_TO_BE32 | ( |  | x | ) |

Value:
PED_SWAP32(x)

## PED_CPU_TO_BE64

#define PED_CPU_TO_BE64 | ( |  | x | ) |

Value:
PED_SWAP64(x)

## PED_CPU_TO_LE16

#define PED_CPU_TO_LE16 | ( |  | x | ) |

Value:
(x)

## PED_CPU_TO_LE32

#define PED_CPU_TO_LE32 | ( |  | x | ) |

Value:
(x)

## PED_CPU_TO_LE64

#define PED_CPU_TO_LE64 | ( |  | x | ) |

Value:
(x)

## PED_LE16_TO_CPU

#define PED_LE16_TO_CPU | ( |  | x | ) |

Value:
(x)

## PED_LE32_TO_CPU

#define PED_LE32_TO_CPU | ( |  | x | ) |

Value:
(x)

## PED_LE64_TO_CPU

#define PED_LE64_TO_CPU | ( |  | x | ) |

Value:
(x)

## PED_SWAP16

#define PED_SWAP16 | ( |  | x | ) |

Value:
((uint16_t) _PED_SWAP16( (uint16_t) (x) ))
_PED_SWAP16
#define _PED_SWAP16(x)
Definition endian.h:30

## PED_SWAP32

#define PED_SWAP32 | ( |  | x | ) |

Value:
((uint32_t) _PED_SWAP32( (uint32_t) (x) ))
_PED_SWAP32
#define _PED_SWAP32(x)
Definition endian.h:33

## PED_SWAP64

#define PED_SWAP64 | ( |  | x | ) |

Value:
((uint64_t) _PED_SWAP64( (uint64_t) (x) ))
_PED_SWAP64
#define _PED_SWAP64(x)
Definition endian.h:38