susp.a51

来自「cyusb 库文件源码 开发CYPRESS USB FIRMWARE 不可缺少的」· A51 代码 · 共 40 行

A51
40
字号
;;-----------------------------------------------------------------------------
;; File: susp.a51
;; Contents: 
;;
;; $Archive: /USB/Target/Lib/lp/susp.a51 $
;; $Date: 5/27/04 2:07p $
;; $Revision: 2 $
;;
;;
;;-----------------------------------------------------------------------------
;; Copyright 2003, Cypress Semiconductor Corporation
;;-----------------------------------------------------------------------------
NAME     SUSP
PUBLIC      EZUSB_SUSP

$include (lpregs.inc)

EZUSB    segment  code

      rseg  EZUSB    
EZUSB_SUSP: 
   mov   dptr,#WAKEUPCS    ; Clear the Wake Source bit(s) in
   movx  a,@dptr           ; the WAKEUPCS register
   orl   a,#0C0H           ; clear PA2 and WPIN
   movx  @dptr,a
   
   mov   dptr,#SUSPEND     ; 
   movx  @dptr,a           ; write any walue to SUSPEND register
   
   orl   PCON,#00000001b   ; Place the processor in idle
   
   nop                     ; Insert some meaningless instruction
   nop                     ; fetches to insure that the processor
   nop                     ; suspends and resumes before RET
   nop
   nop
er_end:     ret
   end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?