Subversion Repositories group.electronics

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
50 pfowler 1
#include <avr/io.h>
2
 
3
#include "petelib.h"
4
#include <util/delay.h>
5
 
6
#include <stdlib.h>
7
 
8
inline uint8_t map_8(uint8_t x, uint8_t in_min, uint8_t in_max, uint8_t out_min, uint8_t out_max) {
9
	return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
10
}