Declare and define ontime
This commit is contained in:
parent
bee9001bd3
commit
edacdd8b63
|
@ -49,6 +49,7 @@ void delay(int us) // DEFINING DELAY FUNCTION
|
|||
}
|
||||
void SystickHandler(void)
|
||||
{ // SysTick interrupt handler
|
||||
static int ontime = 0;
|
||||
ontime++;
|
||||
if (ontime < duty)
|
||||
{
|
||||
|
@ -114,5 +115,3 @@ int main(void) {
|
|||
// Main loop does nothing; everything is handled in interrupts
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue