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

📄 fmdhal_asm.s

📁 for sdio or sd card source code under pxa270
💻 S
字号:
;
; Copyright (c) Microsoft Corporation.  All rights reserved.
;
;
; Use of this source code is subject to the terms of the Microsoft end-user
; license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
; If you did not accept the terms of the EULA, you are not authorized to use
; this source code. For a copy of the EULA, please see the LICENSE.RTF on your
; install media.
;
;
;----------------------------------------------------------------------------------------
; Copyright 2002-2004 Intel Corporation All Rights Reserved.
;
; Portions of the source code contained or described herein and all documents
; related to such source code (Material) are owned by Intel Corporation
; or its suppliers or licensors and is licensed by Microsoft Corporation for distribution.  
; Title to the Material remains with Intel Corporation or its suppliers and licensors. 
; Use of the Materials is subject to the terms of the Microsoft license agreement which accompanied the Materials.  
; No other license under any patent, copyright, trade secret or other intellectual
; property right is granted to or conferred upon you by disclosure or
; delivery of the Materials, either expressly, by implication, inducement,
; estoppel or otherwise 
; Some portion of the Materials may be copyrighted by Microsoft Corporation.
;
;*********************************************************************************

   AREA     |.text|, CODE
   ALIGN    4

   EXPORT FMDHAL_ASMInterruptEnable
   EXPORT FMDHAL_ASMInterruptDisable
   

;******************************************************************************
; "FMDHAL_ASMDisableInterrupts"
;
; Description:
;    Disable all interrupts on the Bulverde processor.  We will disable
;    interrupts by setting the FIQ and IRQ disable bits (5 & 6) to 1's in the
;    Current Program Status Register (CPSR). We will save and restore the bit
;    values later.
;
; Processing:
;    Temp      = CPSR
;    ReturnVal = Temp
;    Temp      = Temp | 0xC0
;    CPSR      = Temp
;    return (ReturnVal)
;
; Inputs:
;    None
;
; Return Value:
;    Contents of the CPSR before modified in R0
;
; Register Usage:
;    R12, R0, CPSR
;       R0 contains the return value from this function.  So we restore the
;       values of all the registers except R0 and return gracefully from this
;       function.
;******************************************************************************
FMDHAL_ASMInterruptDisable
FMDDISMASK EQU   0x000000C0        ; AND mask to extract interrupt settings
   STMFD   SP!,  {R12, LR}
   MRS     R12,  CPSR              ; read the current program status register (cpsr) into R12
   MOV     R0,   R12               ; copy R12 into the return value register
   ORR     R12,  R12, #FMDDISMASK  ; set the IRQ and FIQ mask bits to 1.
   LDMIA   SP!,  {R12, PC}         ; Return


;******************************************************************************
; "FMDHAL_ASMEnableInterrupts"
;
; Description:
;    Enable interrupts on the Bulverde processor.  We will re-enable interrupts
;    by restoring the old values that were found in the CPSR when we disabled
;    interrupts.
;
; Processing:
;    Mask = old_CPSR & 0xC0
;    Temp = CPSR
;    Temp = BitClear(Temp, 0xC0)
;    Temp = Temp | Mask
;    CPSR = Temp
;
; Inputs:
;    Old CPSR before interrupts disabled in R0
;
; Return Value:
;    None
;
; Register Usage:
;    R0, R12, CPSR
;******************************************************************************
FMDHAL_ASMInterruptEnable
FMDINTMASK EQU   0x000000C0       ; AND mask to extract interrupt settings
   STMFD   SP!,  {R0-R12, LR}
   AND     R0,   R0, #FMDINTMASK  ; isolate bits 5 and 6, old interrupt settings
   MRS     R12,  CPSR             ; read the current program status register into R12
   BIC     R12,  R12, #FMDINTMASK ; clear bits 5 and 6 in prep for the OR operation
   ORR     R12,  R12, R0          ; OR in the old values that were in bits 5 and 6
   LDMIA   SP!,  {R0-R12, PC}     ; Return



   END

⌨️ 快捷键说明

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