Subversion Repositories HomeAutomation

Rev

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

Rev 1125 Rev 1446
Line 19... Line 19...
19
#ifdef <template>_USEEEPROM
19
#ifdef <template>_USEEEPROM
20
    if (EEDATA_OK)
20
    if (EEDATA_OK)
21
    {
21
    {
22
      ///TODO: Use stored data to set initial values for the module
22
      ///TODO: Use stored data to set initial values for the module
23
      blablaX = eeprom_read_byte(EEDATA.x);
23
      blablaX = eeprom_read_byte(EEDATA.x);
24
      blablaY = eeprom_read_word(EEDATA.y);
24
      blablaY = eeprom_read_word(EEDATA16.y);
25
    } else
25
    } else
26
    {   //The CRC of the EEPROM is not correct, store default values and update CRC
26
    {   //The CRC of the EEPROM is not correct, store default values and update CRC
27
      eeprom_write_byte_crc(EEDATA.x, 0xAB, WITHOUT_CRC);
27
      eeprom_write_byte_crc(EEDATA.x, 0xAB, WITHOUT_CRC);
28
      eeprom_write_word_crc(EEDATA.y, 0x1234, WITHOUT_CRC);
28
      eeprom_write_word_crc(EEDATA16.y, 0x1234, WITHOUT_CRC);
29
      EEDATA_UPDATE_CRC;
29
      EEDATA_UPDATE_CRC;
30
    }
30
    }
31
#endif  
31
#endif
32
    ///TODO: Initialize hardware etc here
32
    ///TODO: Initialize hardware etc here
33
 
33