void PININT7_IRQHandler(void)
{
Chip_PININT_ClearIntStatus(LPC_PININT, PININTCH7);
out_dp += 5;
if(out_dp > 90 ) {
out_dp = 0;
}
DEBUGOUT("duty cycle: %d\r\n",out_dp);
}
void SysTick_Handler(void)
{
static int state = 0;
switch(state)
{
case 0:
Chip_SCTPWM_Start(SCT_PWM);
break;
case 1:
Chip_SCTPWM_Stop(SCT_PWM);
break;
default:
break;
}
state++;
state %= 5;
}
|