]> git.llucax.com Git - z.facultad/66.09/etherled.git/blobdiff - src/leds.h
Elimino macro que no se usa y es peligrosa.
[z.facultad/66.09/etherled.git] / src / leds.h
index 26c2cb36b0a397039f215eac2789d3b4df11a0cb..ea8c0837135f176e7bb955cff7046876be007e8e 100644 (file)
@@ -13,12 +13,21 @@ static byte xdata leds0 _at_ 0x0080;
 static byte xdata leds1 _at_ 0x00c0;
 #endif
 
-#define leds(word)              \
-           do                          \
-    {                           \
-                   leds0 = ~LOW(word);     \
-                   leds1 = ~HIGH(word);    \
-               }                           \
+#define leds(word)          \
+    do                      \
+    {                       \
+        uint16 w = word;    \
+        leds0 = ~LOW(w);    \
+        leds1 = ~HIGH(w);   \
+    }                       \
+    while (0)
+
+#define ledsb(bh, bl)   \
+    do                  \
+    {                   \
+        leds0 = ~(bl);  \
+        leds1 = ~(bh);  \
+    }                   \
     while (0)
 
 #endif // _LEDS_H_