Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 328 → Rev 329

/C-OSD/trunk/main.c
38,9 → 38,16
* Debugging and general purpose definitions
* ##########################################################################*/
#define ALLCHARSDEBUG 0 // set to 1 and flash firmware to see all chars
#define WRITECHARS 0 // set to 2XX and flash firmware to write new char
 
#ifndef WRITECHARS // if WRITECHARS not set via makefile
#define WRITECHARS -1 // set to 2XX and flash firmware to write new char
// enables the allchars as well to see results
#endif
 
#ifndef NTSC // if NTSC is not thet via makefile
#define NTSC 0 // set to 1 for NTSC mode + lifts the bottom line
#endif
 
#define ARTHORIZON 0 // set to 1 to enable roll&nick artificial horizon
#define NOOSD 0 // set to 1 to disable OSD completely
#define NOOSD_BUT_WRN 0 // set to 1 to disable OSD completely but show
100,7 → 107,7
#define u32 uint32_t
#define s32 int32_t
 
#if !(ALLCHARSDEBUG|WRITECHARS)
#if !(ALLCHARSDEBUG|(WRITECHARS != -1))
/* ##########################################################################
* MK data strucs & flags
* ##########################################################################*/
198,7 → 205,7
volatile uint16_t uptime = 0;
volatile uint16_t timer = 0;
 
#endif // ends !(ALLCHARSDEBUG|WRITECHARS)
#endif // ends !(ALLCHARSDEBUG|(WRITECHARS != -1))
 
// general PAL|NTSC distingiusch stuff
uint8_t top_line = 1;
487,7 → 494,7
}
}
 
#if !(ALLCHARSDEBUG|WRITECHARS)
#if !(ALLCHARSDEBUG|(WRITECHARS != -1))
/* ##########################################################################
* USART stuff
* ##########################################################################*/
857,7 → 864,7
sei();
}
 
#endif // ends !(ALLCHARSDEBUG|WRITECHARS)
#endif // ends !(ALLCHARSDEBUG|(WRITECHARS != -1))
 
/* ##########################################################################
* MAIN
919,7 → 926,7
/* ##########################################################################
* Pushing NEW chars to the MAX7456
* ##########################################################################*/
#if WRITECHARS
#if (WRITECHARS != -1)
void learn_char(uint8_t number, unsigned char* data) {
// select character to write (CMAH)
spi_send_byte(0x09, number);
1302,7 → 1309,7
// write blank chars to whole screen
clear();
 
#if !(ALLCHARSDEBUG|WRITECHARS)
#if !(ALLCHARSDEBUG|(WRITECHARS != -1))
// init usart
usart1_init();
 
1342,7 → 1349,7
 
 
 
#if ALLCHARSDEBUG | WRITECHARS
#if ALLCHARSDEBUG | (WRITECHARS != -1)
clear();
write_all_chars();
#else