Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "LPC13xx.h"
- #include "uart.h"
- #include "stdio.h"
- #include "lcd.h"
- extern volatile uint32_t UARTCount;
- extern volatile uint8_t UARTBuffer[BUFSIZE];
- int main (void) {
- /* Basic chip initialization is taken care of in SystemInit() called
- * from the startup code. SystemInit() and chip settings are defined
- * in the CMSIS system_<part family>.c file.
- */
- SystemInit();
- /* NVIC is installed inside UARTInit file. */
- UARTInit(115200);
- char count=0;
- while (1)
- { /* Loop forever */
- if ( UARTCount != 0 )
- {
- LPC_UART->IER = IER_THRE | IER_RLS; /* Disable RBR */
- UARTSend( (uint8_t *)UARTBuffer, UARTCount );
- lcd_putstring(0, "(uint8_t *)UARTBuffer");
- UARTCount = 0;
- LPC_UART->IER = IER_THRE | IER_RLS | IER_RBR; /* Re-enable RBR */
- }
- if(UARTBuffer[1]=='3' && UARTBuffer[2]=='6' && UARTBuffer[3]=='0' && UARTBuffer[4]=='0' && UARTBuffer[5]=='6' && UARTBuffer[6]=='2' && UARTBuffer[7]=='1' && UARTBuffer[8]=='0' && UARTBuffer[9]=='6' && UARTBuffer[10]=='9')
- lcd_putstring(1,"ACCESS GIVEN"); // compare 12 bytes of the card value
- count++;
- if(count>=2)
- {
- lcd_putstring(2,"NO PARKING SPACE");
- }
- else
- {
- lcd_putstring(2,&count);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement