Subversion Repositories HomeAutomation

Rev

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

Rev 260 Rev 282
Line 2... Line 2...
2
 *
2
 *
3
 *                  CAN module
3
 *                  CAN module
4
 *
4
 *
5
 *********************************************************************
5
 *********************************************************************
6
 * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canBase/Source/CAN.c $
6
 * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canBase/Source/CAN.c $
7
 * Last changed:    $LastChangedDate: 2007-01-28 14:58:11 +0100 (Sun, 28 Jan 2007) $
7
 * Last changed:    $LastChangedDate: 2007-02-03 16:58:13 +0100 (Sat, 03 Feb 2007) $
8
 * By:              $LastChangedBy: johboh $
8
 * By:              $LastChangedBy: johboh $
9
 * Revision:        $Revision: 260 $
9
 * Revision:        $Revision: 282 $
10
 ********************************************************************/
10
 ********************************************************************/
11
 
11
 
12
#include <CANdefs.h>
12
#include <CANdefs.h>
13
#include <stackTasks.h>
13
#include <stackTasks.h>
14
#include <CAN.h>
14
#include <CAN.h>
Line 128... Line 128...
128
    // Send user program startup heatbeat
128
    // Send user program startup heatbeat
129
    outCm.funct                     = FUNCT_BOOTLOADER;
129
    outCm.funct                     = FUNCT_BOOTLOADER;
130
    outCm.funcc                     = FUNCC_BOOT_HEARTBEAT;
130
    outCm.funcc                     = FUNCC_BOOT_HEARTBEAT;
131
    outCm.data_length               = 1;
131
    outCm.data_length               = 1;
132
    outCm.data[BOOT_DATA_HEARTBEAT_INDEX] = HEARTBEAT_USER_STARTUP;
132
    outCm.data[BOOT_DATA_HEARTBEAT_INDEX] = HEARTBEAT_USER_STARTUP;
133
    while(!canSendMessage(outCm,PRIO_HIGH));
133
    canSendMessage(outCm,PRIO_HIGH);
134
 
134
 
135
}
135
}
136
 
136
 
137
 
137
 
138
/*
138
/*
Line 163... Line 163...
163
        // Send alive heartbeat
163
        // Send alive heartbeat
164
        outCm.funct                     = FUNCT_BOOTLOADER;
164
        outCm.funct                     = FUNCT_BOOTLOADER;
165
        outCm.funcc                     = FUNCC_BOOT_HEARTBEAT;
165
        outCm.funcc                     = FUNCC_BOOT_HEARTBEAT;
166
        outCm.data_length               = 1;
166
        outCm.data_length               = 1;
167
        outCm.data[BOOT_DATA_HEARTBEAT_INDEX] = HEARTBEAT_ALIVE;
167
        outCm.data[BOOT_DATA_HEARTBEAT_INDEX] = HEARTBEAT_ALIVE;
168
        while(!canSendMessage(outCm,PRIO_HIGH));
168
        canSendMessage(outCm,PRIO_HIGH);
169
           
169
           
170
        heartbeat = tickGet();
170
        heartbeat = tickGet();
171
    }
171
    }
172
 
172
 
173
    ClrWdt();
173
    ClrWdt();