mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 10:23:34 +08:00
src/platforms: move all headers to platforms/common/include/px4_platform_common
and remove the px4_ prefix, except for px4_config.h.
command to update includes:
for k in app.h atomic.h cli.h console_buffer.h defines.h getopt.h i2c.h init.h log.h micro_hal.h module.h module_params.h param.h param_macros.h posix.h sem.h sem.hpp shmem.h shutdown.h tasks.h time.h workqueue.h; do for i in $(grep -rl 'include <px4_'$k src platforms boards); do sed -i 's/#include <px4_'$k'/#include <px4_platform_common\/'$k/ $i; done; done
for in $(grep -rl 'include <px4_config.h' src platforms boards); do sed -i 's/#include <px4_config.h/#include <px4_platform_common\/px4_config.h'/ $i; done
Transitional headers for submodules are added (px4_{defines,log,time}.h)
This commit is contained in:
@@ -41,8 +41,8 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "px4_posix.h"
|
||||
#include "drivers/drv_device.h"
|
||||
#include <px4_platform_common/posix.h>
|
||||
#include <drivers/drv_device.h>
|
||||
|
||||
namespace device
|
||||
{
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
#include "Device.hpp"
|
||||
#include <lib/cdev/CDev.hpp>
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_posix.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <px4_platform_common/posix.h>
|
||||
|
||||
/**
|
||||
* Namespace encapsulating all device framework classes, functions and data.
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
/*
|
||||
* Includes here should only cover the needs of the framework definitions.
|
||||
*/
|
||||
#include <px4_config.h>
|
||||
#include <px4_posix.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <px4_platform_common/posix.h>
|
||||
|
||||
#include <drivers/drv_device.h>
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
#include "../CDev.hpp"
|
||||
|
||||
#include <px4_i2c.h>
|
||||
#include <px4_platform_common/i2c.h>
|
||||
|
||||
#if !defined(CONFIG_I2C)
|
||||
# error I2C support requires CONFIG_I2C
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
#include "SPI.hpp"
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#ifndef CONFIG_SPI_EXCHANGE
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
#include "../CDev.hpp"
|
||||
|
||||
#include <px4_i2c.h>
|
||||
#include <px4_platform_common/i2c.h>
|
||||
|
||||
#ifdef __PX4_LINUX
|
||||
#include <linux/i2c.h>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/spi/spidev.h>
|
||||
|
||||
#include <px4_config.h>
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
namespace device
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user