/* * Open HR20 * * target: ATmega169 @ 4 MHz in Honnywell Rondostat HR20E * * compiler: WinAVR-20071221 * avr-libc 1.6.0 * GCC 4.2.2 * * copyright: 2008 Jiri Dobry (jdobry-at-centrum-dot-cz) * * license: This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see http:*www.gnu.org/licenses */ /*! * \file eeprom.h * \brief Keyboard driver header * \author Jiri Dobry * \date $Date$ * $Rev$ */ #pragma once #include "config.h" #include #include "debug.h" #include "main.h" #include "../common/rtc.h" #include "adc.h" #if (RFM == 1) #include "rfm_config.h" #include "../common/rfm.h" #endif #define EEPROM __attribute__((section(".eeprom"))) typedef struct { // each variables must be uint8_t or int8_t without exception /* 00 */ uint8_t lcd_contrast; /* 01 */ uint8_t temperature0; //!< temperature 0 - frost protection (unit is 0.5stC) /* 02 */ uint8_t temperature1; //!< temperature 1 - energy save (unit is 0.5stC) /* 03 */ uint8_t temperature2; //!< temperature 2 - comfort (unit is 0.5stC) /* 04 */ uint8_t temperature3; //!< temperature 3 - supercomfort (unit is 0.5stC) /* 05 */ uint8_t P3_Factor; //!< Proportional cubic tuning constant /* 06 */ uint8_t P_Factor; //!< Proportional tuning constant /* 07 */ uint8_t I_Factor; //!< Integral tuning constant /* 08 */ uint8_t I_max_credit; //!< credit for interator limitation /* 09 */ uint8_t I_credit_expiration; //!< unit is PID_interval /* 0a */ uint8_t PID_interval; //!< PID_interval*5 = interval in seconds /* 0b */ uint8_t valve_min; //!< valve position limiter min /* 0c */ uint8_t valve_center; //!< default valve position for "zero - error" - improve stabilization after change temperature /* 0d */ uint8_t valve_max; //!< valve position limiter max /* 0e */ uint8_t valve_hysteresis; //!< valve movement hysteresis (unit is 1/128%) /* 0f */ uint8_t motor_pwm_min; //!< min PWM for motor /* 10 */ uint8_t motor_pwm_max; //!< max PWM for motor /* 11 */ uint8_t motor_eye_low; //!< min signal lenght to accept low level (multiplied by 2) /* 12 */ uint8_t motor_eye_high; //!< min signal lenght to accept high level (multiplied by 2) /* 13 */ uint8_t motor_close_eye_timeout; //!