CAN codegen utilities.
More...
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
Go to the source code of this file.
CAN codegen utilities.
- Author
- Jamie Pruett :)
- Version
- 0.1
- Date
- 2025-05-02
◆ __always_inline
#define __always_inline __inline__ __attribute__((__always_inline__)) |
◆ swap_byte_order_16()
Swaps the byte order of a uint16_t.
- Parameters
-
- Returns
- uint16_t x with the byte order swapped
◆ swap_byte_order_32()
Swaps the byte order of a uint32_t.
- Parameters
-
- Returns
- uint32_t x with the byte order swapped
◆ swap_byte_order_64()
Swaps the byte order of a uint64_t.
- Parameters
-
- Returns
- uint64_t x with the byte order swapped
◆ swap_byte_order_8()
Swaps the byte order of a uint8_t.
- Parameters
-
- Returns
- uint8_t x with the byte order swapped
◆ swap_byte_order_dtou()
Swaps the byte order of a double and returns its big-endian representation as a uint64_t.
- Parameters
-
- Returns
- uint64_t IEEE 64-bit double with swapped byte order (to big endian)
◆ swap_byte_order_ftou()
Swaps the byte order of a float and returns its big-endian representation as a uint32_t.
- Parameters
-
- Returns
- uint32_t IEEE 32-bit float with swapped byte order (to big endian)
◆ swap_byte_order_utod()
Swaps the byte order of a big-endian double represented as a uint64_t.
- Parameters
-
- Returns
- double IEEE 64-bit double with swapped byte order (to little-endian)
◆ swap_byte_order_utof()
Swaps the byte order of a big-endian float represented as a uint32_t.
- Parameters
-
- Returns
- float IEEE 32-bit float with swapped byte order (to little-endian)