Rev 98 | Rev 102 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 98 | Rev 99 | ||
|---|---|---|---|
| Line 2... | Line 2... | ||
| 2 | * |
2 | * |
| 3 | * Defines functs and funccs and other global definitions. |
3 | * Defines functs and funccs and other global definitions. |
| 4 | * |
4 | * |
| 5 | ********************************************************************* |
5 | ********************************************************************* |
| 6 | * FileName: $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/Include/funcdefs.h $ |
6 | * FileName: $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/Include/funcdefs.h $ |
| 7 | * Last changed: $LastChangedDate: 2006-11-15 |
7 | * Last changed: $LastChangedDate: 2006-11-15 09:40:17 +0100 (Wed, 15 Nov 2006) $ |
| 8 | * By: $LastChangedBy: johboh $ |
8 | * By: $LastChangedBy: johboh $ |
| 9 | * Revision: $Revision: |
9 | * Revision: $Revision: 99 $ |
| 10 | ********************************************************************/ |
10 | ********************************************************************/ |
| 11 | 11 | ||
| 12 | 12 | ||
| 13 | 13 | ||
| 14 | //<FUNCT> |
14 | //<FUNCT> |
| Line 29... | Line 29... | ||
| 29 | #define DEFAULT_ID 0x78 // Default ID for bootloader/node when no id is set. |
29 | #define DEFAULT_ID 0x78 // Default ID for bootloader/node when no id is set. |
| 30 | #define DEFAULT_NID 0x00 // Default ID for bootloader/node when no nid is set. |
30 | #define DEFAULT_NID 0x00 // Default ID for bootloader/node when no nid is set. |
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | #define NODE_ID_EE 0x00 // EEPROM first index where to look for ID and NID. |
33 | #define NODE_ID_EE 0x00 // EEPROM first index where to look for ID and NID. |
| 34 | // |
34 | // NODE_ID_EE = NODE_HAS_ID if has correct ID, otherwise use DEFAULT_ID and DEFAULT_NID |
| 35 | // |
35 | // NODE_ID_EE + 1 = ID[1] |
| 36 | // |
36 | // NODE_ID_EE + 2 = ID[0] |
| 37 | // |
37 | // NODE_ID_EE + 3 = NID |
| 38 | 38 | ||
| 39 | #define NODE_HAS_ID 0x2A // Value which indicate valid ID and NID. |
39 | #define NODE_HAS_ID 0x2A // Value which indicate valid ID and NID. |
| - | 40 | ||
| - | 41 | ||
| - | 42 | // Definitions for BOOT packets. Which index in data where things are. |
|
| - | 43 | #define BOOT_DATA_ADDRL_INDEX 0 |
|
| - | 44 | #define BOOT_DATA_ADDRH_INDEX 1 |
|
| - | 45 | #define BOOT_DATA_ADDRU_INDEX 2 |
|
| - | 46 | #define BOOT_DATA_RID_LOW_INDEX 4 |
|
| - | 47 | #define BOOT_DATA_RID_HIGH_INDEX 5 |
|
| - | 48 | #define BOOT_DATA_ERR_INDEX 4 |
|
| - | 49 | ||
| - | 50 | //<ERR> |
|
| - | 51 | // Value in BOOT_DATA_ERR_INDEX |
|
| - | 52 | #define ACK_ERR_NO_ERROR 0x00 //= no error |
|
| - | 53 | #define ACK_ERR_ERROR 0x01 //= error |
|