Subversion Repositories HomeAutomation

Rev

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

Rev 129 Rev 140
Line 1... Line 1...
1
/*********************************************************************
1
/*********************************************************************
2
 *
2
 *
3
 *                  Main application
3
 *                  Main application
4
 *
4
 *
5
 *********************************************************************
5
 *********************************************************************
6
 * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canLCD/Source/Main.c $
6
 * FileName:        $HeadURL: https://svn.auml.se/svn/HomeAutomation/trunk/EmbeddedSoftware/PIC/canLCD/Source/Main.c $
7
 * Last changed:    $LastChangedDate: 2006-11-20 17:54:03 +0100 (Mon, 20 Nov 2006) $
7
 * Last changed:    $LastChangedDate: 2006-11-21 10:28:39 +0100 (Tue, 21 Nov 2006) $
8
 * By:              $LastChangedBy: johboh $
8
 * By:              $LastChangedBy: johboh $
9
 * Revision:        $Revision: 129 $
9
 * Revision:        $Revision: 140 $
10
 ********************************************************************/
10
 ********************************************************************/
11
 
11
 
12
 
12
 
13
#include <compiler.h>
13
#include <compiler.h>
14
#include <stackTasks.h>
14
#include <stackTasks.h>
15
#include <Tick.h>
15
#include <Tick.h>
16
#include <funcdefs.h>
16
#include <funcdefs.h>
17
#include <EEaccess.h>
17
#include <EEaccess.h>
-
 
18
 
-
 
19
#ifdef USE_LCD
-
 
20
    #include "lcd.h"
-
 
21
#endif
18
 
22
 
19
#ifdef USE_CAN
23
#ifdef USE_CAN
20
    #include <CAN.h>
24
    #include <CAN.h>
21
#endif
25
#endif
22
 
26
 
23
static void mainInit(void);
27
static void mainInit(void);
24
 
28
 
25
 
29
 
26
static int MY_ID = DEFAULT_ID;
30
static int MY_ID = DEFAULT_ID;
27
static BYTE MY_NID = DEFAULT_NID;
31
static BYTE MY_NID = DEFAULT_NID;
28
 
32
 
29
void main()
33
void main()
Line 32... Line 36...
32
    CAN_MESSAGE outCm;
36
    CAN_MESSAGE outCm;
33
 
37
 
34
    // Inits
38
    // Inits
35
 
39
 
36
    mainInit();
40
    mainInit();
37
 
41
 
38
    #ifdef USE_CAN
42
    #ifdef USE_CAN
39
        canInit();
43
        canInit();
-
 
44
    #endif
-
 
45
 
-
 
46
    #ifdef USE_LCD
-
 
47
        lcdInit();
-
 
48
        lcdClear();
-
 
49
        lcdPutrs("Welcome!");
40
    #endif
50
    #endif
41
 
51
 
42
    tickInit();
52
    tickInit();
43
 
53
 
44
    // Read ID and NID if exist.
54
    // Read ID and NID if exist.