?? tmt.s
字號:
;************************************************************************
;*
;* Copyright Mentor Graphics Corporation 2002
;* All Rights Reserved.
;*
;* THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS
;* THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS
;* SUBJECT TO LICENSE TERMS.
;*
;************************************************************************
;************************************************************************
;*
;* FILE NAME VERSION
;*
;* tmt.s Nucleus PLUS\ARM925\Code Composer 1.14.1
;*
;* COMPONENT
;*
;* TM - Timer Management
;*
;* DESCRIPTION
;*
;* This file contains the target dependent routines of the timer
;* management component.
;*
;* FUNCTIONS
;*
;* TMT_Set_Clock Set system clock
;* TMT_Retrieve_Clock Retrieve system clock
;* TMT_Read_Timer Read count-down timer
;* TMT_Enable_Timer Enable count-down timer
;* TMT_Adjust_Timer Adjust count-down timer
;* TMT_Disable_Timer Disable count-down timer
;* TMT_Retrieve_TS_Task Retrieve time-sliced task ptr
;* TMT_Timer_Interrupt Process timer interrupt
;*
;* DEPENDENCIES
;*
;* tc_extr.h Thread Control functions
;* tm_extr.h Timer functions
;*
;* HISTORY
;*
;* NAME DATE REMARKS
;*
;* B. Ronquillo 08-28-2002 Released version 1.14.1
;*
;*
;************************************************************************
;#define NU_SOURCE_FILE
;******************************
;* INCLUDE ASSEMBLY CONSTANTS *
;******************************
; Define constants used in low-level initialization.
.include "D:\XWproject\Nucleus\source\Plus\Demo\asm_defs.inc"
.state32
;**********************************
;* EXTERNAL VARIABLE DECLARATIONS *
;**********************************
; Define external inner-component global data references.
;extern VOID *TCD_Current_Thread;
;extern UNSIGNED TMD_System_Clock;
;extern UNSIGNED TMD_Timer;
;extern INT TMD_Timer_State;
;extern UNSIGNED TMD_Time_Slice;
;extern TC_TCB *TMD_Time_Slice_Task;
;extern INT TMD_Time_Slice_State;
;extern TC_HCB TMD_HISR;
.ref _TCD_Current_Thread
.ref _TMD_System_Clock
.ref _TMD_Timer
.ref _TMD_Timer_State
.ref _TMD_Time_Slice
.ref _TMD_Time_Slice_Task
.ref _TMD_Time_Slice_State
.ref _TMD_HISR
.ref _TCD_Interrupt_Level
; Define activate HISR function.
;STATUS TCT_Activate_HISR(TC_HCB *hisr);
.ref _TCT_Activate_HISR
.text
;**********************************
;* LOCAL VARIABLE DECLARATIONS *
;**********************************
; Define various data structure pointers so their addresses
; can be obtained in a PC-relative manner.
System_Clock
.word _TMD_System_Clock
Timer
.word _TMD_Timer
Timer_State
.word _TMD_Timer_State
Slice_State
.word _TMD_Time_Slice_State
Time_Slice
.word _TMD_Time_Slice
Current_Thread
.word _TCD_Current_Thread
Slice_Task
.word _TMD_Time_Slice_Task
HISR
.word _TMD_HISR
Int_Level
.word _TCD_Interrupt_Level
;************************************************************************
;*
;* FUNCTION
;*
;* TMT_Set_Clock
;*
;* DESCRIPTION
;*
;* This function sets the system clock to the specified value.
;*
;* CALLED BY
;*
;* Application
;* CALLS
;*
;* None
;*
;* INPUTS
;*
;* new_value New value for the clock
;*
;* OUTPUTS
;*
;* None
;*
;* HISTORY
;*
;* NAME DATE REMARKS
;*
;* W. Lamie 02-15-1994 Created initial version 1.0
;* D. Lamie 02-15-1994 Verified version 1.0
;*
;************************************************************************
;VOID TMT_Set_Clock(UNSIGNED new_value)
;{
.def $TMT_Set_Clock
$TMT_Set_Clock ; Dual-state interworking veneer
.state16
BX r15
NOP
.state32
B _TMT_Set_Clock
.def _TMT_Set_Clock
_TMT_Set_Clock
; Set the system clock to the specified value.
; TMD_System_Clock = new_value;
LDR r1,System_Clock ; Build address of system clock
STR r0,[r1,#0] ; Store new system clock value
BX r14 ; Return to caller
;}
;************************************************************************
;*
;* FUNCTION
;*
;* TMT_Retrieve_Clock
;*
;* DESCRIPTION
;*
;* This function returns the current value of the system clock.
;*
;* CALLED BY
;*
;* Application
;*
;* CALLS
;*
;* None
;*
;* INPUTS
;*
;* None
;*
;* OUTPUTS
;*
;* TMD_System_Clock Value of system clock
;*
;* HISTORY
;*
;* NAME DATE REMARKS
;*
;* W. Lamie 02-15-1994 Created initial version 1.0
;* D. Lamie 02-15-1994 Verified version 1.0
;*
;************************************************************************
;UNSIGNED TMT_Retrieve_Clock(void)
;{
.def $TMT_Retrieve_Clock
$TMT_Retrieve_Clock ; Dual-state interworking veneer
.state16
BX r15
NOP
.state32
B _TMT_Retrieve_Clock
.def _TMT_Retrieve_Clock
_TMT_Retrieve_Clock
; Return the current value of the system clock.
; return(TMD_System_Clock);
LDR r0,System_Clock ; Build address to system clock
LDR r0,[r0,#0] ; Pickup system clock contents
BX r14 ; Return to caller
;}
;************************************************************************
;*
;* FUNCTION
;*
;* TMT_Read_Timer
;*
;* DESCRIPTION
;*
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -