A SERVICE OF

logo

Cypress CY3640 USB Starter Kit
User’s Guide
Cypress Semiconductor Ver 0.993
Page 34
mov a,42h
mov [USBEndP0FIFO_0],a
; Auto ACK OUT packet
mov a,USBControlAckStatusData
iowr USBControl
; Send bytes as Data1
mov a,8
or a,USBEndP0TxSequence
or a,USBEndP0TxRespond
iowr USBEndP0TxConfig
;call USBSendWaitForComplete
; Restore it
pop x
; Return
jmp USBEventEP0End
;*****************************
;//$PAGE
include "ds1620a.asm"
;*****************************
;********************************************************
; SysDelayMS()
; @func Delay some number of milliseconds.
; @parm register | A | Number of milliseconds (0=65536).
; @comm Protects A and X registers.
;********************************************************
SysDelayMS:
; Save em'
push a
push x
SysDelayMSLoop:
; Save count
push a
; Delay 1ms = 10 * 100us
mov a,10
SysDelayMSLoopDelay:
; Save it
push a
; Delay 100us
mov a,100
call SysDelay
; Done?
pop a
dec a
jnz SysDelayMSLoopDelay
; Done?
pop a
dec a
jnz SysDelayMSLoop
; Restore em'
pop x
pop a
ret
;********************************************************
; SysDelay()
; @func Delay some number of microseconds.