#ifndef __CONFIG_H
#define __CONFIG_H
/*******************************************************
** CONFIGURATION
** 09.09.2013 li Strahlungsmesser board atmega168
** 20.09.2013 li Anpassung an das reale board
** 27.09.2013 li Erweiterung eeprom Werte
**/

// --------------------- main.c ---------------------------

#define SPEAKER_DDR   DDRD
#define SPEAKER_PORT  PORTD
#define SPEAKER_BIT   BIT3 

#define SPEAKER_ON  SPEAKER_PORT |= SPEAKER_BIT
#define SPEAKER_OFF SPEAKER_PORT &= ~SPEAKER_BIT

#define LED_DDR   DDRD
#define LED_PORT  PORTD
#define LED_BIT   BIT2 

#define LED_OFF  LED_PORT &= ~LED_BIT
#define LED_ON   LED_PORT |= LED_BIT

#define ADC_BATTERIE_PORT   3
#define ADC_STRAHLUNG_PORT  4
// #define ADC_BAT_MITTE_PORT  5     // not used

#define EEPROM_SIZE   512
#define EEPROM_ENTRY  8

// --------------------- basis.c ---------------------------
#define BA_E99                // edit 99
#define BA_PRUEF              // pruefziffer
//#define BA_EHEX               // edit hex
#define BA_ATOI               // convert ascii to integer

// --------------------- uart.c ---------------------------
#define BAUDRATE 19200UL       // baudrate
#define UART_BUFSIZE_HW  8     // uart hardware buffer

// --------------------- lcd.c ---------------------------
// 27.09.2013 leider geht pwm nicht, Störungen ....  
#define EA_DIP204_4           // Diverse Aenderungen erforderlich

#define LCD_SHIFT     8
#define LCD_CNTL_DDR  DDRB     
#define LCD_CNTL_PORT PORTB

// #define LCD_PWM_OC1B          // Timer1 OC1B erzeugt PWM
// #define LCD_LED_PWM

// #define LCD_PWM_DDR   DDRB
// #define LCD_PWM_PORT  PORTB

                              // ISP Ports über Jumper 
#define LCD_EN        BIT5    // enable (strobe)
#define LCD_DA        BIT4    // DATA input / RS
#define LCD_CP        BIT3    // shift clock 
#define LCD_LED       BIT2    // backlight LED
                              
#define LCD_CHARS      20     // chars per line
#define LCD_LINES       4     // Zeilen

#endif
