projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CodeLite: add a small delay during the debugger initialization.
[bertos.git]
/
examples
/
stm32p103
/
main.c
diff --git
a/examples/stm32p103/main.c
b/examples/stm32p103/main.c
index 4ca8ea3cf7a321e27b959203bcf6deae483eaa46..483852e2148263abc988f5ca505c9402424687c0 100644
(file)
--- a/
examples/stm32p103/main.c
+++ b/
examples/stm32p103/main.c
@@
-52,6
+52,17
@@
static void led_init(void)
LED_PIN, GPIO_MODE_OUT_PP, GPIO_SPEED_50MHZ);
}
LED_PIN, GPIO_MODE_OUT_PP, GPIO_SPEED_50MHZ);
}
+static void NORETURN led_process(void)
+{
+ int i;
+
+ for (i = 0; ; i = !i)
+ {
+ stm32_gpioPinWrite((struct stm32_gpio *)GPIOC_BASE, LED_PIN, i);
+ timer_delay(250);
+ }
+}
+
int main(void)
{
int i;
int main(void)
{
int i;
@@
-62,10
+73,10
@@
int main(void)
proc_init();
led_init();
proc_init();
led_init();
+ proc_new(led_process, NULL, KERN_MINSTACKSIZE, NULL);
for (i = 0; ; i = !i)
{
for (i = 0; ; i = !i)
{
- stm32_gpioPinWrite((struct stm32_gpio *)GPIOC_BASE, LED_PIN, i);
- kputs("hello world\n");
+ kputs("BeRTOS up & running!\n");
timer_delay(500);
}
}
timer_delay(500);
}
}