-
Notifications
You must be signed in to change notification settings - Fork 19
/
main.c
49 lines (41 loc) · 856 Bytes
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "main.h"
static uint16_t __timer = 0;
void Delay(uint16_t n)
{
__timer = n;
while (__timer > 0);
}
int main()
{
STM_EVAL_LEDInit(LED3);
STM_EVAL_LEDInit(LED4);
STM_EVAL_LEDInit(LED5);
STM_EVAL_LEDInit(LED6);
STM_EVAL_LEDInit(LED7);
STM_EVAL_LEDInit(LED8);
STM_EVAL_LEDInit(LED9);
STM_EVAL_LEDInit(LED10);
if (SysTick_Config(SystemCoreClock / 1000))
{
while (1);
}
while (1) {
STM_EVAL_LEDToggle(LED3);
STM_EVAL_LEDToggle(LED4);
STM_EVAL_LEDToggle(LED5);
STM_EVAL_LEDToggle(LED6);
STM_EVAL_LEDToggle(LED7);
STM_EVAL_LEDToggle(LED8);
STM_EVAL_LEDToggle(LED9);
STM_EVAL_LEDToggle(LED10);
Delay(100);
}
}
void Timer_Decrement()
{
if (__timer > 0)
__timer--;
}
void assert_param(int x)
{
}