1
0
Fork 0

Build actual tests, convert byte_stuffer_tests

This commit is contained in:
Fred Sundvik 2016-08-24 22:23:17 +03:00
parent 8a9aac6e32
commit 0a11460175
7 changed files with 181 additions and 181 deletions

View file

@ -31,9 +31,6 @@ SOFTWARE.
// https://en.wikipedia.org/wiki/Consistent_Overhead_Byte_Stuffing
// http://www.stuartcheshire.org/papers/COBSforToN.pdf
#define MAX_FRAME_SIZE 1024
#define NUM_LINKS 2
typedef struct byte_stuffer_state {
uint16_t next_zero;
uint16_t data_pos;

View file

@ -27,6 +27,9 @@ SOFTWARE.
#include <stdint.h>
#define MAX_FRAME_SIZE 1024
#define NUM_LINKS 2
void init_byte_stuffer(void);
void byte_stuffer_recv_byte(uint8_t link, uint8_t data);
void byte_stuffer_send_frame(uint8_t link, uint8_t* data, uint16_t size);