⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lh7a400_lcd_evb_touchscreen.s

📁 sharp的arm920t 7A400的评估板附带光盘Sharp KEVLH7A400 v0.3b Welcome to the SHARP KEV7A400 Evaluation board
💻 S
字号:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; $Workfile:   LH7A400_lcd_evb_touchscreen.s  $
; $Revision:   1.2  $
; $Author:   KovitzP  $
; $Date:   Jan 02 2002 15:12:42  $
; 
; Project:  LH7A400
;
; Description: Touchscreen pen down FIQ handler
;		
; Reference: Internal Documentation
;
; Revision history:
;	$Log:   P:/PVCS6_6/archives/LH7A400 (Aruba)/SSP/LH7A400_lcd_evb_touchscreen.s-arc  $
; 
;    Rev 1.2   Jan 02 2002 15:12:42   KovitzP
; Removed PROC and ENDP because the FIQ  handler
; does not follow ARM calling conventions.
; 
;    Rev 1.1   Nov 20 2001 11:28:50   KovitzP
; Corrected a bug that could have caused FIQ stack overflow
; if the pen bounced on the touchscreen too much.  Added
; function block comments.
; 
;    Rev 1.0   Nov 19 2001 10:26:08   KovitzP
; Initial revision.
; 
;  
;   COPYRIGHT (C) 2001  SHARP MICROELECTRONICS OF THE AMERICAS INC.
;                          CAMAS, WA
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
   AREA TOUCHSCREENFIQ, CODE    ;name this block of code
   
   INCLUDE LH7A400_intc.i
   INCLUDE LH7A400_gpio.i
    
   IMPORT measurexy

   EXPORT lcd_touchscreen_pen_down_handler
;--------------------------------------------------------------------
;
; Function: lcd_touchscreen_pen_down_handler
;
; Purpose:
;   Handle the Pen Down event for the touchscreen driver.
; 
; Processing:
;   Make sure the pen is really down. If it isn't return.
;   If the pen is still down, stack the registers that C
;   can destroy (r0-r7,r14), call measurexy() to start a
;   coordinate measurement and then restore r0-r7 and return. 
;
; Parameters: None
;
; Outputs:  None
;
; Returns: Nothing
;
; Notes:
;  This function destroys r8-r11. It is not reentrant and it should
;  only be called as an FIQ handler with all interrupts disabled.
;  This function is an FIQ handler and must be installed using
;  int_install_fiq_handler().
;
;
;---------------------------------------------------------------------
lcd_touchscreen_pen_down_handler
   LDR      r10,=GPIO_INTSTATUS
   LDR      r11,=INTC_INTENC
   LDR      r9,=measurexy
   LDR      r8,[r10] ; read the pen status
   TST      r8,#1    ; if the pen is not really down
   MOVEQ    pc,r14   ;    return;
   STMFD    sp!,{r0-r7,r14}   ; free the registers for C calls
   MOV      r14,pc   ; measurexy();
   MOV      pc,r9
   MOV      r8,#1    ; disable the pen down interrupt
   STR      r8,[r11]
   LDMFD    sp!,{r0-r7,pc} ; restore and return
   END
    
    

⌨️ 快捷键说明

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