mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-16 08:29:15 +01:00
LP-97 - Move board init function declarations to a pios_board_init.h, fix some headers
This commit is contained in:
parent
970ae3df00
commit
70faa04b0a
@ -61,6 +61,8 @@
|
||||
#include <pios_flashfs.h>
|
||||
#include <pios_notify.h>
|
||||
#include <pios_task_monitor.h>
|
||||
#include <pios_board_init.h>
|
||||
|
||||
|
||||
#ifdef PIOS_INCLUDE_INSTRUMENTATION
|
||||
#include <instrumentation.h>
|
||||
@ -120,7 +122,6 @@ static void systemTask(void *parameters);
|
||||
static void updateI2Cstats();
|
||||
static void updateWDGstats();
|
||||
#endif
|
||||
extern void PIOS_Board_Init(void);
|
||||
|
||||
extern uintptr_t pios_uavo_settings_fs_id;
|
||||
extern uintptr_t pios_user_fs_id;
|
||||
|
31
flight/pios/inc/pios_board_init.h
Normal file
31
flight/pios/inc/pios_board_init.h
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file pios_board_init.h
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015.
|
||||
* @brief board initialization prototypes
|
||||
* --
|
||||
* @see The GNU Public License (GPL) Version 3
|
||||
*
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#ifndef PIOS_BOARD_INIT_H
|
||||
#define PIOS_BOARD_INIT_H
|
||||
|
||||
extern void PIOS_Board_Init(void);
|
||||
|
||||
#endif /* PIOS_BOARD_INIT_H */
|
@ -33,9 +33,8 @@
|
||||
#include <pios_iap.h>
|
||||
#include <fifo_buffer.h>
|
||||
#include <pios_com_msg.h>
|
||||
#include <pios_board_init.h>
|
||||
|
||||
/* Prototype of PIOS_Board_Init() function */
|
||||
extern void PIOS_Board_Init(void);
|
||||
extern void FLASH_Download();
|
||||
#define BSL_HOLD_STATE ((PIOS_USB_DETECT_GPIO_PORT->IDR & PIOS_USB_DETECT_GPIO_PIN) ? 0 : 1)
|
||||
|
||||
|
@ -155,7 +155,6 @@ static const struct pios_mpu6000_cfg pios_mpu6000_cfg = {
|
||||
int32_t init_test;
|
||||
void PIOS_Board_Init(void)
|
||||
{
|
||||
|
||||
const struct pios_board_info *bdinfo = &pios_board_info_blob;
|
||||
|
||||
#if defined(PIOS_INCLUDE_LED)
|
||||
|
@ -34,9 +34,8 @@
|
||||
#include <pios_com_msg.h>
|
||||
#include <pios_usbhook.h> /* PIOS_USBHOOK_* */
|
||||
#include <stdbool.h>
|
||||
#include <pios_board_init.h>
|
||||
|
||||
/* Prototype of PIOS_Board_Init() function */
|
||||
extern void PIOS_Board_Init(void);
|
||||
extern void FLASH_Download();
|
||||
void check_bor();
|
||||
#define BSL_HOLD_STATE ((PIOS_USB_DETECT_GPIO_PORT->IDR & PIOS_USB_DETECT_GPIO_PIN) ? 0 : 1)
|
||||
|
@ -36,9 +36,8 @@
|
||||
#include <pios_com.h>
|
||||
#include <ssp.h>
|
||||
#include <pios_delay.h>
|
||||
#include <pios_board_init.h>
|
||||
|
||||
/* Prototype of PIOS_Board_Init() function */
|
||||
extern void PIOS_Board_Init(void);
|
||||
extern void FLASH_Download();
|
||||
int32_t platform_senddata(const uint8_t *msg, uint16_t msg_len);
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
|
@ -34,14 +34,13 @@
|
||||
#include "inc/openpilot.h"
|
||||
#include <uavobjectsinit.h>
|
||||
#include <hwsettings.h>
|
||||
#include <pios_board_init.h>
|
||||
|
||||
/* Task Priorities */
|
||||
#define PRIORITY_TASK_HOOKS (tskIDLE_PRIORITY + 3)
|
||||
|
||||
/* Global Variables */
|
||||
|
||||
/* Prototype of PIOS_Board_Init() function */
|
||||
extern void PIOS_Board_Init(void);
|
||||
extern void Stack_Change(void);
|
||||
|
||||
/**
|
||||
|
@ -33,9 +33,8 @@
|
||||
#include <pios_iap.h>
|
||||
#include <fifo_buffer.h>
|
||||
#include <pios_com_msg.h>
|
||||
#include <pios_board_init.h>
|
||||
|
||||
/* Prototype of PIOS_Board_Init() function */
|
||||
extern void PIOS_Board_Init(void);
|
||||
extern void FLASH_Download();
|
||||
#define BSL_HOLD_STATE ((PIOS_USB_DETECT_GPIO_PORT->IDR & PIOS_USB_DETECT_GPIO_PIN) ? 0 : 1)
|
||||
|
||||
|
@ -34,14 +34,13 @@
|
||||
#include "inc/openpilot.h"
|
||||
#include <uavobjectsinit.h>
|
||||
#include <hwsettings.h>
|
||||
#include <pios_board_init.h>
|
||||
|
||||
/* Task Priorities */
|
||||
#define PRIORITY_TASK_HOOKS (tskIDLE_PRIORITY + 3)
|
||||
|
||||
/* Global Variables */
|
||||
|
||||
/* Prototype of PIOS_Board_Init() function */
|
||||
extern void PIOS_Board_Init(void);
|
||||
extern void Stack_Change(void);
|
||||
|
||||
/**
|
||||
|
@ -34,9 +34,8 @@
|
||||
#include <pios_com_msg.h>
|
||||
#include <pios_usbhook.h> /* PIOS_USBHOOK_* */
|
||||
#include <stdbool.h>
|
||||
#include <pios_board_init.h>
|
||||
|
||||
/* Prototype of PIOS_Board_Init() function */
|
||||
extern void PIOS_Board_Init(void);
|
||||
extern void FLASH_Download();
|
||||
#define BSL_HOLD_STATE ((PIOS_USB_DETECT_GPIO_PORT->IDR & PIOS_USB_DETECT_GPIO_PIN) ? 0 : 1)
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
* @addtogroup LibrePilotSystem LibrePilot System
|
||||
* @brief These files are the core system files for Revolution.
|
||||
* They are the ground layer just above PiOS. In practice, OSD actually starts
|
||||
* in the main() function of osd.c
|
||||
* in the main() function of osd.cpp
|
||||
* @{
|
||||
* @addtogroup LibrePilotCore LibrePilot Core
|
||||
* @brief This is where the LP firmware starts. Those files also define the compile-time
|
||||
|
@ -34,9 +34,8 @@
|
||||
#include <pios_com_msg.h>
|
||||
#include <pios_usbhook.h> /* PIOS_USBHOOK_* */
|
||||
#include <stdbool.h>
|
||||
#include <pios_board_init.h>
|
||||
|
||||
/* Prototype of PIOS_Board_Init() function */
|
||||
extern void PIOS_Board_Init(void);
|
||||
extern void FLASH_Download();
|
||||
void check_bor();
|
||||
#define BSL_HOLD_STATE ((PIOS_USB_DETECT_GPIO_PORT->IDR & PIOS_USB_DETECT_GPIO_PIN) ? 0 : 1)
|
||||
|
@ -3,7 +3,7 @@
|
||||
* @addtogroup LibrePilotSystem LibrePilot System
|
||||
* @brief These files are the core system files for Revolution.
|
||||
* They are the ground layer just above PiOS. In practice, Revolution actually starts
|
||||
* in the main() function of revolution.c
|
||||
* in the main() function of revolution.cpp
|
||||
* @{
|
||||
* @addtogroup LibrePilotCore LibrePilot Core
|
||||
* @brief This is where the LP firmware starts. Those files also define the compile-time
|
||||
|
@ -34,9 +34,8 @@
|
||||
#include <pios_com_msg.h>
|
||||
#include <pios_usbhook.h> /* PIOS_USBHOOK_* */
|
||||
#include <stdbool.h>
|
||||
#include <pios_board_init.h>
|
||||
|
||||
/* Prototype of PIOS_Board_Init() function */
|
||||
extern void PIOS_Board_Init(void);
|
||||
extern void FLASH_Download();
|
||||
void check_bor();
|
||||
#define BSL_HOLD_STATE ((PIOS_USB_DETECT_GPIO_PORT->IDR & PIOS_USB_DETECT_GPIO_PIN) ? 0 : 1)
|
||||
|
@ -3,7 +3,7 @@
|
||||
* @addtogroup LibrePilotSystem LibrePilot System
|
||||
* @brief These files are the core system files for Revolution.
|
||||
* They are the ground layer just above PiOS. In practice, Revolution actually starts
|
||||
* in the main() function of revolution.c
|
||||
* in the main() function of revolution.cpp
|
||||
* @{
|
||||
* @addtogroup LibrePilotCore LibrePilot Core
|
||||
* @brief This is where the LP firmware starts. Those files also define the compile-time
|
||||
|
@ -34,9 +34,8 @@
|
||||
#include <pios_com_msg.h>
|
||||
#include <pios_usbhook.h> /* PIOS_USBHOOK_* */
|
||||
#include <stdbool.h>
|
||||
#include <pios_board_init.h>
|
||||
|
||||
/* Prototype of PIOS_Board_Init() function */
|
||||
extern void PIOS_Board_Init(void);
|
||||
extern void FLASH_Download();
|
||||
void check_bor();
|
||||
#define BSL_HOLD_STATE ((PIOS_USB_DETECT_GPIO_PORT->IDR & PIOS_USB_DETECT_GPIO_PIN) ? 0 : 1)
|
||||
|
@ -3,7 +3,7 @@
|
||||
* @addtogroup LibrePilotSystem LibrePilot System
|
||||
* @brief These files are the core system files for Revolution.
|
||||
* They are the ground layer just above PiOS. In practice, Revolution actually starts
|
||||
* in the main() function of revolution.c
|
||||
* in the main() function of revolution.cpp
|
||||
* @{
|
||||
* @addtogroup LibrePilotCore LibrePilot Core
|
||||
* @brief This is where the LP firmware starts. Those files also define the compile-time
|
||||
|
@ -30,10 +30,10 @@
|
||||
#include <pios_board_info.h>
|
||||
#include <stdbool.h>
|
||||
#include <pios_bl_helper.h>
|
||||
#include <pios_board_init.h>
|
||||
|
||||
#define MAX_WRI_RETRYS 3
|
||||
/* Prototype of PIOS_Board_Init() function */
|
||||
extern void PIOS_Board_Init(void);
|
||||
|
||||
extern void FLASH_Download();
|
||||
void error(int, int);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user