Rev 1910 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1910 | Rev 1976 | ||
|---|---|---|---|
| Line 2... | Line 2... | ||
| 2 | #include "<template>.h" |
2 | #include "<template>.h" |
| 3 | 3 | ||
| 4 | |
4 | #if <template>_USEEEPROM==1 |
| 5 | #include "<template>_eeprom.h" |
5 | #include "<template>_eeprom.h" |
| 6 | struct eeprom_<template> EEMEM eeprom_<template> = |
6 | struct eeprom_<template> EEMEM eeprom_<template> = |
| 7 | { |
7 | { |
| 8 | { |
8 | { |
| 9 | ///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. |
9 | ///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 15... | Line 15... | ||
| 15 | }; |
15 | }; |
| 16 | #endif |
16 | #endif |
| 17 | 17 | ||
| 18 | void <template>_Init(void) |
18 | void <template>_Init(void) |
| 19 | { |
19 | { |
| 20 | |
20 | #if <template>_USEEEPROM==1 |
| 21 | if (EEDATA_OK) |
21 | if (EEDATA_OK) |
| 22 | { |
22 | { |
| 23 | ///TODO: Use stored data to set initial values for the module |
23 | ///TODO: Use stored data to set initial values for the module |
| 24 | blablaX = eeprom_read_byte(EEDATA.x); |
24 | blablaX = eeprom_read_byte(EEDATA.x); |
| 25 | blablaY = eeprom_read_word(EEDATA16.y); |
25 | blablaY = eeprom_read_word(EEDATA16.y); |