#include <m8c.h> // part specific constants and macros
#include "PSoCAPI.h" // PSoC API definitions for all User Modules
#pragma interrupt_handler button_svr
void main()
{
// Insert your main routine code here.
DWORD count = 0;
M8C_EnableGInt;
M8C_EnableIntMask( INT_MSK0, INT_MSK0_GPIO_PORT0 );
while(1)
{}
}
void button_svr(void)
{
if(P1DATA == 0x00)
P1DATA = 0x04;
else
P1DATA = 0x00;
} |