//----------------------------------------------------------------------------
// C main line
//----------------------------------------------------------------------------

#include <m8c.h>        // part specific constants and macros
#include "PSoCAPI.h"    // PSoC API definitions for all User Modules


void main(void)
{
	BootLdrI2C_1_Start();
	BootLdrI2C_1_EnableSlave();
	BootLdrI2C_1_EnableInt();
	M8C_EnableGInt ; // Uncomment this line to enable Global Interrupts
	// Insert your main routine code here.
		while(1)
	{
		//Scenario 1
		/*if (PRT1DR & 0x10)
		{
			PRT2DR &= ~0x01;
			PRT2DR |=  0x02;
		}
		else
		{
			PRT2DR &= ~0x02;
			PRT2DR |=  0x01;
		}*/
				
		//Scenario 2
		if (PRT1DR & 0x10)
		{
			PRT2DR &= ~0x02;
			PRT2DR |=  0x01;
		}
		else
		{
			PRT2DR &= ~0x01;
			PRT2DR |=  0x02;
		}
		
	}
}
