Subversion Repositories HomeAutomation

Rev

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

Rev 341 Rev 342
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: 2007-02-25 21:15:41 +0100 (Sun, 25 Feb 2007) $
7
 * Last changed:    $LastChangedDate: 2007-02-26 21:38:37 +0100 (Mon, 26 Feb 2007) $
8
 * By:          $LastChangedBy: johboh $
8
 * By:          $LastChangedBy: johboh $
9
 * Revision:        $Revision: 341 $
9
 * Revision:        $Revision: 342 $
10
 ********************************************************************/
10
 ********************************************************************/
11
 
11
 
12
#include <typedefs.h>
12
#include <typedefs.h>
13
 
13
 
14
#define DEFAULT_ID 0x78     // Default ID for bootloader/node when no id is set.
14
#define DEFAULT_ID 0x78     // Default ID for bootloader/node when no id is set.
Line 65... Line 65...
65
// data[0] = new id
65
// data[0] = new id
66
 
66
 
67
typedef enum _PGM_CTRL_TYPE {pctBOOTBOOT=0x0,pctAPPBOOT=0x1,pctHEARTBEAT=0x2} PGM_CTRL_TYPE;
67
typedef enum _PGM_CTRL_TYPE {pctBOOTBOOT=0x0,pctAPPBOOT=0x1,pctHEARTBEAT=0x2} PGM_CTRL_TYPE;
68
// When CAN_PGM_PACKET.type==pcCTRL
68
// When CAN_PGM_PACKET.type==pcCTRL
69
//  When CAN_PGM_PACKET.id==pctBOOTBOOT
69
//  When CAN_PGM_PACKET.id==pctBOOTBOOT
70
//      data[0] = startup reason
70
//      data[2] = startup reason
-
 
71
//      data[1] = Bootloader version high byte.
-
 
72
//      data[0] = Bootloader version low byte.
-
 
73
//  When CAN_PGM_PACKET.id==pctAPPBOOT
-
 
74
//      data[1] = Application version high byte.
-
 
75
//      data[0] = Application version low byte.
71
 
76
 
72
typedef enum _PGM_SENSOR_TYPE   {  
77
typedef enum _PGM_SENSOR_TYPE   {  
73
                    pstIR=0x0,
78
                    pstIR=0x0,
74
                    pstTEMP_INSIDE=0x1, pstTEMP_OUTSIDE=0x2, pstTEMP_FREEZER=0x3, pstTEMP_REFRIGERATOR=0x4,
79
                    pstTEMP_INSIDE=0x1, pstTEMP_OUTSIDE=0x2, pstTEMP_FREEZER=0x3, pstTEMP_REFRIGERATOR=0x4,
75
                    pstDOOR_FREEZER=0x5, pstDOOR_REFRIGERATOR=0x6,
80
                    pstDOOR_FREEZER=0x5, pstDOOR_REFRIGERATOR=0x6,