j

Dependencies:   mbed yeswecancoap C12832 LM75B

Committer:
arnedesmet
Date:
Fri Oct 23 11:51:28 2015 +0000
Revision:
0:92d2ef9f009d
hallo;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
arnedesmet 0:92d2ef9f009d 1
arnedesmet 0:92d2ef9f009d 2 #ifndef COLOR_H
arnedesmet 0:92d2ef9f009d 3 #define COLOR_H
arnedesmet 0:92d2ef9f009d 4
arnedesmet 0:92d2ef9f009d 5 class Color{
arnedesmet 0:92d2ef9f009d 6
arnedesmet 0:92d2ef9f009d 7
arnedesmet 0:92d2ef9f009d 8 int red, green, blue;
arnedesmet 0:92d2ef9f009d 9
arnedesmet 0:92d2ef9f009d 10 int floatToColorValue(float value);
arnedesmet 0:92d2ef9f009d 11
arnedesmet 0:92d2ef9f009d 12 static const int MAX_COLOR_VALUE = 255;
arnedesmet 0:92d2ef9f009d 13
arnedesmet 0:92d2ef9f009d 14 public:
arnedesmet 0:92d2ef9f009d 15
arnedesmet 0:92d2ef9f009d 16 enum colors {RED = 0xFF0000,
arnedesmet 0:92d2ef9f009d 17 GREEN = 0x00FF00,
arnedesmet 0:92d2ef9f009d 18 BLUE = 0x0000FF,
arnedesmet 0:92d2ef9f009d 19 CYAN = 0x00FFFF,
arnedesmet 0:92d2ef9f009d 20 MAGENTA = 0xFF00FF,
arnedesmet 0:92d2ef9f009d 21 YELLOW = 0xFFFF00,
arnedesmet 0:92d2ef9f009d 22 WHITE = 0xFFFFFF};
arnedesmet 0:92d2ef9f009d 23
arnedesmet 0:92d2ef9f009d 24 Color(int red, int green, int blue);
arnedesmet 0:92d2ef9f009d 25 Color(int color);
arnedesmet 0:92d2ef9f009d 26 Color(float red, float green, float blue);
arnedesmet 0:92d2ef9f009d 27
arnedesmet 0:92d2ef9f009d 28 int getHex();
arnedesmet 0:92d2ef9f009d 29
arnedesmet 0:92d2ef9f009d 30 int getRed();
arnedesmet 0:92d2ef9f009d 31 int getGreen();
arnedesmet 0:92d2ef9f009d 32 int getBlue();
arnedesmet 0:92d2ef9f009d 33
arnedesmet 0:92d2ef9f009d 34
arnedesmet 0:92d2ef9f009d 35 };
arnedesmet 0:92d2ef9f009d 36
arnedesmet 0:92d2ef9f009d 37 #endif