mirror of
https://github.com/espressif/esp-idf-template.git
synced 2025-10-09 11:50:59 +00:00
Initial version of template application
This commit is contained in:
10
main/Makefile
Normal file
10
main/Makefile
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Main Makefile. This is basically the same as a component makefile.
|
||||
#
|
||||
# This Makefile should, at the very least, just include $(SDK_PATH)/make/component.mk. By default,
|
||||
# this will take the sources in the src/ directory, compile them and link them into
|
||||
# lib(subdirectory_name).a in the build directory. This behaviour is entirely configurable,
|
||||
# please read the SDK documents if you need to do this.
|
||||
#
|
||||
|
||||
include $(SDK_PATH)/make/component.mk
|
17
main/app_main.c
Normal file
17
main/app_main.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <stdio.h>
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
|
||||
|
||||
void pingTask(void *pvParameters)
|
||||
{
|
||||
while (1) {
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
printf("ping\n");
|
||||
}
|
||||
}
|
||||
|
||||
void app_main()
|
||||
{
|
||||
xTaskCreatePinnedToCore(&pingTask, "pingTask", 2048, NULL, 5, NULL, 0);
|
||||
}
|
Reference in New Issue
Block a user