X-Git-Url: http://git.smho.de/gw/?a=blobdiff_plain;f=DS18B20_MAX44009%2FDS18B20_MAX44009.c;h=1ebcf7cf7c81a51a94175e449a0e5e9a8091f7be;hb=81a79648a168a1167c5ad97d4068621c1751a353;hp=edf1be33b43464ce03340cf2663c2ba25352a477;hpb=a6a04f58e4afd20f206fdf4a8a7b3ce4062f1b67;p=owSlave2.git diff --git a/DS18B20_MAX44009/DS18B20_MAX44009.c b/DS18B20_MAX44009/DS18B20_MAX44009.c index edf1be3..1ebcf7c 100644 --- a/DS18B20_MAX44009/DS18B20_MAX44009.c +++ b/DS18B20_MAX44009/DS18B20_MAX44009.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 @@ -40,25 +40,13 @@ #include #include "../common/I2C/USI_TWI_Master.h" #include "../common/I2C/MAX44009.h" +#include "../common/owSlave_tools.h" - -extern void OWINIT(); - -extern void EXTERN_SLEEP(); - - +OWST_EXTERN_VARS +//-D__4MHZ__ uint8_t owid[8]={0x28, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x77, 0x6B};/**/ -uint8_t config_info[16]={0x03,0x04, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +uint8_t config_info[26]={0x03,0x04, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x02,15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; -#if (owid>128) -#error "Variable not correct" -#endif - -extern uint8_t mode; -extern uint8_t gcontrol; -extern uint8_t reset_indicator; -extern uint8_t alarmflag; - uint8_t max_adr=0; @@ -84,7 +72,7 @@ volatile pack_t pack; int main(void){ - PRR|=(1<