📄 tmt.s
字号:
;/*************************************************************************/
;/* */
;/* Copyright (c) 1993-1999 Accelerated Technology, Inc. */
;/* */
;/* PROPRIETARY RIGHTS of Accelerated Technology are involved in the */
;/* subject matter of this material. All manufacturing, reproduction, */
;/* use, and sales rights pertaining to this subject matter are governed */
;/* by the license agreement. The recipient of this software implicitly */
;/* accepts the terms of the license. */
;/* */
;/*************************************************************************/
;
;/*************************************************************************/
;/* */
;/* FILE NAME VERSION */
;/* */
;/* tmt.s PLUS\68328/1.11.3 */
;/* */
;/* COMPONENT */
;/* */
;/* TM - Timer Management */
;/* */
;/* DESCRIPTION */
;/* */
;/* This file contains the target dependent routines of the timer */
;/* management component. */
;/* */
;/* AUTHOR */
;/* */
;/* G. Fender, Accelerated Technology, Inc. */
;/* */
;/* DATA STRUCTURES */
;/* */
;/* None */
;/* */
;/* 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 */
;/* */
;/* Gary Fender 12/16/98 Created release 1.0 */
;/* K. Pontzloff 03/12/99 Changes section names */
;/* resulting in 1.2 */
;/* D. Sharer 11/29/99 Updated to V1.11.3 */
;/* */
;/*************************************************************************/
NAME "tmt.s"
;#define NU_SOURCE_FILE
;
;
;#include "tc_extr.h" /* Thread control functions */
;#include "tm_extr.h" /* Timer functions */
;
;
;/* Define external inner-component global data references. */
;
;extern VOID *TCD_Current_Thread;
;extern INT TCD_Interrupt_Level;
;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;
;extern TC_TCB TMD_Task;
;
.xref _TMD_System_Clock
.xref _TMD_Timer
.xref _TMD_Timer_State
.xref _TMD_Time_Slice_State
.xref _TMD_Time_Slice
.xref _TMD_Time_Slice_Task
.xref _TCD_Current_Thread
.xref _TCD_Interrupt_Level
.xref _TMD_HISR
;
;
;/* Define external function references. */
;
;VOID TCT_Interrupt_Context_Save(INT vector);
;STATUS TCT_Activate_HISR(TC_HCB *hisr);
;VOID TCT_Interrupt_Context_Restore(VOID);
;VOID TCT_Check_For_Preemption(VOID);
;
.xref _TCT_Interrupt_Context_Save
.xref _TCT_Activate_HISR
.xref _TCT_Interrupt_Context_Restore
.xref _TCT_Check_For_Preemption
;
;
;/* Define internal interrupt lockout constant. This value must lockout
; the Nucleus PLUS timer interrupt. */
;
LOCKOUT .equ $0700
;
;
;
.section .text,,c
;/*************************************************************************/
;/* */
;/* FUNCTION */
;/* */
;/* TMT_Set_Clock */
;/* */
;/* DESCRIPTION */
;/* */
;/* This function sets the system clock to the specified value. */
;/* */
;/* AUTHOR */
;/* */
;/* Rex Smith, Accelerated Technology, Inc. */
;/* */
;/* CALLED BY */
;/* */
;/* Application */
;/* */
;/* CALLS */
;/* */
;/* None */
;/* */
;/* INPUTS */
;/* */
;/* new_value New value for the clock */
;/* */
;/* OUTPUTS */
;/* */
;/* None */
;/* */
;/* HISTORY */
;/* */
;/* NAME DATE REMARKS */
;/* */
;/* R. Smith 06-09-1997 Created initial version 1.0 */
;/* R. Smith 06-09-1997 Verified version 1.0 */
;/* */
;/*************************************************************************/
.xdef _TMT_Set_Clock
_TMT_Set_Clock:
;VOID TMT_Set_Clock(UNSIGNED new_value)
;{
;
; /* Set the system clock to the specified value. */
; TMD_System_Clock = new_value;
MOVE.L 4(A7),_TMD_System_Clock ; Set the system clock
RTS ; Return to caller
;}
;
;
;
;/*************************************************************************/
;/* */
;/* FUNCTION */
;/* */
;/* TMT_Retrieve_Clock */
;/* */
;/* DESCRIPTION */
;/* */
;/* This function returns the current value of the system clock. */
;/* */
;/* AUTHOR */
;/* */
;/* Rex Smith, Accelerated Technology, Inc. */
;/* */
;/* CALLED BY */
;/* */
;/* Application */
;/* */
;/* CALLS */
;/* */
;/* None */
;/* */
;/* INPUTS */
;/* */
;/* None */
;/* */
;/* OUTPUTS */
;/* */
;/* TMD_System_Clock Value of system clock */
;/* */
;/* HISTORY */
;/* */
;/* NAME DATE REMARKS */
;/* */
;/* R. Smith 06-09-1997 Created initial version 1.0 */
;/* R. Smith 06-09-1997 Verified version 1.0 */
;/* */
;/*************************************************************************/
.xdef _TMT_Retrieve_Clock
_TMT_Retrieve_Clock:
;UNSIGNED TMT_Retrieve_Clock(void)
;{
;
; /* Return the current value of the system clock. */
; return(TMD_System_Clock);
MOVE.L _TMD_System_Clock,D0 ; Pickup the system clock
RTS ; Return to caller
;}
;
;
;
;/*************************************************************************/
;/* */
;/* FUNCTION */
;/* */
;/* TMT_Read_Timer */
;/* */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -