X-Git-Url: https://git.smho.de/gw/?p=owSlave2.git;a=blobdiff_plain;f=DS2423_DS2423%2FDS2423_DS2423.c;h=1dbd39517045721a08b50e8910e9fd554a102e75;hp=68fb0100239d5d68314199191a5d171ef822e9fd;hb=45806622c08cded7d77c9c9735c433de5f7fa027;hpb=59518e632e2269fece0ce6a518e519b3a617ad16 diff --git a/DS2423_DS2423/DS2423_DS2423.c b/DS2423_DS2423/DS2423_DS2423.c index 68fb010..1dbd395 100644 --- a/DS2423_DS2423/DS2423_DS2423.c +++ b/DS2423_DS2423/DS2423_DS2423.c @@ -47,7 +47,7 @@ extern void EXTERN_SLEEP(void); volatile uint8_t owid1[8]={0x1D, 0x40, 0xDA, 0x84, 0x00, 0x00, 0x05, 0xBD};/**/ volatile uint8_t owid2[8]={0x1D, 0x41, 0xDA, 0x84, 0x00, 0x00, 0x05, 0x8A};/**/ -#if RAMEND>260 //defined(__AVR_ATtiny84__) ||defined(__AVR_ATtiny84A__) +#if RAMEND>260 //defined(__AVR_ATtiny84__) ||defined(__AVR_ATtiny84A__) uint8_t config_info1[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}; //+2 for CRC uint8_t config_info2[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}; //+2 for CRC #endif @@ -75,7 +75,7 @@ typedef union { counterpack_t pack1; //The Memory of both Chips is the same, beause of the small memory of ATTiny44 -#define pack2 pack1 +#define pack2 pack1 volatile uint8_t lastcps; typedef union { @@ -162,6 +162,9 @@ ISR(ANA_COMP_vect) { PORTB&=~(1< minus of Comperator falls down -> output of Comperator rises -#ifdef FHEM_PLATINE + #ifdef FHEM_PLATINE //Switch std AIN1 to A0 ADCSRA&=~(1<Ruecksetzen if ((counters1.c32[2]!=0)||(counters1.c32[3]!=0)||(counters2.c32[2]!=0)||(counters2.c32[3]!=0)) { counters1.c32[0]++; counters2.c32[0]++; for (uint8_t i=2;i<4;i++) { @@ -281,7 +285,7 @@ int main(void){ //count Resets changefromeeprom=1; } } -#endif + #endif MCUCR|=(1<