tm3d
/
owSlave2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Many changes from 2018
[owSlave2.git]
/
DS2450_SHT2X_MAX44009
/
DS2450_SHT2X_MAX44009.c
diff --git
a/DS2450_SHT2X_MAX44009/DS2450_SHT2X_MAX44009.c
b/DS2450_SHT2X_MAX44009/DS2450_SHT2X_MAX44009.c
index
e6f570a
..
b5ed22b
100644
(file)
--- a/
DS2450_SHT2X_MAX44009/DS2450_SHT2X_MAX44009.c
+++ b/
DS2450_SHT2X_MAX44009/DS2450_SHT2X_MAX44009.c
@@
-1,5
+1,5
@@
\r
\r
-// Copyright (c) 201
5
, Tobias Mueller tm(at)tm3d.de
\r
+// Copyright (c) 201
7
, Tobias Mueller tm(at)tm3d.de
\r
// All rights reserved.
\r
//
\r
// Redistribution and use in source and binary forms, with or without
\r
// All rights reserved.
\r
//
\r
// Redistribution and use in source and binary forms, with or without
\r
@@
-38,14
+38,14
@@
#include <avr/wdt.h>
\r
#include <avr/sleep.h>
\r
#include <avr/pgmspace.h>
\r
#include <avr/wdt.h>
\r
#include <avr/sleep.h>
\r
#include <avr/pgmspace.h>
\r
-#include "../common/I2C/
USI_
TWI_Master.h"
\r
+#include "../common/I2C/TWI_Master.h"
\r
#include "../common/I2C/SHT2x.h"
\r
#include "../common/I2C/MAX44009.h"
\r
extern void OWINIT();
\r
extern void EXTERN_SLEEP();
\r
\r
uint8_t owid[8]={0x20, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x02, 0x5D};/**/
\r
#include "../common/I2C/SHT2x.h"
\r
#include "../common/I2C/MAX44009.h"
\r
extern void OWINIT();
\r
extern void EXTERN_SLEEP();
\r
\r
uint8_t owid[8]={0x20, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x02, 0x5D};/**/
\r
-uint8_t config_info[
18]={0x01,14,0x04,0x08, 0x03,15, 0x06,0x09
,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
\r
+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};
\r
\r
#if (owid>128)
\r
#error "Variable not correct"
\r
\r
#if (owid>128)
\r
#error "Variable not correct"
\r
@@
-165,7
+165,7
@@
int main(void){
\r
gcontrol=1;
\r
\r
\r
gcontrol=1;
\r
\r
-
USI_
TWI_Master_Initialise();
\r
+ TWI_Master_Initialise();
\r
SHT2x_SoftReset();
\r
SHT2x_ReadUserRegister(userRegister);
\r
//(userRegister & ~SHT2x_RES_MASK) | SHT2x_RES_10_13BIT;
\r
SHT2x_SoftReset();
\r
SHT2x_ReadUserRegister(userRegister);
\r
//(userRegister & ~SHT2x_RES_MASK) | SHT2x_RES_10_13BIT;
\r
@@
-309,7
+309,7
@@
int main(void){
MCUCR|=(1<<SE);
\r
MCUCR&=~(1<<SM1);
\r
}
\r
MCUCR|=(1<<SE);
\r
MCUCR&=~(1<<SM1);
\r
}
\r
-
//
asm("SLEEP");
\r
+
asm("SLEEP");
\r
}
\r
\r
\r
}
\r
\r
\r