Renamed project from "Debug_UART-USB" to "Debug_USB" and changed symbols from "UART" to "USB" for better consistency
This commit is contained in:
35
Telem_Debug/Debug_USB/interrupts.c
Normal file
35
Telem_Debug/Debug_USB/interrupts.c
Normal file
@@ -0,0 +1,35 @@
|
||||
#include "interrupts.h"
|
||||
|
||||
extern volatile unsigned char status_flag;
|
||||
extern char* pUSBReceiveString;
|
||||
|
||||
/*
|
||||
* Timer B CCR0 Interrupt Service Routine
|
||||
* - Interrupts on Timer B CCR0 match at 10Hz
|
||||
* - Sets Time_Flag variable
|
||||
*/
|
||||
|
||||
/*
|
||||
* GNU interrupt semantics
|
||||
* interrupt(TIMERB0_VECTOR) timer_b0(void)
|
||||
*/
|
||||
|
||||
#pragma vector = TIMER0_B0_VECTOR
|
||||
__interrupt void TIMER0_B0_ISR(void){
|
||||
static unsigned int status_count = TELEM_STATUS_COUNT;
|
||||
|
||||
// Primary System Heart beat
|
||||
status_count--;
|
||||
if(status_count == 0){
|
||||
status_count = TELEM_STATUS_COUNT;
|
||||
status_flag = TRUE;
|
||||
P8OUT |= LEDG; // Turn on the green LED
|
||||
}else{
|
||||
P8OUT &= ~LEDG; // Turn off the green LED
|
||||
}
|
||||
}
|
||||
|
||||
#pragma vector = USCI_A2_VECTOR
|
||||
__interrupt void USCI_A2_ISR(void){
|
||||
usci_A2_receiveString(pUSBReceiveString);
|
||||
}
|
||||
Reference in New Issue
Block a user