21 lines
413 B
C
21 lines
413 B
C
//
|
|
// Created by nano on 4/26/25.
|
|
//
|
|
#include <sys/types.h>
|
|
|
|
|
|
#ifndef COMM_UTILS_H
|
|
#define COMM_UTILS_H
|
|
typedef u_int8_t byte;
|
|
|
|
void byte_to_bit_array(byte *bit_array, byte data);
|
|
|
|
void bit_array_to_byte(const byte bit_array[], byte *data);
|
|
|
|
void comm_write_until_successful(byte d, int timeout);
|
|
|
|
int comm_await_crossing(int timeout);
|
|
|
|
int comm_get_distance_sensor(int *len, int timeout) ;
|
|
#endif //COMM_UTILS_H
|