Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 473 → Rev 474

/C-OSD/trunk/main.c
163,13 → 163,6
DDRC &= ~(1 << PC5); // PC5 input (SET)
PORTC |= (1 << PC5); // pullup
 
// set up top and bottom lines
if (COSD_FLAGS & COSD_FLAG_NTSC) {
bottom_line = 12;
} else {
bottom_line = 14;
}
 
// reset the MAX7456 to be sure any undefined states do no harm
MAX_RESET_LOW
MAX_RESET_HIGH
177,26 → 170,31
// give the FC/NC and the maxim time to come up
LED4_ON
_delay_ms(2000);
 
LED4_OFF
 
 
//Pushing NEW chars to the MAX7456
#if (WRITECHARS != -1)
// DISABLE display (VM0)
spi_send_byte(0x00, 0b00000000);
// DISABLE display (VM0)
spi_send_byte(0x00, 0b00000000);
#include "characters.c"
#else
// read out config for NTSC/PAL distinguishing
get_eeprom(0);
#endif
 
// Setup Video Mode
if (COSD_FLAGS & COSD_FLAG_NTSC) {
// NTSC + enable display immediately (VM0)
spi_send_byte(0x00, 0b00001000);
} else {
// PAL + enable display immediately (VM0)
spi_send_byte(0x00, 0b01001000);
}
// Setup Video Mode
if (COSD_FLAGS & COSD_FLAG_NTSC) {
// NTSC + enable display immediately (VM0)
spi_send_byte(0x00, 0b00001000);
 
bottom_line = 12;
} else {
// PAL + enable display immediately (VM0)
spi_send_byte(0x00, 0b01001000);
 
bottom_line = 14;
}
 
/*// clear all display-mem (DMM)
spi_send_byte(0x04, 0b00000100);
 
284,6 → 282,7
//ampere_wasted = *((int32_t *) &spi_cmd_buffer + 3);
// if this is the first receival we should print the small A
if (!(COSD_FLAGS2 & COSD_FLAG_STROMREC)) {
clear();
COSD_FLAGS2 &= ~COSD_ICONS_WRITTEN;
// update this flag
COSD_FLAGS2 |= COSD_FLAG_STROMREC;