aboutsummaryrefslogtreecommitdiff
path: root/stm32f091/main.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-09-26 16:43:28 +0200
committerlonkaars <loek@pipeframe.xyz>2022-09-26 16:43:28 +0200
commit01279df4bd82e1f35599e4ca59a18e5756fda212 (patch)
treeceffe4ebcabe66802afea8488adbf03ed91f3b73 /stm32f091/main.c
parent07e2eef57eeff5a2d21945b9ad6ca1dbd714b924 (diff)
freertos blink demo working
Diffstat (limited to 'stm32f091/main.c')
-rw-r--r--stm32f091/main.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/stm32f091/main.c b/stm32f091/main.c
index cc815c9..848bfac 100644
--- a/stm32f091/main.c
+++ b/stm32f091/main.c
@@ -6,7 +6,7 @@
#define PORT GPIOA
#define PIN 5
-void task_1(void *pv_parameters) {
+void task_1() {
uint8_t led = 1;
while (1) {
@@ -14,9 +14,7 @@ void task_1(void *pv_parameters) {
PORT->ODR |= (led << PIN);
led ^= 1;
- vTaskDelay(200 / portTICK_RATE_MS);
- // for (unsigned int gert = 0; gert < 100000; gert++)
- // asm("nop");
+ vTaskDelay(1000 / portTICK_RATE_MS);
}
}
@@ -26,7 +24,6 @@ int main() {
PORT->MODER &= ~(0b11 << (PIN * 2));
PORT->MODER |= (0b01 << (PIN * 2));
- // task_1(0);
xTaskCreate(task_1, "task1", 128, NULL, 1, NULL);
vTaskStartScheduler();
}