/* ========================================
 *
 * Copyright YOUR COMPANY, THE YEAR
 * All Rights Reserved
 * UNPUBLISHED, LICENSED SOFTWARE.
 *
 * CONFIDENTIAL AND PROPRIETARY INFORMATION
 * WHICH IS THE PROPERTY OF your company.
 *
 * ========================================
*/
#include "stdio.h"
#include "project.h"
char s[32];

int main(void)
{
    CyGlobalIntEnable; /* Enable global interrupts. */

    /* Place your initialization/startup code here (e.g. MyInst_Start()) */
	UART_1_Start();	
	UART_1_UartPutString("Welcome to PSoC4S World!\r\n");
	uint8 d;
	d = 0;
    for(;;)
    {
        /* Place your application code here. */
		uint32 c;
		c = UART_1_UartGetChar();
		if (c != 0) {
			if ((c == '\r') || (c == '\n')) {
				sprintf(s,"\r\n[%d Lines Received.]\r\n",++d);
				UART_1_UartPutString(s);
			} else {	
				UART_1_UartPutChar(c);
			}
		}
    }
}

/* [] END OF FILE */
