/*
 * can_encode.h
 *
 *  Created on: Sep 16, 2025
 *      Author: herli
 */

#ifndef INC_CAN_ENCODE_H_
#define INC_CAN_ENCODE_H_

#include "can_schema.h"

/* Exposed for unit tests; most users call can_encode_message / can_decode_message */
uint64_t _can_get_bits_intel(const uint8_t data[8], uint8_t start_bit, uint8_t bit_len);
void     _can_set_bits_intel(uint8_t data[8], uint8_t start_bit, uint8_t bit_len, uint64_t raw);

uint64_t _can_get_bits_motorola(const uint8_t data[8], uint8_t start_bit, uint8_t bit_len);
void     _can_set_bits_motorola(uint8_t data[8], uint8_t start_bit, uint8_t bit_len, uint64_t raw);

#endif /* INC_CAN_ENCODE_H_ */
