4.104.114.84.95
Last change
on this file since 16a384cf was
16a384cf,
checked in by Joel Sherrill <joel.sherrill@…>, on 04/23/99 at 16:35:11
|
New BSP from Tony R. Ambardar <tonya@…> from the
University of British Columbia. The BSP is for:
Yes, this is the "entry model" of a series of boards from Technologic
Systems. Costs <$200 I believe. They have a WWW page at www.t-systems.com.
I am letting them know about the availability of this BSP too.
|
-
Property mode set to
100644
|
File size:
930 bytes
|
Line | |
---|
1 | /* |
---|
2 | These are just some useful macros that control the TS-1325's |
---|
3 | LEDs and push-button switch. Useful for debugging. |
---|
4 | |
---|
5 | NOTE: This *must* be 16-bit compatible code to work in start.s |
---|
6 | |
---|
7 | Tony Ambardar |
---|
8 | */ |
---|
9 | |
---|
10 | .macro LED_OFF |
---|
11 | movw $P1LTC, dx |
---|
12 | inb dx, al |
---|
13 | orb $0b01000000, al |
---|
14 | andb $0b11011111, al |
---|
15 | outb al, dx |
---|
16 | .endm |
---|
17 | |
---|
18 | .macro LED_GREEN |
---|
19 | movw $P1LTC, dx |
---|
20 | inb dx, al |
---|
21 | orb $0b01100000, al |
---|
22 | outb al, dx |
---|
23 | .endm |
---|
24 | |
---|
25 | .macro LED_YELLOW |
---|
26 | movw $P1LTC, dx |
---|
27 | inb dx, al |
---|
28 | orb $0b00100000, al |
---|
29 | andb $0b10111111, al |
---|
30 | outb al, dx |
---|
31 | .endm |
---|
32 | |
---|
33 | .macro LED_RED |
---|
34 | movw $P1LTC, dx |
---|
35 | inb dx, al |
---|
36 | andb $0b10011111, al |
---|
37 | outb al, dx |
---|
38 | .endm |
---|
39 | |
---|
40 | .macro WAIT_BUTTON # Wait till the button is pressed for a bit. |
---|
41 | movw $P1PIN, dx # ~25-30 cycles per loop, 25MHz -> 1 sec. |
---|
42 | movl $300000,ecx # "Timer" count determines how long. |
---|
43 | 0: inb dx, al |
---|
44 | andb $0b00000001,al |
---|
45 | jnz 0b # Button pressed? |
---|
46 | decl ecx |
---|
47 | jnz 0b # CX count expired? |
---|
48 | .endm |
---|
49 | |
---|
50 | |
---|
Note: See
TracBrowser
for help on using the repository browser.