Пример #1
0
void main(void) {
    //leds:
    LED_INIT();

    //init clock source XOSC:
    clocksource_init();

    //init uart
    uart_init();

    //init wdt timer
    wdt_init();

    apa102_init();

    //init storage
    storage_init();

    //enable timeout routines
    timeout_init();

    //apa102_init();

    //init frsky core
    frsky_init();

    //init adc
    adc_init();

    //init output
    #if SBUS_ENABLED
    sbus_init();
    #else
    ppm_init();
    #endif

    //init failsafe
    failsafe_init();

    debug("main: init done\n");

    //run main
    //frsky_frame_sniffer();
    frsky_main();

    LED_RED_ON();
    while (1) {
        LED_RED_ON();
        delay_ms(200);
        LED_RED_OFF();
        delay_ms(200);
    }
}
Пример #2
0
int main(void) {
    // leds:
    led_init();

    // init clock sources:
    clocksource_init();

    // init ios
    io_init();

    // init debug
    debug_init();

    // init wdt timer
    wdt_init();

    // enable timeout routines
    timeout_init();

    // init storage
    storage_init();

    // init frsky core
    frsky_init();

    // init adc
    adc_init();

    // init output
#ifdef SBUS_ENABLED
    sbus_init();
#else  // SBUS_ENABLED
    ppm_init();
#endif  // SBUS_ENABLED

    // init failsafe
    failsafe_init();

    // init telemetry
    telemetry_init();

    // run main
    debug("main: init done\n");

    // frsky_frame_sniffer();
    frsky_main();

    debug("main: frsky main ended?! THIS SHOULD NOT HAPPEN!");
    while (1) {}
}