-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmsp430f149_it.c
63 lines (54 loc) · 944 Bytes
/
msp430f149_it.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
#include "msp430f149_it.h"
#include "driverlib.h"
uint16_t adcResult=0;
/**
*@brif:处理NMU中断
*@param:无
*@retval:无
*/
#pragma vector=NMI_VECTOR
__interrupt
void NMI_ISR(void)
{
}
#pragma vector=ADC12_VECTOR
__interrupt
void ADC12_ISR(void)
{
switch(_even_in_range(ADC12IV, 44))
{
case ADC12IV_ADC12IFG0:
adcResult=ADC12_getResults(0);
ADC12_clearInterrupt( ADC12_IE_0);
break;
}
}
/*
*@attention: 可使用的中断向量有
* \vct PORT2_VECTOR
* USART1TX_VECTOR
* USART1RX_VECTOR
* PORT1_VECTOR
* TIMERA1_VECTOR
* TIMERA0_VECTOR
* ADC12_VECTOR
* USART0TX_VECTOR
* USART0RX_VECTOR
* WDT_VECTOR
* COMPARATORA_VECTOR
* TIMERB1_VECTOR
* TIMERB0_VECTOR
*/
/**
*@brif:处理PPP中断
*@param:无
*@retval:无
*/
/*
*#pragma vector=PPP_VECTOR
*__interrupt
*void PPP_ISR(void)
*{
*
*}
*/