2 * Copyright (C) 2008 Ubixum, Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25 volatile xdata at
0x8800 BYTE D2ON
;
26 volatile xdata at
0x8000 BYTE D2OFF
;
27 volatile xdata at
0x9800 BYTE D3ON
;
28 volatile xdata at
0x9000 BYTE D3OFF
;
29 volatile xdata at
0xA800 BYTE D4ON
;
30 volatile xdata at
0xA000 BYTE D4OFF
;
31 volatile xdata at
0xB800 BYTE D5ON
;
32 volatile xdata at
0xB000 BYTE D5OFF
;
33 extern xdata BYTE light_dummy
;
36 * easier to use macros defined below
38 //void activate_light ( volatile BYTE xdata *light ) ;
39 #define activate_light(LIGHT_ADDR) light_dummy=*(LIGHT_ADDR)
40 #define activate_light_delay(LIGHT_ADDR,millis) activate_light(LIGHT_ADDR); delay(millis)
41 //void activate_light_delay ( volatile BYTE xdata* light, WORD millis );
43 #define d2on() activate_light(&D2ON)
44 #define d2off() activate_light(&D2OFF)
45 #define d3on() activate_light(&D3ON)
46 #define d3off() activate_light(&D3OFF)
47 #define d4on() activate_light(&D4ON)
48 #define d4off() activate_light(&D4OFF)
49 #define d5on() activate_light(&D5ON)
50 #define d5off() activate_light(&D5OFF)