Skip to content
Snippets Groups Projects
Commit 4b0d2a30 authored by Daniel Friesel's avatar Daniel Friesel
Browse files

etcontroller: add application and makefile

parent ecfab2bb
No related branches found
No related tags found
No related merge requests found
ifdef app
override timer_s = 0
loop = 1
endif
ifneq (${etcontroller_reset_pin}, )
COMMON_FLAGS += -DCONFIG_ETCONTROLLER_RESET_PIN=${etcontroller_reset_pin}
endif
ifeq (${etcontroller_nrst}, 1)
COMMON_FLAGS += -DCONFIG_ETCONTROLLER_NRST
endif
#include "arch.h"
#include "driver/gpio.h"
#include "driver/stdout.h"
#include "driver/uptime.h"
int main(void)
{
arch.setup();
gpio.setup();
kout.setup();
kout << "Hello, World!" << endl;
kout << "Naptime." << endl;
#ifdef CONFIG_ETCONTROLLER_NRST
gpio.output(CONFIG_ETCONTROLLER_RESET_PIN, 0);
arch.delay_ms(1);
gpio.write(CONFIG_ETCONTROLLER_RESET_PIN, 1);
#else
gpio.output(CONFIG_ETCONTROLLER_RESET_PIN, 1);
arch.delay_ms(1);
gpio.write(CONFIG_ETCONTROLLER_RESET_PIN, 0);
#endif
arch.idle();
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment