Rev 932 | Rev 954 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 932 | Rev 942 | ||
---|---|---|---|
Line 250... | Line 250... | ||
250 | LED1_OFF |
250 | LED1_OFF |
251 | LED2_OFF |
251 | LED2_OFF |
252 | LED3_OFF |
252 | LED3_OFF |
253 | LED4_OFF |
253 | LED4_OFF |
Line 254... | Line 254... | ||
254 | 254 | ||
255 | DDRC &= ~((1 << PC4) | (1 << PC5)); // PC4 input(MODE) | PC5 input(SET) |
255 | DDRC &= ~((1 << PC4) | (1 << PC5) | (1 << PC6) | (1 << PC7)); // PC4 input(MODE) | PC5 input(SET) | PC6 input SJ1 | PC7 input SJ2 |
- | 256 | PORTC |= ((1 << PC4) | (1 << PC5) | (1 << PC6) | (1 << PC7)); // pullup |
|
Line 256... | Line 257... | ||
256 | PORTC |= ((1 << PC4) | (1 << PC5)); // pullup |
257 | |
257 | 258 | ||
258 | // reset the MAX7456 to be sure any undefined states do no harm |
259 | // reset the MAX7456 to be sure any undefined states do no harm |
Line 483... | Line 484... | ||
483 | // do not spam too much |
484 | // do not spam too much |
484 | if (!(COSD_FLAGS_RUNTIME & COSD_DATARECEIVED)) { |
485 | if (!(COSD_FLAGS_RUNTIME & COSD_DATARECEIVED)) { |
485 | _delay_ms(300); |
486 | _delay_ms(300); |
486 | } |
487 | } |
487 | } |
488 | } |
- | 489 | ||
- | 490 | ||
- | 491 | if (SJ1_CLOSED && !(COSD_FLAGS_RUNTIME & COSD_BLANKBYSJ)) { // we do not want the HUD anymore |
|
- | 492 | if (COSD_FLAGS_MODES & COSD_FLAG_HUD) { |
|
- | 493 | clear(); |
|
- | 494 | } |
|
- | 495 | COSD_FLAGS_MODES &= ~COSD_FLAG_HUD; |
|
- | 496 | COSD_FLAGS_RUNTIME |= COSD_BLANKBYSJ; |
|
- | 497 | } else if (!SJ1_CLOSED && (COSD_FLAGS_RUNTIME & COSD_BLANKBYSJ)) { // we want the HUD back again |
|
- | 498 | if (!(COSD_FLAGS_MODES & COSD_FLAG_HUD)) { |
|
- | 499 | COSD_FLAGS_RUNTIME &= ~COSD_ICONS_WRITTEN; |
|
- | 500 | } |
|
- | 501 | COSD_FLAGS_MODES |= COSD_FLAG_HUD; |
|
- | 502 | COSD_FLAGS_RUNTIME &= ~(COSD_BLANKBYSJ); |
|
- | 503 | } |
|
- | 504 | ||
488 | } |
505 | } |
Line 489... | Line 506... | ||
489 | 506 | ||
490 | #else // character flashing... |
507 | #else // character flashing... |
491 | clear(); |
508 | clear(); |