Subversion Repositories Projects

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1053 - 1
/*****************************************************************************
2
 *   Copyright (C) 2010 seb@exse.net                                                                             *
3
 *   Copyright (C) 2011 Christian Brandtner brandtner@brandtner.net          *
4
 *                                                                           *
5
 *   This program is free software; you can redistribute it and/or modify    *
6
 *   it under the terms of the GNU General Public License as published by    *
7
 *   the Free Software Foundation; either version 2 of the License.          *
8
 *                                                                           *
9
 *   This program is distributed in the hope that it will be useful,         *
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of          *
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
12
 *   GNU General Public License for more details.                            *
13
 *                                                                           *
14
 *   You should have received a copy of the GNU General Public License       *
15
 *   along with this program; if not, write to the                           *
16
 *   Free Software Foundation, Inc.,                                         *
17
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.               *
18
 *                                                                           *
19
 *****************************************************************************/
20
/*14.6.2011 Parameter erweitert Wi232 Cebra */
21
 
22
#include <avr/io.h>
23
#include <avr/eeprom.h>
24
 
25
#include "eeprom.h"
26
 
27
//*****************************************************************************
28
// 
29
 
30
uint8_t EE_LowBat               EEMEM= 137;
31
uint8_t EE_DisplayTimeout       EEMEM= 0;
32
uint8_t EE_DisplayLanguage      EEMEM= 0;
33
uint8_t EE_WiTXRXChannel        EEMEM= 1;
34
uint8_t EE_WiNetworkGroup       EEMEM=66;
35
volatile uint8_t DisplayTimeout;
36
volatile uint8_t DisplayLanguage;
37
volatile uint8_t WiTXRXChannel;
38
volatile uint8_t WiNetworkGroup;
39
//*****************************************************************************
40
// 
41
void ReadParameter (void)
42
{
43
        MK_LowBat = eeprom_read_byte(&EE_LowBat);
44
        DisplayTimeout = eeprom_read_byte(&EE_DisplayTimeout);
45
        DisplayLanguage = eeprom_read_byte(&EE_DisplayLanguage);
46
        WiTXRXChannel =eeprom_read_byte(&EE_WiTXRXChannel);
47
        WiNetworkGroup =eeprom_read_byte(&EE_WiNetworkGroup);
48
}
49
 
50
//*****************************************************************************
51
// 
52
void WriteParameter (void)
53
{
54
         eeprom_write_byte(&EE_LowBat, MK_LowBat);
55
         eeprom_write_byte(&EE_DisplayTimeout, DisplayTimeout);
56
         eeprom_write_byte(&EE_DisplayLanguage, DisplayLanguage);
57
         eeprom_write_byte(&EE_WiTXRXChannel, WiTXRXChannel);
58
         eeprom_write_byte(&EE_WiNetworkGroup, WiNetworkGroup);
59
}