Added JTAG connector to stepper controller interface schematic
[radiotelescope.git] / stepper_controller / arduino / stepper / main.c
1 //\r
2 // Product: Radiotelescope - Stepper Motor Controller\r
3 // Version: 0.1\r
4 // Date:    5 November 2010\r
5 //\r
6 //                                          +-----------------------+\r
7 //                      |   d e c i s i o n s   |\r
8 //                                          +-----------------------+\r
9 //                                          | a n d   d e s i g n s |\r
10 //                      +-----------------------+\r
11 //\r
12 // Copyright (C) 2010 Decisions and Designs Pty Ltd. All rights reserved.\r
13 //\r
14 // This software may be distributed and modified under the terms of the GNU\r
15 // General Public License version 2 (GPL) as published by the Free Software\r
16 // Foundation and appearing in the file GPL.TXT included in the packaging of\r
17 // this file. Please note that GPL Section 2[b] requires that all works based\r
18 // on this software must also be made publicly available under the terms of\r
19 // the GPL ("Copyleft").\r
20 //\r
21 // Contact information:\r
22 // Decisions and Designs Web site: http://www.decisions-and-designs.com.au\r
23 // e-mail:                         [email protected]\r
24 //\r
25 \r
26 #include "radiotelescope.h"                                                                      /* Project */\r
27 #include "qpn_port.h"                                       /* QP-nano port */\r
28 #include "bsp.h"                             /* Board Support Package (BSP) */\r
29 #include "stepper.h"                               /* application interface */\r
30 #include "ui.h"\r
31 \r
32 /*..........................................................................*/\r
33 \r
34 static QEvent  l_azimuthQueue[7];\r
35 static QEvent  l_elevationQueue[7];\r
36 static QEvent  l_UIQueue[7];\r
37 \r
38 /* QF_active[] array defines all active object control blocks --------------*/\r
39 QActiveCB const Q_ROM Q_ROM_VAR QF_active[] = {\r
40     { (QActive *)0,             (QEvent *)0,      0 },\r
41         { (QActive *)&AO_UI,        l_UIQueue,        Q_DIM(l_UIQueue)  },\r
42         { (QActive *)&AO_elevation, l_elevationQueue, Q_DIM(l_elevationQueue)  },\r
43     { (QActive *)&AO_azimuth,   l_azimuthQueue,   Q_DIM(l_azimuthQueue)  }\r
44 };\r
45 \r
46 /* make sure that the QF_active[] array matches QF_MAX_ACTIVE in qpn_port.h */\r
47 Q_ASSERT_COMPILE(QF_MAX_ACTIVE == Q_DIM(QF_active) - 1);\r
48 \r
49 /*..........................................................................*/\r
50 int main (void) {\r
51 \r
52         Stepper_ctor();\r
53         UI_ctor();\r
54 \r
55     BSP_init();                                     /* initialize the board */\r
56 \r
57     QF_run();                                /* transfer control to QP-nano */\r
58 \r
59         return 0;                                                                  /* never reaches end of main */\r
60 }\r

UCC git Repository :: git.ucc.asn.au