Subversion Repositories HomeAutomation

Rev

Rev 151 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 151 Rev 197
Line 43... Line 43...
43
   
43
   
44
    uint32_t timeStamp = 0;
44
    uint32_t timeStamp = 0;
45
   
45
   
46
    Can_Message_t txMsg;
46
    Can_Message_t txMsg;
47
    Can_Message_t rxMsg;
47
    Can_Message_t rxMsg;
48
    txMsg.Id = 0;
48
    //The databytes are just what happens to be in the memory. They are never set.
49
    txMsg.RemoteFlag = 0;
49
    txMsg.RemoteFlag = 0;
50
    txMsg.ExtendedFlag = 1; //DataLength and the databytes are just what happens to be in the memory. They are never set.
50
    txMsg.ExtendedFlag = 1;
-
 
51
#define NODENUMBER 1
-
 
52
#if NODENUMBER == 1
-
 
53
    txMsg.Id = 16;
-
 
54
    txMsg.DataLength = 2;
-
 
55
#elif NODENUMBER == 2
-
 
56
    txMsg.Id = 32;
-
 
57
    txMsg.DataLength = 5;
-
 
58
#else
-
 
59
# error NODENUMBER not set!
-
 
60
#endif
51
   
61
   
52
    /* main loop */
62
    /* main loop */
53
    while (1) {
63
    while (1) {
54
        /* service the CAN routines */
64
        /* service the CAN routines */
55
        Can_Service();
65
        Can_Service();