Close

Relevant Code Snippet

A project log for Wifi enabled Arduboy dev kit

Removing enough of the AC164160 AVR-IOT WG Development Board stock firmware to accommodate a full Arduboy game and some custom traces

Blake W. FordBlake W. Ford 04/21/2019 at 03:140 Comments
int main(void)
{
    application_init();

    //Standard Arduino function
    setup();

    TCA0.SINGLE.PER = ~0;
    while(gKeepGoing)
    {
        gReportedVerts = 0;
        TCA0.SINGLE.CTRLA |= (TCA_SINGLE_CLKSEL_DIV1024_gc) | (TCA_SINGLE_ENABLE_bm);

        //Standard Arduino function
        loop();

        TCA0.SINGLE.CTRLA &= ~TCA_SINGLE_ENABLE_bm;
        gCycleCount = TCA0.SINGLE.CNT;
        TCA0.SINGLE.CNT = 0;

        runScheduler();
    }

    return 0;
}

Discussions