X-Git-Url: https://git.smho.de/gw/?a=blobdiff_plain;f=DS2423_komische%20platine%2FDS2423.c;h=11f51db643cc328c778af1083fdc48711512ccfd;hb=2490e261a78b2a98ee2a9b8fc19cb3f20225926b;hp=2cf20e3b3d838e5535d1f36c075293db18dd587c;hpb=3608ace7dd5bd4fa5d7d49224ef770b21596092c;p=owSlave2.git diff --git a/DS2423_komische platine/DS2423.c b/DS2423_komische platine/DS2423.c index 2cf20e3..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[16]={0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,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<