1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/* * endian_converters.c * * Created on: Sep 22, 2025 * Author: sowgro */ #include <stdint.h> uint16_t convert_to_uint16 (uint8_t* p_value) { return (p_value[0] << 8) + p_value[1]; } uint32_t convert_to_uint32 (uint8_t* p_value) { return (p_value[0] << 24) + (p_value[1] << 16) + (p_value[2] << 8) + p_value[3]; }