X-Git-Url: http://git.smho.de/gw/?a=blobdiff_plain;f=DS2423_komische%20platine%2FDS2423.c;h=11f51db643cc328c778af1083fdc48711512ccfd;hb=59518e632e2269fece0ce6a518e519b3a617ad16;hp=b1c63325a361758b66efe2928f67db7ac5dd900c;hpb=5c60b59e9f305ea8d2e72d62f78ec0d15e3dc42d;p=owSlave2.git diff --git a/DS2423_komische platine/DS2423.c b/DS2423_komische platine/DS2423.c index b1c6332..11f51db 100644 --- a/DS2423_komische platine/DS2423.c +++ b/DS2423_komische platine/DS2423.c @@ -1,5 +1,5 @@ -// Copyright (c) 2016, 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 @@ -45,7 +45,7 @@ extern void OWINIT(); uint8_t owid[8]={0x1D, 0xA2, 0xD9, 0x84, 0x00, 0x26, 0x02, 0x5C};/**/ -uint8_t config_info[18]={0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +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}; @@ -54,7 +54,7 @@ extern uint8_t gcontrol; extern uint8_t reset_indicator; -volatile uint8_t wdcounter; + @@ -80,7 +80,7 @@ typedef union { volatile counters_t counters; volatile uint8_t istat; - +volatile uint8_t changefromeeprom; #define PCINT_VECTOR PCINT0_vect #define PIN_REG PINA #define PIN_DDR DDRA @@ -111,8 +111,8 @@ ISR(PCINT0_vect) { if (((PIN_REG&PIN_CH1)==0)&&((istat&PIN_CH1)==PIN_CH1)) { counters.c32[1]++; LPORT_CH2|=LPIN_CH2;} if (((PIN_REG&PIN_CH2)==0)&&((istat&PIN_CH2)==PIN_CH2)) { counters.c32[2]++; LPORT_CH2|=LPIN_CH2;} if (((PIN_REG&PIN_CH3)==0)&&((istat&PIN_CH3)==PIN_CH3)) { counters.c32[3]++; LPORT_CH2|=LPIN_CH2;} - - if (((PORT_EE&PIN_EE)==0)&&((istat&PIN_EE)==PIN_EE)) { + changefromeeprom=1; +/* if (((PORT_EE&PIN_EE)==0)&&((istat&PIN_EE)==PIN_EE)) { _delay_ms(50); if (((PORT_EE&PIN_EE)==0)) { @@ -135,7 +135,7 @@ ISR(PCINT0_vect) { } GIFR|=(1<