summaryrefslogtreecommitdiff
path: root/prototype/fw/src/microcobs.h
blob: 774a27be8f977561186ab0545f663395f060e2cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef __MICROCOBS_H__
#define __MICROCOBS_H__

#include <stdint.h>
#include <unistd.h>

struct sg_entry {
	uint8_t *target;
	ssize_t size;
};

ssize_t cobs_encode_sg(const struct sg_entry input[], uint8_t *output, size_t output_len);
ssize_t cobs_encode(const uint8_t *input, size_t input_len, uint8_t *output, size_t output_len);

#endif /* __MICROCOBS_H__ */