Subversion Repositories Projects

Rev

Rev 761 | Rev 783 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 761 Rev 762
Line 27... Line 27...
27
#include "config.h"
27
#include "config.h"
28
#include "main.h"
28
#include "main.h"
29
#include "buttons.h"
29
#include "buttons.h"
30
#include "usart1.h"
30
#include "usart1.h"
Line -... Line 31...
-
 
31
 
-
 
32
#if !(ALLCHARSDEBUG|(WRITECHARS != -1))
31
 
33
 
32
uint8_t EEMEM ee_checkbyte1 = CHECKBYTE1;
34
uint8_t EEMEM ee_checkbyte1 = CHECKBYTE1;
33
uint8_t EEMEM ee_checkbyte2 = CHECKBYTE2;
35
uint8_t EEMEM ee_checkbyte2 = CHECKBYTE2;
34
uint8_t EEMEM ee_COSD_FLAGS_MODES = 0;
36
uint8_t EEMEM ee_COSD_FLAGS_MODES = 0;
35
uint8_t EEMEM ee_COSD_FLAGS_CONFIG = 0;
37
uint8_t EEMEM ee_COSD_FLAGS_CONFIG = 0;
Line 36... Line -...
36
uint8_t EEMEM ee_COSD_DISPLAYMODE = 0;
-
 
37
 
-
 
38
#if !(ALLCHARSDEBUG|(WRITECHARS != -1))
38
uint8_t EEMEM ee_COSD_DISPLAYMODE = 0;
39
 
39
 
40
// video modes
40
// video modes
Line 41... Line -...
41
const char VM_PAL[] PROGMEM = "PAL ";
-
 
42
const char VM_NTSC[] PROGMEM = "NTSC";
41
const char VM_PAL[] PROGMEM = "PAL ";
Line 43... Line -...
43
 
-
 
44
 
-
 
45
const displaymode_t * mode;
42
const char VM_NTSC[] PROGMEM = "NTSC";
46
 
43
 
47
#endif
44
const displaymode_t * mode;
Line 48... Line 45...
48
 
45
 
49
const char ee_message0[] PROGMEM = "Loading Data from EEPROM";
46
const char ee_message0[] PROGMEM = "Loading Data from EEPROM";
50
const char ee_message1[] PROGMEM = "No saved Data in EEPROM";
47
const char ee_message1[] PROGMEM = "No saved Data in EEPROM";
51
const char* ee_msg[] PROGMEM = {ee_message0, ee_message1};
48
const char* ee_msg[] PROGMEM = {ee_message0, ee_message1};
52
 
49
 
53
/**
-
 
54
 * read data saved in eeprom, print out message if <verbose> is set
50
/**
55
 */
-
 
56
void get_eeprom(uint8_t verbose) {
51
 * read data saved in eeprom, print out message if <verbose> is set
57
    if (eeprom_read_byte(&ee_checkbyte1) == CHECKBYTE1 && eeprom_read_byte(&ee_checkbyte2) == CHECKBYTE2) {
52
 */
58
#if !(ALLCHARSDEBUG|(WRITECHARS != -1))
53
void get_eeprom(uint8_t verbose) {
59
        if (verbose) write_ascii_string_pgm(2, 9, ee_msg[0]); // Loading data
54
    if (eeprom_read_byte(&ee_checkbyte1) == CHECKBYTE1 && eeprom_read_byte(&ee_checkbyte2) == CHECKBYTE2) {
60
#endif
55
        if (verbose) write_ascii_string_pgm(2, 9, ee_msg[0]); // Loading data
61
        COSD_FLAGS_MODES = eeprom_read_byte(&ee_COSD_FLAGS_MODES);
-
 
62
        COSD_FLAGS_CONFIG = eeprom_read_byte(&ee_COSD_FLAGS_CONFIG);
56
        COSD_FLAGS_MODES = eeprom_read_byte(&ee_COSD_FLAGS_MODES);
63
        COSD_DISPLAYMODE = eeprom_read_byte(&ee_COSD_DISPLAYMODE);
-
 
64
        //if (verbose) write_ndigit_number_u(23, 11, COSD_DISPLAYMODE, 2, 0);
57
        COSD_FLAGS_CONFIG = eeprom_read_byte(&ee_COSD_FLAGS_CONFIG);
65
    } else {
58
        COSD_DISPLAYMODE = eeprom_read_byte(&ee_COSD_DISPLAYMODE);
Line 66... Line -...
66
#if !(ALLCHARSDEBUG|(WRITECHARS != -1))
-
 
Line 67... Line 59...
67
        if (verbose) write_ascii_string_pgm(2, 9, ee_msg[1]); // Loading data
59
        //if (verbose) write_ndigit_number_u(23, 11, COSD_DISPLAYMODE, 2, 0);
68
#endif
60
    } else {
69
    }
61
        if (verbose) write_ascii_string_pgm(2, 9, ee_msg[1]); // Loading data
70
}
62
    }