Renamed project from "Debug_UART-USB" to "Debug_USB" and changed symbols from "UART" to "USB" for better consistency

This commit is contained in:
William Miceli
2021-06-25 11:05:17 -04:00
parent 4017f8fda2
commit 073dfe8753
22 changed files with 10 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<projectDescription> <projectDescription>
<name>Debug_UART-USB</name> <name>Debug_USB</name>
<comment></comment> <comment></comment>
<projects> <projects>
</projects> </projects>

View File

@@ -1,7 +1,7 @@
#include "interrupts.h" #include "interrupts.h"
extern volatile unsigned char status_flag; extern volatile unsigned char status_flag;
extern char* pUARTReceiveString; extern char* pUSBReceiveString;
/* /*
* Timer B CCR0 Interrupt Service Routine * Timer B CCR0 Interrupt Service Routine
@@ -31,5 +31,5 @@ __interrupt void TIMER0_B0_ISR(void){
#pragma vector = USCI_A2_VECTOR #pragma vector = USCI_A2_VECTOR
__interrupt void USCI_A2_ISR(void){ __interrupt void USCI_A2_ISR(void){
usci_A2_receiveString(pUARTReceiveString); usci_A2_receiveString(pUSBReceiveString);
} }

View File

@@ -6,8 +6,8 @@
#include "usci.h" #include "usci.h"
volatile unsigned char status_flag = FALSE; volatile unsigned char status_flag = FALSE;
char UARTTransmitString[] = "[DEBUG] Test Transmission String"; char USBTransmitString[] = "[DEBUG] Test Transmission String";
char* pUARTReceiveString; char* pUSBReceiveString;
int main(void) { int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer; `WDTPW` is the "WatchDog Timer PassWord", required for all `WDTCTL` operations WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer; `WDTPW` is the "WatchDog Timer PassWord", required for all `WDTCTL` operations
@@ -29,7 +29,7 @@ int main(void) {
P8OUT |= LEDY0; // Initially set LEDY0 to High P8OUT |= LEDY0; // Initially set LEDY0 to High
pUARTReceiveString = calloc(1, 256 * sizeof(*pUARTReceiveString) + 1); pUSBReceiveString = calloc(1, 256 * sizeof(*pUSBReceiveString) + 1);
usci_A2_enable(); usci_A2_enable();
usci_A2_enableInterrupt(); usci_A2_enableInterrupt();
@@ -37,12 +37,12 @@ int main(void) {
while(1) while(1)
{ {
// Repeating debug transmission string // Repeating debug transmission string
usci_A2_transmitString(&UARTTransmitString[0]); usci_A2_transmitString(&USBTransmitString[0]);
// String received, to be transmitted back // String received, to be transmitted back
if(pUARTReceiveString[0] != '\0'){ if(pUSBReceiveString[0] != '\0'){
usci_A2_transmitString(pUARTReceiveString); usci_A2_transmitString(pUSBReceiveString);
pUARTReceiveString[0] = '\0'; pUSBReceiveString[0] = '\0';
} }
delayMultiplied(5000); delayMultiplied(5000);