1
0
Fork 0
2020-embedded-game-programming/src/main.c

34 lines
677 B
C

#include "odroid/input.h"
#include <esp_log.h>
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
static const char* LOG_TAG = "Main";
void app_main(void)
{
Odroid_InitializeInput();
ESP_LOGI(LOG_TAG, "Odroid initialization complete - entering main loop");
for (;;)
{
Odroid_Input input = Odroid_PollInput();
printf(
"\ra: %d b: %d start: %d select: %d vol: %d menu: %d up: %d down: %d left: %d right: %d ",
input.a, input.b, input.start, input.select, input.volume, input.menu,
input.up, input.down, input.left, input.right);
fflush(stdout);
vTaskDelay(250 / portTICK_PERIOD_MS);
}
// Should never get here
esp_restart();
}