Finished RS-232 debug project

This commit is contained in:
William Miceli
2021-06-25 13:34:24 -04:00
parent e31372a8e6
commit 3c9745a134
22 changed files with 1587 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
#include "interrupts.h"
extern volatile unsigned char status_flag;
extern char* pUSBReceiveString;
extern char* pRS232ReceiveString;
/*
* 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);
}
#pragma vector = USCI_A3_VECTOR
__interrupt void USCI_A3_ISR(void){
usci_A3_receiveString(pRS232ReceiveString);
}