2 ******************************************************************************
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
6 * @brief Defines board specific static initializers for hardware for the OpenPilot board.
7 * @see The GNU Public License (GPL) Version 3
9 *****************************************************************************/
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 3 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 * You should have received a copy of the GNU General Public License along
22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #include "inc/openpilot.h"
27 #include <pios_udp_priv.h>
28 #include <pios_com_priv.h>
29 #include <uavobjectsinit.h>
33 * initializes all the core systems on this specific hardware
34 * called from System/openpilot.c
36 void PIOS_Board_Init(void)
41 /* Initialize the delayed callback library */
42 PIOS_CALLBACKSCHEDULER_Initialize();
44 /* Initialize UAVObject libraries */
45 EventDispatcherInitialize();
48 /* Initialize the alarms library */
51 /* Initialize the task monitor */
52 if (PIOS_TASK_MONITOR_Initialize(TASKINFO_RUNNING_NUMELEM
)) {
56 /* Initialize the PiOS library */
61 const struct pios_udp_cfg pios_udp0_cfg
= {
65 const struct pios_udp_cfg pios_udp1_cfg
= {
69 const struct pios_udp_cfg pios_udp2_cfg
= {
78 const struct pios_udp_cfg pios_udp3_cfg
= {
85 * Board specific number of devices.
87 struct pios_udp_dev pios_udp_devs
[] = {
88 #define PIOS_UDP_TELEM 0
90 .cfg
= &pios_udp0_cfg
,
92 #define PIOS_UDP_GPS 1
94 .cfg
= &pios_udp1_cfg
,
96 #define PIOS_UDP_LOCAL 2
98 .cfg
= &pios_udp2_cfg
,
101 #define PIOS_UDP_AUX 3
103 .cfg
= &pios_udp3_cfg
,
108 uint8_t pios_udp_num_devices
= NELEMENTS(pios_udp_devs
);
115 * Board specific number of devices.
117 extern const struct pios_com_driver pios_serial_com_driver
;
118 extern const struct pios_com_driver pios_udp_com_driver
;
120 struct pios_com_dev pios_com_devs
[] = {
122 .id
= PIOS_UDP_TELEM
,
123 .driver
= &pios_udp_com_driver
,
127 .driver
= &pios_udp_com_driver
,
130 .id
= PIOS_UDP_LOCAL
,
131 .driver
= &pios_udp_com_driver
,
136 .driver
= &pios_udp_com_driver
,
141 const uint8_t pios_com_num_devices
= NELEMENTS(pios_com_devs
);