forked from espressif/arduino-esp32
Cleanup arduino useless bullshit
This commit is contained in:
@ -27,20 +27,20 @@ extern "C" {
|
||||
#include "esp_system.h"
|
||||
}
|
||||
|
||||
long map(long x, long in_min, long in_max, long out_min, long out_max) {
|
||||
const long dividend = out_max - out_min;
|
||||
const long divisor = in_max - in_min;
|
||||
const long delta = x - in_min;
|
||||
//long map(long x, long in_min, long in_max, long out_min, long out_max) {
|
||||
// const long dividend = out_max - out_min;
|
||||
// const long divisor = in_max - in_min;
|
||||
// const long delta = x - in_min;
|
||||
|
||||
return (delta * dividend + (divisor / 2)) / divisor + out_min;
|
||||
}
|
||||
// return (delta * dividend + (divisor / 2)) / divisor + out_min;
|
||||
//}
|
||||
|
||||
unsigned int makeWord(unsigned int w)
|
||||
{
|
||||
return w;
|
||||
}
|
||||
//unsigned int makeWord(unsigned int w)
|
||||
//{
|
||||
// return w;
|
||||
//}
|
||||
|
||||
unsigned int makeWord(unsigned char h, unsigned char l)
|
||||
{
|
||||
return (h << 8) | l;
|
||||
}
|
||||
//unsigned int makeWord(unsigned char h, unsigned char l)
|
||||
//{
|
||||
// return (h << 8) | l;
|
||||
//}
|
||||
|
Reference in New Issue
Block a user