23 #include <pico/binary_info.h>
29 #define SYNC_FLAG 0xff
30 #define VERSION_FLAG 0xfe
32 #define ROS_HEADER_LENGTH 7
33 #define ROS_FOOTER_LENGTH 1
34 #define ROS_PKG_LENGTH (ROS_HEADER_LENGTH + ROS_FOOTER_LENGTH)
37 uint8_t checksum(uint8_t* addends,
int len);
40 int32_t bytes_to_int32(uint8_t bytes[4]);
43 uint8_t* int32_to_bytes(int32_t i32t);
46 int decode_rospkt(uint8_t* ROSPKT,
int rospkt_len, uint16_t* TOPIC, uint8_t* MSG,
int msg_len);
49 int encode_msg(uint8_t* MSG,
int msg_len, uint16_t TOPIC, uint8_t* ROSPKT,
int rospkt_len);