parent
9b00f8ac49
commit
48897dbc0e
9
main.c
9
main.c
|
@ -24,4 +24,13 @@ void delay(int us)
|
||||||
STCTRL |= ENABLE | CLKINT; // Enable SysTick
|
STCTRL |= ENABLE | CLKINT; // Enable SysTick
|
||||||
while ((STCTRL & (1 << 16)) == 0); // Wait until flag is set
|
while ((STCTRL & (1 << 16)) == 0); // Wait until flag is set
|
||||||
STCTRL &= ~ENABLE; // Stop the timer
|
STCTRL &= ~ENABLE; // Stop the timer
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
systick_setting(); // SysTick setup
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue