Commit 09852eab authored by Bernd Porr's avatar Bernd Porr Committed by Kyle McMartin

usbdux: usbduxsigma: added digital IO read

for future driver versions I've added a digtial I/O read via
endpoint in1. This is not yet used but might be used in the
future for low latency IO reads if all ports are input ports
and thus the write could be omitted.
Signed-off-by: default avatarBernd Porr <>
Signed-off-by: default avatarKyle McMartin <>
parent 22e3407b
......@@ -20,8 +20,8 @@
; Firmware: usbduxsigma_firmware.asm for usbduxsigma.c
; Description: University of Stirling USB DAQ & INCITE Technology Limited
; Devices: [ITL] USB-DUX-SIGMA (usbduxsigma.ko)
; Author: Bernd Porr <>
; Updated: 19 Jul 2015
; Author: Bernd Porr <>
; Updated: 20 Jul 2015
; Status: testing
......@@ -129,7 +129,6 @@ ep0ack_isr:
......@@ -169,6 +168,49 @@ ep4_isr:
push dps
push dpl
push dph
push dpl1
push dph1
push acc
push psw
mov dptr,#0E7C0h ; EP1in
mov a,IOB ; get DIO D
movx @dptr,a ; store it
inc dptr ; next byte
mov a,IOC ; get DIO C
movx @dptr,a ; store it
inc dptr ; next byte
mov a,IOD ; get DIO B
movx @dptr,a ; store it
inc dptr ; next byte
mov a,#0 ; just zero
movx @dptr,a ; pad it up
;; clear INT2
mov a,EXIF ; FIRST clear the USB (INT2) interrupt request
clr acc.4
mov EXIF,a ; Note: EXIF reg is not 8051 bit-addressable
mov a,#00000100b ; clear the ep1in
movx @DPTR,a
pop psw
pop acc
pop dph1
pop dpl1
pop dph
pop dpl
pop dps
;;; this is triggered when DRY goes low
push dps
......@@ -476,11 +518,11 @@ initeps:
;; enable interrupts
mov dptr,#EPIE ; interrupt enable
mov a,#10001000b ; enable irq for ep1out,8
mov a,#10001100b ; enable irq for ep1out,8,ep1in
movx @dptr,a ; do it
mov dptr,#EPIRQ ; clear IRQs
mov a,#10001000b
mov a,#10001100b
movx @dptr,a
mov DPTR,#USBIE ; USB int enables register
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment