Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 941 → Rev 942

/C-OSD/trunk/main.c
252,9 → 252,10
LED3_OFF
LED4_OFF
 
DDRC &= ~((1 << PC4) | (1 << PC5)); // PC4 input(MODE) | PC5 input(SET)
PORTC |= ((1 << PC4) | (1 << PC5)); // pullup
DDRC &= ~((1 << PC4) | (1 << PC5) | (1 << PC6) | (1 << PC7)); // PC4 input(MODE) | PC5 input(SET) | PC6 input SJ1 | PC7 input SJ2
PORTC |= ((1 << PC4) | (1 << PC5) | (1 << PC6) | (1 << PC7)); // pullup
 
 
// reset the MAX7456 to be sure any undefined states do no harm
MAX_RESET_LOW
MAX_RESET_HIGH
485,6 → 486,22
_delay_ms(300);
}
}
 
 
if (SJ1_CLOSED && !(COSD_FLAGS_RUNTIME & COSD_BLANKBYSJ)) { // we do not want the HUD anymore
if (COSD_FLAGS_MODES & COSD_FLAG_HUD) {
clear();
}
COSD_FLAGS_MODES &= ~COSD_FLAG_HUD;
COSD_FLAGS_RUNTIME |= COSD_BLANKBYSJ;
} else if (!SJ1_CLOSED && (COSD_FLAGS_RUNTIME & COSD_BLANKBYSJ)) { // we want the HUD back again
if (!(COSD_FLAGS_MODES & COSD_FLAG_HUD)) {
COSD_FLAGS_RUNTIME &= ~COSD_ICONS_WRITTEN;
}
COSD_FLAGS_MODES |= COSD_FLAG_HUD;
COSD_FLAGS_RUNTIME &= ~(COSD_BLANKBYSJ);
}
 
}
 
#else // character flashing...