summaryrefslogtreecommitdiffstats
path: root/firmware/src/main/hello_world_main.c
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2024-08-13 21:35:31 +0200
committerLouis Burda <quent.burda@gmail.com>2024-08-13 21:35:31 +0200
commitc989833a371e07f285c6bb169fefb335696afad6 (patch)
tree2d9907ef26b09c2d9f3e4753b2fb7f683f5a9033 /firmware/src/main/hello_world_main.c
parent463fa740c078faf8c5afc0a2f0753f41e0ad58f8 (diff)
downloaddesk-andon-c989833a371e07f285c6bb169fefb335696afad6.tar.gz
desk-andon-c989833a371e07f285c6bb169fefb335696afad6.zip
Add blink test firmware, docs and new schematic iterations
Diffstat (limited to 'firmware/src/main/hello_world_main.c')
-rw-r--r--firmware/src/main/hello_world_main.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/firmware/src/main/hello_world_main.c b/firmware/src/main/hello_world_main.c
new file mode 100644
index 0000000..1222e05
--- /dev/null
+++ b/firmware/src/main/hello_world_main.c
@@ -0,0 +1,20 @@
+#include "freertos/FreeRTOS.h"
+#include "freertos/task.h"
+#include "driver/gpio.h"
+#include "hal/gpio_types.h"
+
+#include <stdio.h>
+
+void app_main(void)
+{
+ gpio_reset_pin(3);
+ gpio_set_direction(3, GPIO_MODE_OUTPUT);
+ while (1) {
+ printf("Hello world!\n");
+ fflush(stdout);
+ gpio_set_level(3, 1);
+ vTaskDelay(1000 / portTICK_PERIOD_MS);
+ gpio_set_level(3, 0);
+ vTaskDelay(1000 / portTICK_PERIOD_MS);
+ }
+}