From 3c71d3adcc09eba081f1823167853750c3ed765b Mon Sep 17 00:00:00 2001 From: Philipp Klaus Date: Fri, 2 Jun 2017 16:51:42 +0200 Subject: [PATCH] Revert "Pt100: introduce compile time macro flag WITH_LCD" This reverts commit b6d9822. The display update can be disabled by writing 0x0 to the EEPROM register 0xb. --- pt100/main.c | 20 +++----------------- pt100/main.h | 2 -- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/pt100/main.c b/pt100/main.c index aa795c1..0c979fd 100644 --- a/pt100/main.c +++ b/pt100/main.c @@ -1,11 +1,8 @@ /* 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; @@ -19,16 +16,13 @@ int32_t temperature[17][9]; 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 *****************/ @@ -39,7 +33,6 @@ void init_spi_lcd(void) { UBRR1H = 0; //full speed UDR1 = LCD_NOP; } -#endif /****************** * Read calibration from eeprom @@ -56,7 +49,6 @@ void read_calib() { time = 0; } -#if WITH_LCD == 1 /****************** * Some stuff on the LCD *****************/ @@ -109,7 +101,7 @@ void lcd_update(void) { LED2_OFF(); } - #endif + /****************** * Init all functions @@ -159,16 +151,14 @@ void init(void) { 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(); } @@ -201,15 +191,12 @@ ISR(TIMER1_COMPA_vect) { 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(); @@ -217,7 +204,6 @@ int main(void) { } if(key_was_pressed(1<