MCUME/MCUME_teensy41/teensy20/teensy20.ino

38 wiersze
893 B
C++

extern "C" {
#include "emuapi.h"
#include "iopins.h"
}
#include "t4_dsp.h"
extern T4_DSP tft;
// ****************************************************
// the setup() method runs once, when the sketch starts
// ****************************************************
void setup() {
emu_init();
}
// ****************************************************
// the loop() method runs continuously
// ****************************************************
void loop(void)
{
if (menuActive()) {
uint16_t bClick = emu_DebounceLocalKeys();
int action = handleMenu(bClick);
char * filename = menuSelection();
if (action == ACTION_RUN1) {
emu_start(20000,nullptr);
emu_Init(filename);
}
delay(20);
}
else {
uint16_t bClick = emu_DebounceLocalKeys();
emu_Input(bClick);
emu_Step();
delay(20);
}
}