X-Git-Url: http://git.smho.de/gw/?a=blobdiff_plain;f=DS2423%2FDS2423.c;h=6a37778f320f53c96ac5b19ce481a7c3e7359e25;hb=59518e632e2269fece0ce6a518e519b3a617ad16;hp=cdca3e46a44e8004688f02a6a70f25d844531d54;hpb=5c60b59e9f305ea8d2e72d62f78ec0d15e3dc42d;p=owSlave2.git diff --git a/DS2423/DS2423.c b/DS2423/DS2423.c index cdca3e4..6a37778 100644 --- a/DS2423/DS2423.c +++ b/DS2423/DS2423.c @@ -1,5 +1,5 @@ -// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de +// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -32,7 +32,6 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define _4_COUNTERS_ -//#define _EEPROM_SAVE_ #define _CPULLUP_ #define F_CPU 8000000UL @@ -43,18 +42,11 @@ #include -#if defined(__AVR_ATtiny25__)||defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) - -#if defined(_4_COUNTERS_)&&defined(_EEPROM_SAVE_) -#error on ATtinyX5 you can not enable four counters and EEPROM save -#endif -#endif - extern void OWINIT(); uint8_t owid[8]={0x1D, 0xA2, 0xD9, 0x84, 0x00, 0x26, 0x02, 0x5C};/**/ -uint8_t config_info[18]={9,13,9,13,9,13,9,13,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //+2 for CRC +uint8_t config_info[26]={9,13,9,13,9,13,9,13,0x02,19,19,19,19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //+2 for CRC @@ -91,20 +83,6 @@ volatile counters_t counters; volatile uint8_t istat; -#if defined(__AVR_ATtiny25__)||defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) -#define PCINT_VECTOR PCINT0_vect -#define PIN_REG PINB -#define PIN_DDR DDRB -#define PIN_CH2 (1<