?? timer_drv.lst
字號:
C51 COMPILER V7.00 TIMER_DRV 04/28/2004 09:31:55 PAGE 1
C51 COMPILER V7.00, COMPILATION OF MODULE TIMER_DRV
OBJECT MODULE PLACED IN C:\Documents and Settings\lvxc\桌面\AA\timer_drv.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE lib_mcu\timer\timer_drv.c OPTIMIZE(7,SPEED) BROWSE INCDIR(.\modules\system;
-.\;.\;.\lib_refd) DEFINE(KEIL) DEBUG OBJECTEXTEND PRINT(.\timer_drv.lst) OBJECT(C:\Documents and Settings\lvxc\桌面\AA\t
-imer_drv.obj)
stmt level source
1 /*C**************************************************************************
2 * NAME: timer_drv.c
3 *----------------------------------------------------------------------------
4 * Copyright (c) 2003 Atmel.
5 *----------------------------------------------------------------------------
6 * RELEASE: snd1c-refd-nf-4_0_3
7 * REVISION: 1.2
8 *----------------------------------------------------------------------------
9 * PURPOSE:
10 * This file contains the timer 0 & timer 1 driver routines.
11 *
12 * NOTES:
13 * Driver Configuration:
14 * - T0_X2 & T1_X2 in config.h define as:
15 * TRUE: to set timer clock independant of X2/X1 mode
16 * FALSE: to set timer clock dependant of X1/X2 mode
17 * Global Variables:
18 * - None
19 * FT0_IN and FT1_IN must be used instead of FOSC-FPER for period calculation
20 *****************************************************************************/
21
22 /*_____ I N C L U D E S ____________________________________________________*/
23
24 #include "config.h" /* lib configuration header */
25 #include "timer_drv.h" /* timer driver definition */
26
27
28 /*_____ M A C R O S ________________________________________________________*/
29
30
31 /*_____ D E F I N I T I O N ________________________________________________*/
32
33
34 /*_____ D E C L A R A T I O N ______________________________________________*/
35
36
37
38 /*F***************************************************************************
39 * NAME: t0_set_prio
40 *-----------------------------------------------------------------------------
41 * PARAMS:
42 *
43 * return:
44 *----------------------------------------------------------------------------
45 * PURPOSE:
46 * Set the Timer 0 priority interrupt
47 *----------------------------------------------------------------------------
48 * EXAMPLE:
49 *----------------------------------------------------------------------------
50 * NOTE:
51 *----------------------------------------------------------------------------
52 * REQUIREMENTS:
53 ******************************************************************************/
C51 COMPILER V7.00 TIMER_DRV 04/28/2004 09:31:55 PAGE 2
54 void t0_set_prio (Byte priority)
55 {
56 1 if ((priority == 1) || (priority == 3)) /* set LSB priority bit */
57 1 {
58 2 IPL0 |= MSK_ET0;
59 2 }
60 1 if ((priority == 2) || (priority == 3)) /* set MSB priority bit */
61 1 {
62 2 IPH0 |= MSK_ET0;
63 2 }
64 1 }
65
66
67 /*F***************************************************************************
68 * NAME: t1_set_prio
69 *-----------------------------------------------------------------------------
70 * PARAMS:
71 *
72 * return:
73 *----------------------------------------------------------------------------
74 * PURPOSE:
75 * Set the Timer 1 priority interrupt
76 *----------------------------------------------------------------------------
77 * EXAMPLE:
78 *----------------------------------------------------------------------------
79 * NOTE:
80 *----------------------------------------------------------------------------
81 * REQUIREMENTS:
82 ******************************************************************************/
83 void t1_set_prio (Byte priority)
84 {
85 1 if ((priority == 1) || (priority == 3)) /* set LSB priority bit */
86 1 {
87 2 IPL0 |= MSK_ET1;
88 2 }
89 1 if ((priority == 2) || (priority == 3)) /* set MSB priority bit */
90 1 {
91 2 IPH0 |= MSK_ET1;
92 2 }
93 1 }
94
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 + -