This reverts commit
b6d9822.
The display update can be disabled by writing 0x0 to the EEPROM register 0xb.
/* main.c */
#include "main.h"
-
-#if WITH_LCD == 1
#include "lcdlib/lcd-color-graphic.h"
#include "lcdlib/font.h"
-#endif
volatile uint16_t control_reg;
volatile uint16_t time;
uint8_t invalid[8];
uint8_t make_update_lcd;
-#if WITH_LCD == 1
color_t col_background;
color_t col_font;
color_t col_title;
color_t col_neg;
-#endif
struct calib_t calib_settings;
-#if WITH_LCD == 1
/******************
* Init USART for LCD
*****************/
UBRR1H = 0; //full speed
UDR1 = LCD_NOP;
}
-#endif
/******************
* Read calibration from eeprom
time = 0;
}
-#if WITH_LCD == 1
/******************
* Some stuff on the LCD
*****************/
LED2_OFF();
}
- #endif
+
/******************
* Init all functions
OCR1A = 31250;
-#if WITH_LCD == 1
LED1_ON();
lcd_init();
LED1_OFF();
LED2_ON();
lcd_command_1(LCD_MIRROR, LCD_BGR | LCD_FLIP_XY);
lcd_command(LCD_ON);
- LED2_OFF();
-#endif
+ LED2_OFF();
read_calib();
sei();
}
int main(void) {
_delay_ms(100);
init();
-#if WITH_LCD == 1
lcd_design();
-#endif
while(1) {
while(next_step==0);
next_step = 0;
if (measurement_active) {do_measurement_step();}
-
-#if WITH_LCD == 1
+
if(make_update_lcd) {
if(calib_settings.uselcd)
lcd_update();
}
if(key_was_pressed(1<<KEY_1)) {}
if(key_was_pressed(1<<KEY_2)) {}
-#endif
};
return 0;
#define FIRMWARE_VERSION 0x0001
-#define WITH_LCD 1
-
#define UDORD1 2
#define UCPHA1 1