This repository has been archived by the owner on Jan 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
timer_a.c
106 lines (77 loc) · 2.36 KB
/
timer_a.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// $Id: timer_a.c,v 1.20 2004-05-12 14:47:14 peter Exp $
#include <msp430x14x.h>
#include <stdlib.h>
//â¨¯ë ¯¥à¥¬¥ëå
#include "type_def.h"
#ifdef STEND
#include "uart_s.h"
#endif // STEND
// ¬®¤ã«ì ¤«ï à ¡®âë á ¯ ª¥â ¬¨
#include "uart_p.h"
#include "global.h"
extern u16 temp_hold;
extern u16 timer_sum_sleep;
extern u16 timer_sum_int;
extern u16 timer_hold;
extern u16 timer_sum;
extern u16 sleep;
extern u16 timer_sum_display;
extern u16 timer_sum_serial;
extern u16 timer_sum_adc;
extern u16 timer_sum_stat;
extern u16 timer_diff_min;
extern u16 timer_diff_max;
extern u16 why_job;
#ifdef DEBUG_SERIAL
extern u16 packet_in_fifo;
extern u16 packet_in_fifo_max;
extern u16 fifo_trn_depth;
extern u16 packet_fifo_full;
extern u16 fifo_trn_depth_max;
extern u16 error_uart_depth;
extern u16 error_send_serial;
extern u16 length_sended_2_fifo_max;
extern u16 length_sended_2_fifo_min;
#endif //DEBUG_SERIAL
extern u16 chanel;
extern u16 chanel_convert;
u16 dac[NUM_CHANEL];
extern volatile unsigned int asp_trn_fifo_start; /* serial transmit buffer start index */
extern unsigned int asp_trn_fifo_end; /* serial transmit flash buffer end index */
unsigned int stat_rcv_fifo_start; /* stat receive buffer start index */
volatile unsigned int stat_rcv_fifo_end; /* stat receive buffer end index */
u16 stat_buf[STAT_FIFO_RCV_LEN*SIZE_STAT];
unsigned int stat1_rcv_fifo_start; /* stat receive buffer start index */
volatile unsigned int stat1_rcv_fifo_end; /* stat receive buffer end index */
u16 stat1_buf[STAT1_FIFO_RCV_LEN*SIZE_STAT1];
//ADC
extern int end_adc_conversion;
extern int error_adc;
extern unsigned int results0[ADC_FIFO_RCV_LEN*SIZE_OF_ADC_DUMP];
//extern unsigned int results8[ADC_FIFO_RCV_LEN];
int gradus_to_show;
int volt_to_show;
int capture_timer;
int change_to_mode;
// 0 - ACLK 1 - SMCLK
int mode_timer;
int counter_timer;
//int refresh_timer;
int sub_counter_timer;
//íâ® ¢à¥¬ï ¯® £à¨¢¨çã
time_in GlobalTime;
int second_point;
int invert;
//¥á«¨ ¥ 0, â® § ¯ã᪠¥¬ï ¯®«®© ᪮à®áâ¨
int run_full_speed;
//¯¥à¥ª«îç ¥¬áï ᪮à®á⮩ ०¨¬ â ©¬¥à
int switch_speed_timer;
// ¤¨á¯«¥©
int mode_display;
int update_display;
//íâ® ¢à¥¬ï ¢ ä®à¬ ⥠long ¤«ï ¯®ª § ¨¤¨ª â®à
time_in time_to_show;
int symbl[4];
unsigned int displ[2];
extern int mode_work;
extern long time_to_change;