aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/curve.h
blob: 40efb169ec93da91f5d613f76c27e0b7291e7d3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#ifndef CURVE_H_
#define CURVE_H_

struct curve_point {
	uint16_t x;
	uint16_t y;
};

#define CURVE_POINT(_x, _y)	{ .x = (uint16_t)(_x), \
				  .y = (uint16_t)(_y), }

uint16_t curve_interpolate(const struct curve_point __flash *curve,
			   uint8_t curve_size,
			   uint16_t x);

#endif /* CURVE_H_ */
bues.ch cgit interface