Subversion Repositories HomeAutomation

Rev

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

Rev 87 Rev 89
Line 2... Line 2...
2
 *
2
 *
3
 *                  Main application
3
 *                  Main application
4
 *
4
 *
5
 *********************************************************************
5
 *********************************************************************
6
 * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canBase/Source/Main.c $
6
 * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canBase/Source/Main.c $
7
 * Last changed:    $LastChangedDate: 2006-11-14 11:20:48 +0100 (Tue, 14 Nov 2006) $
7
 * Last changed:    $LastChangedDate: 2006-11-14 11:44:48 +0100 (Tue, 14 Nov 2006) $
8
 * By:              $LastChangedBy: johboh $
8
 * By:              $LastChangedBy: johboh $
9
 * Revision:        $Revision: 87 $
9
 * Revision:        $Revision: 89 $
10
 ********************************************************************/
10
 ********************************************************************/
11
 
11
 
12
 
12
 
13
#include <compiler.h>
13
#include <compiler.h>
14
#include <stackTasks.h>
14
#include <stackTasks.h>
Line 55... Line 55...
55
 
55
 
56
 
56
 
57
#pragma interrupt high_isr
57
#pragma interrupt high_isr
58
void high_isr(void)
58
void high_isr(void)
59
{
59
{
-
 
60
    ClrWdt();
60
 
61
 
61
    #ifdef USE_CAN
62
    #ifdef USE_CAN
62
        canISR();
63
        canISR();
63
    #endif
64
    #endif
64
 
65
 
65
    tickUpdate();
66
    tickUpdate();
-
 
67
 
66
}
68
}
67
 
69
 
68
 
70
 
69
#pragma interrupt low_isr
71
#pragma interrupt low_isr
70
void low_isr(void)
72
void low_isr(void)
71
{
73
{
72
 
74
 
73
}
75
}
74
 
76
 
75
 
77
 
76
 
78
 
77
/*
79
/*
78
*   Function: mainInit
80
*   Function: mainInit
79
*
81
*
80
*   Input:  none
82
*   Input:  none
81
*   Output: none
83
*   Output: none
82
*   Pre-conditions: none
84
*   Pre-conditions: none
Line 107... Line 109...
107
*   Depends: none.
109
*   Depends: none.
108
*/
110
*/
109
#ifdef USE_CAN
111
#ifdef USE_CAN
110
void canParse(CAN_MESSAGE cm)
112
void canParse(CAN_MESSAGE cm)
111
{
113
{
-
 
114
    ClrWdt();
-
 
115
 
112
    switch(cm.funct)
116
    switch(cm.funct)
113
    {
117
    {
114
        case FUNCT_BOOTLOADER:
118
        case FUNCT_BOOTLOADER:
115
            if (cm.funcc==FUNCC_BOOT_INIT) { Reset(); }
119
            if (cm.funcc==FUNCC_BOOT_INIT) { Reset(); }
116
        break;
120
        break;