Example #1
0
int main(int argc, char **argv) {

    // backlight on
    DDRD |= (1<<0);
    PORTD |= (1<<0);

    MCUSR &= ~_BV(WDRF);
    wdt_disable();

    LCDG_InitPort();
    _delay_ms(30);  // takes longer?
    LCDG_InitLcd();
    LCDG_ClrAllDisp();
    terminal__init();
    
    // TX as out
    DDRD |= (1<<3);

    // RTS as out
    DDRD |= (1<<6);

    print_result(PSTR("RTS=0 TX=0 RX=0"), test_1());
    print_result(PSTR("RTS=0 TX=1 RX=1"), test_2());
    print_result(PSTR("RTS=1 TX=0 RX=0"), test_3());
    print_result(PSTR("RTS=1 TX=1 RX=0"), test_4());

    while(1);
    return 0;
}
Example #2
0
inline static void application__init(void) {
    // Drivers
    LCDG_InitPort();
    _delay_ms(30);
    LCDG_InitLcd();
    LCDG_ClrAllDisp();

    terminal__init();
    keypad__init();
    system_timer__init();
}