Blame | Last modification | View Log | RSS feed
#include <avr/io.h>
#include "petelib.h"
#include <util/delay.h>
#include <stdlib.h>
inline uint8_t map_8(uint8_t x, uint8_t in_min, uint8_t in_max, uint8_t out_min, uint8_t out_max) {
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}