summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/ts_386ex/tools/dos_sup/ts1325.inc
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-04-23 16:35:11 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-04-23 16:35:11 +0000
commit16a384cfb161f6a3dbcd69fc3b788b6dbc229669 (patch)
treedbbb2e908c64a7f8de5d4c99c16559158b99f1cf /c/src/lib/libbsp/i386/ts_386ex/tools/dos_sup/ts1325.inc
parentAdded lstat(). (diff)
downloadrtems-16a384cfb161f6a3dbcd69fc3b788b6dbc229669.tar.bz2
New BSP from Tony R. Ambardar <tonya@ece.ubc.ca> 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.
Diffstat (limited to 'c/src/lib/libbsp/i386/ts_386ex/tools/dos_sup/ts1325.inc')
-rw-r--r--c/src/lib/libbsp/i386/ts_386ex/tools/dos_sup/ts1325.inc48
1 files changed, 48 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/i386/ts_386ex/tools/dos_sup/ts1325.inc b/c/src/lib/libbsp/i386/ts_386ex/tools/dos_sup/ts1325.inc
new file mode 100644
index 0000000000..40ed3659ab
--- /dev/null
+++ b/c/src/lib/libbsp/i386/ts_386ex/tools/dos_sup/ts1325.inc
@@ -0,0 +1,48 @@
+; Some nasm macros to turn on TS-1325 LEDs and wait for button presses.
+; This should be '%include'ed in your nasm source file.
+;
+; Tony Ambardar
+
+P1LTC equ 0F862h
+P1PIN equ 0F860h
+
+%macro LED_OFF 0
+ mov dx, P1LTC
+ in al, dx
+ or al, 01000000b ; turn off red
+ and al, 11011111b ; turn off green
+ out dx, al
+%endmacro
+
+%macro LED_GRN 0
+ mov dx, P1LTC
+ in al, dx
+ or al, 01100000b ; turn off red, turn on green
+ out dx, al
+%endmacro
+
+%macro LED_YEL 0
+ mov dx, P1LTC
+ in al, dx
+ or al, 00100000b ; turn on green
+ and al, 10111111b ; turn on red
+ out dx, al
+%endmacro
+
+%macro LED_RED 0
+ mov dx, P1LTC
+ in al, dx
+ and al, 10011111b ; turn on red, turn off green
+ out dx, al
+%endmacro
+
+%macro PSW_WAIT 0
+ mov dx, P1PIN ; Get PSW state
+ mov ecx, 80000h
+%%read in al, dx
+ test al, 00000001b ; is PSW asserted?
+ jnz %%read ; if not, we're done
+ dec ecx
+ jnz %%read
+%endmacro
+