1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-30 11:24:12 +01:00

Moving makeWord() function defintion into WMath.cpp (out of WProgram.h).

This commit is contained in:
David A. Mellis 2008-10-26 12:31:45 +00:00
parent 5800ace0b5
commit 97fd64e3f0
2 changed files with 5 additions and 2 deletions

View File

@ -55,3 +55,6 @@ long map(long x, long in_min, long in_max, long out_min, long out_max)
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
unsigned int makeWord(unsigned int w) { return w; }
unsigned int makeWord(unsigned char h, unsigned char l) { return (h << 8) | l; }

View File

@ -12,8 +12,8 @@
#ifdef __cplusplus
#include "HardwareSerial.h"
uint16_t makeWord(uint16_t w) { return w; }
uint16_t makeWord(byte h, byte l) { return (h << 8) | l; }
uint16_t makeWord(uint16_t w);
uint16_t makeWord(byte h, byte l);
#define word(...) makeWord(__VA_ARGS__)