create PX4 platform layer initialization helper (#11269)

- starts requirements for PX4 modules (hrt, param, etc)
This commit is contained in:
Daniel Agar
2019-01-22 14:13:20 -05:00
committed by GitHub
parent 65fe3ce5d3
commit 320d2e9383
62 changed files with 327 additions and 560 deletions

View File

@@ -55,7 +55,6 @@
#include <debug.h>
#include <errno.h>
#include "platform/cxxinitialize.h"
#include <nuttx/board.h>
#include <nuttx/spi/spi.h>
#include <nuttx/i2c/i2c_master.h>
@@ -75,11 +74,8 @@
#include <drivers/drv_board_led.h>
#include <systemlib/px4_macros.h>
#include <systemlib/cpuload.h>
#include <perf/perf_counter.h>
#include <systemlib/err.h>
#include <parameters/param.h>
#include <px4_init.h>
#include <px4_i2c.h>
#include "up_internal.h"
@@ -209,13 +205,7 @@ stm32_boardinitialize(void)
__EXPORT int board_app_initialize(uintptr_t arg)
{
/* run C++ ctors before we go any further */
up_cxxinitialize();
/* configure the high-resolution time/callout interface */
hrt_init();
param_init();
px4_platform_init();
/* configure the DMA allocator */
@@ -223,11 +213,6 @@ __EXPORT int board_app_initialize(uintptr_t arg)
PX4_ERR("DMA alloc FAILED");
}
/* configure CPU load estimation */
#ifdef CONFIG_SCHED_INSTRUMENTATION
cpuload_initialize_once();
#endif
/* set up the serial DMA polling */
static struct hrt_call serial_dma_call;
struct timespec ts;