|
|
|
|
@ -1,15 +1,12 @@
|
|
|
|
|
/* Anschlüsse sind:
|
|
|
|
|
* B0 - 1wire
|
|
|
|
|
* B0 - LCD (RS)
|
|
|
|
|
* B1 - Kontrast-PWM
|
|
|
|
|
* B2 - Backlight-PWM
|
|
|
|
|
* B3-B5 - ISP
|
|
|
|
|
* C0-C1 - 2farb-LED
|
|
|
|
|
* C2 - LED
|
|
|
|
|
* C3-C4 - Knopf-drehung
|
|
|
|
|
* C5 - Knopf-taster
|
|
|
|
|
* C6 - ISP
|
|
|
|
|
* D0-6 - LCD (DB4-7, RS, R/W, EN)
|
|
|
|
|
* D7 - LED
|
|
|
|
|
* B3-B5 - ISP/SPI
|
|
|
|
|
* C0-5 - LCD (DB4-7, R/W, EN)
|
|
|
|
|
* D2,D4 - USB
|
|
|
|
|
* D7 - SPI (SS master)
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -30,63 +27,8 @@
|
|
|
|
|
#define BACKLIGHTPIN 2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// button handling
|
|
|
|
|
#define BUTTPIN PINC
|
|
|
|
|
#define BUTTLPIN 5
|
|
|
|
|
#define BUTTRPIN 4
|
|
|
|
|
#define BUTTTPIN 3
|
|
|
|
|
|
|
|
|
|
#define BUTTEV_PUSH 1
|
|
|
|
|
#define BUTT_BOUNCE 25 //approx ms debounce time
|
|
|
|
|
|
|
|
|
|
extern uint8_t buttonevent;
|
|
|
|
|
extern int8_t buttoninc; // how much the button turned.
|
|
|
|
|
// you might want to subtract turns you consumed since the variable
|
|
|
|
|
// is updated in an interrupt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//uint8_t volatile timer1_acc;
|
|
|
|
|
|
|
|
|
|
#define FLOWTEMP_MAX 100
|
|
|
|
|
#define FLOWTEMP_MIN 5
|
|
|
|
|
#define FLOWTEMP_DEFAULT 70
|
|
|
|
|
#define FLOWTEMP_ALARM_MIN 50
|
|
|
|
|
#define FLOWTEMP_ALARM_MAX 100
|
|
|
|
|
#define FLOWTEMP_ALARM_DEFAULT 87
|
|
|
|
|
#define FLOWTEMP_RANGE_MAX 40
|
|
|
|
|
#define FLOWTEMP_RANGE_DEFAULT 15
|
|
|
|
|
extern uint8_t flowtemp_alarm;
|
|
|
|
|
extern uint8_t flowtemp_range;
|
|
|
|
|
extern uint8_t flowtemp;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void set_display_brightness(uint8_t display_brightness);
|
|
|
|
|
void store_display_brightness(uint8_t new_brightness);
|
|
|
|
|
uint8_t load_display_brightness();
|
|
|
|
|
|
|
|
|
|
void set_display_contrast(uint8_t display_contrast);
|
|
|
|
|
void store_display_contrast(uint8_t new_contrast);
|
|
|
|
|
uint8_t load_display_contrast();
|
|
|
|
|
|
|
|
|
|
void set_flowtemp(uint8_t new_flowtemp);
|
|
|
|
|
void store_flowtemp(uint8_t new_flowtemp);
|
|
|
|
|
uint8_t load_flowtemp();
|
|
|
|
|
|
|
|
|
|
void set_flowtemp_range(uint8_t new_flowtemp_range);
|
|
|
|
|
void store_flowtemp_range(uint8_t new_flowtemp_range);
|
|
|
|
|
uint8_t load_flowtemp_range();
|
|
|
|
|
|
|
|
|
|
void set_flowtemp_alarm(uint8_t new_flowtemp_alarm);
|
|
|
|
|
void store_flowtemp_alarm(uint8_t new_flowtemp_alarm);
|
|
|
|
|
uint8_t load_flowtemp_alarm();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// clock
|
|
|
|
|
extern struct clockfmt {
|
|
|
|
|
uint8_t hour;
|
|
|
|
|
uint8_t minute;
|
|
|
|
|
uint8_t second;
|
|
|
|
|
} clock;
|
|
|
|
|
|
|
|
|
|
#endif //__MAIN_H
|
|
|
|
|
|