forked from Engenuics/MSP430_BLINKY
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.h
More file actions
78 lines (62 loc) · 2.79 KB
/
main.h
File metadata and controls
78 lines (62 loc) · 2.79 KB
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
/**********************************************************************
* Header file for ANT Library
* Author: Jason Long
**********************************************************************/
/************************ Revision History ****************************
YYYY-MM-DD Comments
-------------------------------------------------------------------------------------------
2010-01-08 Add new defines for FCC_TX and RX Test
2009-11-11 File created for GEN II Key Fob
************************************************************************/
#ifndef __MAIN
#define __MAIN
/* Test modes available (intended to use only one at a time). Released code should have all of these commented out */
//#define LED_TEST 1 /* Simple LED blink test */
//#define CW_TEST 1 /* CW mode with frequency scroll through low, mid, high channels on button press */
//#define STARTUP_TEST 1 /* Intended with battery disconnect board to repeatedly run start ups and count ANT comm failures */
//#define ANT_COMMS_TEST 1 /* Repeated test of ANT communications */
//#define BAT_LIFE_TEST 1 /* Checks battery every cycle */
//#define PLAIN_TEXT_MESSAGES 1 /* Takes off encryption of messages */
//#define FCC_TX_TEST 1 /* FCC test mode with constant messages at about 1ms; 1Hz blink */
//#define FCC_RX_TEST 1 /* FCC test mode with receive channel open forever. 4Hz blink. Builds with 1 warning for unreachable statement */
/************************ Function Declarations ****************************/
#pragma vector = PORT1_VECTOR
__interrupt void Port1ISR(void);
/*
Handles waking up from low power mode via a button press.
This triggers a reset of the sleep interval to SHORT_SLEEP_TIME and sets the sleep
counter to ensure the current sleep loop is exitted on return.
Returns with the processor awake.
*/
#pragma vector = PORT2_VECTOR
__interrupt void Port2ISR(void);
/*
Handles waking up from low power mode via motion.
This triggers a reset of the sleep interval to SHORT_SLEEP_TIME and sets the sleep
counter to ensure the current sleep loop is exitted on return.
Returns with the processor awake.
*/
#pragma vector = TIMER0_A1_VECTOR
__interrupt void TimerAISR(void);
/*
Handles waking up from low power mode via TimerA.
The timer interrupt is disabled.
Returns with the processor awake.
*/
#if 0
#pragma vector = USCIAB0RX_VECTOR
__interrupt void SPIRxISR(void);
/*
Handles waking up from a received byte on the SPI module.
The byte is copied to ucGlobalSPIRxByte which clears the interrupt flag.
Returns with the processor awake.
*/
#pragma vector = USCIAB0TX_VECTOR
__interrupt void SPITxISR(void);
/*
Handles waking up from a received byte on the SPI module.
Clears UCA0TXIFG.
Returns with the processor awake.
*/
#endif /* SPI interrupts */
#endif /* __MAIN */