📄 timer_drv.lst
字号:
C51 COMPILER V6.20c TIMER_DRV 07/10/2002 15:17:37 PAGE 1
C51 COMPILER V6.20c, COMPILATION OF MODULE TIMER_DRV
OBJECT MODULE PLACED IN ..\obj\timer_drv.obj
COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE ..\..\..\lib\timer\timer_drv.c BROWSE INCDIR(..\src\system;..\..\..\lib) DE
-FINE(KEIL) DEBUG OBJECTEXTEND PRINT(.\timer_drv.lst) OBJECT(..\obj\timer_drv.obj)
stmt level source
1 /*C**************************************************************************
2 * $RCSfile: timer_drv.c,v $
3 *----------------------------------------------------------------------------
4 * Copyright (c) 2002 Atmel.
5 *----------------------------------------------------------------------------
6 * RELEASE: $Name: DEMO_FAT_1_2_5 $
7 * REVISION: $Revision: 1.2 $
8 * FILE_CVSID: $Id: timer_drv.c,v 1.2 2002/05/24 09:51:14 njourdan Exp $
9 *----------------------------------------------------------------------------
10 * PURPOSE:
11 * This file contains the timer 0 & timer 1 driver routines.
12 *
13 * NOTES:
14 * Driver Configuration:
15 * - T0_X2 & T1_X2 in config.h define as:
16 * TRUE: to set timer clock independant of X2/X1 mode
17 * FALSE: to set timer clock dependant of X1/X2 mode
18 * Global Variables:
19 * - None
20 * FT0_IN and FT1_IN must be used instead of FOSC-FPER for period calculation
21 *****************************************************************************/
22
23 /*_____ I N C L U D E S ____________________________________________________*/
24
25 #include "config.h" /* lib configuration header */
26 #include "timer_drv.h" /* timer driver definition */
27
28
29 /*_____ M A C R O S ________________________________________________________*/
30
31
32 /*_____ D E F I N I T I O N ________________________________________________*/
33
34
35 /*_____ D E C L A R A T I O N ______________________________________________*/
36
37
38
39 /*F***************************************************************************
40 * NAME: t0_set_prio
41 *-----------------------------------------------------------------------------
42 * PARAMS:
43 *
44 * return:
45 *----------------------------------------------------------------------------
46 * PURPOSE:
47 * Set the Timer 0 priority interrupt
48 *----------------------------------------------------------------------------
49 * EXAMPLE:
50 *----------------------------------------------------------------------------
51 * NOTE:
52 *----------------------------------------------------------------------------
53 * REQUIREMENTS:
54 ******************************************************************************/
C51 COMPILER V6.20c TIMER_DRV 07/10/2002 15:17:37 PAGE 2
55 void t0_set_prio (Byte priority)
56 {
57 1 if ((priority == 1) || (priority == 3)) /* set LSB priority bit */
58 1 {
59 2 IPL0 |= MSK_ET0;
60 2 }
61 1 if ((priority == 2) || (priority == 3)) /* set MSB priority bit */
62 1 {
63 2 IPH0 |= MSK_ET0;
64 2 }
65 1 }
66
67
68 /*F***************************************************************************
69 * NAME: t1_set_prio
70 *-----------------------------------------------------------------------------
71 * PARAMS:
72 *
73 * return:
74 *----------------------------------------------------------------------------
75 * PURPOSE:
76 * Set the Timer 1 priority interrupt
77 *----------------------------------------------------------------------------
78 * EXAMPLE:
79 *----------------------------------------------------------------------------
80 * NOTE:
81 *----------------------------------------------------------------------------
82 * REQUIREMENTS:
83 ******************************************************************************/
84 void t1_set_prio (Byte priority)
85 {
86 1 if ((priority == 1) || (priority == 3)) /* set LSB priority bit */
87 1 {
88 2 IPL0 |= MSK_ET1;
89 2 }
90 1 if ((priority == 2) || (priority == 3)) /* set MSB priority bit */
91 1 {
92 2 IPH0 |= MSK_ET1;
93 2 }
94 1 }
95
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 46 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -