X-Git-Url: https://git.smho.de/gw/?p=owSlave2.git;a=blobdiff_plain;f=DS2450_SHT2X_MAX44009%2FDS2450_SHT2X_MAX44009.c;h=b5ed22becf5ef2bf2c748880a0e7fb3358165343;hp=b321c9664c603c5cc6070c46cf8b1a7c3370013b;hb=refs%2Fheads%2Fmaster;hpb=3608ace7dd5bd4fa5d7d49224ef770b21596092c diff --git a/DS2450_SHT2X_MAX44009/DS2450_SHT2X_MAX44009.c b/DS2450_SHT2X_MAX44009/DS2450_SHT2X_MAX44009.c index b321c96..b5ed22b 100644 --- a/DS2450_SHT2X_MAX44009/DS2450_SHT2X_MAX44009.c +++ b/DS2450_SHT2X_MAX44009/DS2450_SHT2X_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 @@ -38,14 +38,14 @@ #include #include #include -#include "../common/I2C/USI_TWI_Master.h" +#include "../common/I2C/TWI_Master.h" #include "../common/I2C/SHT2x.h" #include "../common/I2C/MAX44009.h" extern void OWINIT(); extern void EXTERN_SLEEP(); uint8_t owid[8]={0x20, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x02, 0x5D};/**/ -uint8_t config_info[16]={0x01,14,0x04,0x08, 0x03,15, 0x06,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; +uint8_t config_info[26]={0x01,14,0x04,0x08, 0x03,15,0,0,2,7,7,15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; #if (owid>128) #error "Variable not correct" @@ -165,7 +165,7 @@ int main(void){ gcontrol=1; - USI_TWI_Master_Initialise(); + TWI_Master_Initialise(); SHT2x_SoftReset(); SHT2x_ReadUserRegister(userRegister); //(userRegister & ~SHT2x_RES_MASK) | SHT2x_RES_10_13BIT; @@ -309,7 +309,7 @@ int main(void){ MCUCR|=(1<