Subversion Repositories HomeAutomation

Rev

Rev 1955 | Rev 2007 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1955 Rev 1978
Line 2... Line 2...
2
#include "sns_DHT11.h"
2
#include "sns_DHT11.h"
3
uint8_t sendNewTemp = 0;
3
uint8_t sendNewTemp = 0;
4
uint8_t temperature = 0;
4
uint8_t temperature = 0;
5
uint8_t humidity = 0;
5
uint8_t humidity = 0;
6
 
6
 
7
#ifdef sns_DHT11_USEEEPROM
7
#if sns_DHT11_USEEEPROM==1
8
#include "sns_DHT11_eeprom.h"
8
#include "sns_DHT11_eeprom.h"
9
struct eeprom_sns_DHT11 EEMEM eeprom_sns_DHT11 =
9
struct eeprom_sns_DHT11 EEMEM eeprom_sns_DHT11 =
10
{
10
{
11
    {
11
    {
12
        ///TODO: Define initialization values on the EEPROM variables here, this will generate a *.eep file that can be used to store this values to the node, can in future be done with a EEPROM module and the make-scrips. Write the values in the exact same order as the struct is defined in the *.h file.
12
        ///TODO: Define initialization values on the EEPROM variables here, this will generate a *.eep file that can be used to store this values to the node, can in future be done with a EEPROM module and the make-scrips. Write the values in the exact same order as the struct is defined in the *.h file.
Line 34... Line 34...
34
    Timer_SetTimeout(sns_DHT11_18MS_TIMER, 18, TimerTypeOneShot, &ConvertTemperature2_callback);
34
    Timer_SetTimeout(sns_DHT11_18MS_TIMER, 18, TimerTypeOneShot, &ConvertTemperature2_callback);
35
}
35
}
36
 
36
 
37
void sns_DHT11_Init(void)
37
void sns_DHT11_Init(void)
38
{
38
{
39
#ifdef sns_DHT11_USEEEPROM
39
#if sns_DHT11_USEEEPROM==1
40
    if (EEDATA_OK)
40
    if (EEDATA_OK)
41
    {
41
    {
42
      ///TODO: Use stored data to set initial values for the module
42
      ///TODO: Use stored data to set initial values for the module
43
      blablaX = eeprom_read_byte(EEDATA.x);
43
      blablaX = eeprom_read_byte(EEDATA.x);
44
      blablaY = eeprom_read_word(EEDATA16.y);
44
      blablaY = eeprom_read_word(EEDATA16.y);