2 // Product: Radiotelescope - Stepper Motor Controller
\r
4 // Date: 5 November 2010
\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
12 // Copyright (C) 2010 Decisions and Designs Pty Ltd. All rights reserved.
\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
21 // Contact information:
\r
22 // Decisions and Designs Web site: http://www.decisions-and-designs.com.au
\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
32 /*..........................................................................*/
\r
34 static QEvent l_azimuthQueue[7];
\r
35 static QEvent l_elevationQueue[7];
\r
36 static QEvent l_UIQueue[7];
\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
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
49 /*..........................................................................*/
\r
55 BSP_init(); /* initialize the board */
\r
57 QF_run(); /* transfer control to QP-nano */
\r
59 return 0; /* never reaches end of main */
\r