X-Git-Url: https://git.llucax.com/z.facultad/66.09/etherled.git/blobdiff_plain/05000dec2685a88aaf9bd3c20c8861e62c94696c..773b061d16e9be2c9ee5f5a9d417108a9e972842:/src/leds.h diff --git a/src/leds.h b/src/leds.h index 26c2cb3..ea8c083 100644 --- a/src/leds.h +++ b/src/leds.h @@ -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_