Comment update
This commit is contained in:
parent
2fee158217
commit
def2bd27b7
27
main.c
27
main.c
|
@ -54,36 +54,31 @@ void UART1_RXTX_to_DISPLAY(char RX_DATA)
|
|||
{
|
||||
if (RX_DATA == 0x52)
|
||||
{
|
||||
GPIO_PORTF_DATA_R |= 0x02; // IF RECEIVED CHARACTER IS R TURN ON RED LED
|
||||
|
||||
|
||||
GPIO_PORTF_DATA_R |= 0x02; // IF RECEIVED CHARACTER IS R TURN ON RED LED
|
||||
}
|
||||
else if (RX_DATA == 0x42)
|
||||
{
|
||||
GPIO_PORTF_DATA_R |= 0x04; // IF RECEIVED CHARACTER IS B TURN ON BLUE LED
|
||||
|
||||
|
||||
GPIO_PORTF_DATA_R |= 0x04; // IF RECEIVED CHARACTER IS B TURN ON BLUE LED
|
||||
}
|
||||
else if (RX_DATA == 0x47)
|
||||
{
|
||||
GPIO_PORTF_DATA_R |= 0x08; // IF RECEIVED CHARACTER IS G TURN ON GREEN LED
|
||||
|
||||
}
|
||||
{
|
||||
GPIO_PORTF_DATA_R |= 0x08; // IF RECEIVED CHARACTER IS G TURN ON GREEN LED
|
||||
}
|
||||
else
|
||||
{
|
||||
GPIO_PORTF_DATA_R &= 0x00; // RED LED FOR JUNK DATA
|
||||
GPIO_PORTF_DATA_R &= 0x00; // RED LED FOR JUNK DATA
|
||||
}
|
||||
UART1_WRITE(RX_DATA); // SEND RECEIVED DATA TO DISPLAY
|
||||
UART1_WRITE(RX_DATA); // SEND RECEIVED DATA TO DISPLAY
|
||||
}
|
||||
|
||||
|
||||
int main(void) // MAIN FUNCTION
|
||||
int main(void) // MAIN FUNCTION
|
||||
{
|
||||
GPIO_PORT_F_init(); // GPIO PORT F INITIALISATION FUNCTION
|
||||
GPIO_PORT_B_init(); // GPIO PORT B INITIALISATION FUNCTION
|
||||
GPIO_PORT_F_init(); // GPIO PORT F INITIALISATION FUNCTION
|
||||
GPIO_PORT_B_init(); // GPIO PORT B INITIALISATION FUNCTION
|
||||
|
||||
while (1)
|
||||
{
|
||||
UART1_RXTX_to_DISPLAY(UART1_READ()); // RECEIVE DATA, SEND RECEIVED DATA TO DISPLAY OR GLOW LED
|
||||
UART1_RXTX_to_DISPLAY(UART1_READ()); // RECEIVE DATA, SEND RECEIVED DATA TO DISPLAY OR GLOW LED
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue