summaryrefslogtreecommitdiffstats
path: root/firmware/src/main/hello_world_main.c
diff options
context:
space:
mode:
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);
+ }
+}