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:
Beat Küng
2019-10-25 10:56:32 +02:00
parent fad0c31872
commit 3198610f85
740 changed files with 1502 additions and 1382 deletions
@@ -40,9 +40,9 @@
* @author Dave Royer <dave@aerotenna.com> * @author Dave Royer <dave@aerotenna.com>
*/ */
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <px4_tasks.h> #include <px4_platform_common/tasks.h>
#include <px4_posix.h> #include <px4_platform_common/posix.h>
#include <drivers/drv_adc.h> #include <drivers/drv_adc.h>
#include <VirtDevObj.hpp> #include <VirtDevObj.hpp>
+1 -1
View File
@@ -43,7 +43,7 @@
* Included Files * Included Files
****************************************************************************************************/ ****************************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <nuttx/compiler.h> #include <nuttx/compiler.h>
#include <stdint.h> #include <stdint.h>
+1 -1
View File
@@ -41,7 +41,7 @@
* Included Files * Included Files
************************************************************************************/ ************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
+3 -3
View File
@@ -45,8 +45,8 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <px4_tasks.h> #include <px4_platform_common/tasks.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdio.h> #include <stdio.h>
@@ -71,7 +71,7 @@
#include <drivers/drv_hrt.h> #include <drivers/drv_hrt.h>
#include <drivers/drv_board_led.h> #include <drivers/drv_board_led.h>
#include <px4_init.h> #include <px4_platform_common/init.h>
#include <drivers/boards/common/board_dma_alloc.h> #include <drivers/boards/common/board_dma_alloc.h>
/**************************************************************************** /****************************************************************************
+1 -1
View File
@@ -37,7 +37,7 @@
* PX4FMU LED backend. * PX4FMU LED backend.
*/ */
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <stdbool.h> #include <stdbool.h>
+1 -1
View File
@@ -41,7 +41,7 @@
* Included Files * Included Files
************************************************************************************/ ************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
+1 -1
View File
@@ -41,7 +41,7 @@
* Included Files * Included Files
************************************************************************************/ ************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdint.h> #include <stdint.h>
+2 -2
View File
@@ -37,8 +37,8 @@
* sitl LED backend. * sitl LED backend.
*/ */
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <px4_log.h> #include <px4_platform_common/log.h>
#include <stdbool.h> #include <stdbool.h>
#include <systemlib/px4_macros.h> #include <systemlib/px4_macros.h>
+1 -1
View File
@@ -43,7 +43,7 @@
* Included Files * Included Files
****************************************************************************************************/ ****************************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <nuttx/compiler.h> #include <nuttx/compiler.h>
#include <stdint.h> #include <stdint.h>
+2 -2
View File
@@ -45,7 +45,7 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdio.h> #include <stdio.h>
@@ -67,7 +67,7 @@
#include <drivers/drv_hrt.h> #include <drivers/drv_hrt.h>
#include <drivers/drv_board_led.h> #include <drivers/drv_board_led.h>
#include <px4_init.h> #include <px4_platform_common/init.h>
#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) #if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
#endif #endif
+1 -1
View File
@@ -37,7 +37,7 @@
* PX4ESC LED backend. * PX4ESC LED backend.
*/ */
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <stdbool.h> #include <stdbool.h>
#include <nuttx/board.h> #include <nuttx/board.h>
+1 -1
View File
@@ -41,7 +41,7 @@
* Included Files * Included Files
************************************************************************************/ ************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdint.h> #include <stdint.h>
+1 -1
View File
@@ -43,7 +43,7 @@
* Included Files * Included Files
****************************************************************************************************/ ****************************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <nuttx/compiler.h> #include <nuttx/compiler.h>
#include <stdint.h> #include <stdint.h>
+1 -1
View File
@@ -41,7 +41,7 @@
* Included Files * Included Files
************************************************************************************/ ************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
+3 -3
View File
@@ -45,8 +45,8 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <px4_tasks.h> #include <px4_platform_common/tasks.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdio.h> #include <stdio.h>
@@ -72,7 +72,7 @@
#include <systemlib/px4_macros.h> #include <systemlib/px4_macros.h>
#include <px4_init.h> #include <px4_platform_common/init.h>
#include <drivers/boards/common/board_dma_alloc.h> #include <drivers/boards/common/board_dma_alloc.h>
/**************************************************************************** /****************************************************************************
+1 -1
View File
@@ -37,7 +37,7 @@
* PX4FMU LED backend. * PX4FMU LED backend.
*/ */
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <stdbool.h> #include <stdbool.h>
+1 -1
View File
@@ -41,7 +41,7 @@
* Included Files * Included Files
************************************************************************************/ ************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
+1 -1
View File
@@ -41,7 +41,7 @@
* Included Files * Included Files
************************************************************************************/ ************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdint.h> #include <stdint.h>
+1 -1
View File
@@ -43,7 +43,7 @@
* Included Files * Included Files
****************************************************************************************************/ ****************************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <nuttx/compiler.h> #include <nuttx/compiler.h>
#include <stdint.h> #include <stdint.h>
+2 -2
View File
@@ -69,8 +69,8 @@
#include <drivers/drv_hrt.h> #include <drivers/drv_hrt.h>
#include <drivers/drv_board_led.h> #include <drivers/drv_board_led.h>
#include <systemlib/px4_macros.h> #include <systemlib/px4_macros.h>
#include <px4_init.h> #include <px4_platform_common/init.h>
#include <px4_i2c.h> #include <px4_platform_common/i2c.h>
#include <drivers/boards/common/board_dma_alloc.h> #include <drivers/boards/common/board_dma_alloc.h>
static int configure_switch(void); static int configure_switch(void);
@@ -38,9 +38,9 @@
* *
*/ */
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <px4_tasks.h> #include <px4_platform_common/tasks.h>
#include <px4_posix.h> #include <px4_platform_common/posix.h>
#include <drivers/drv_adc.h> #include <drivers/drv_adc.h>
#include <VirtDevObj.hpp> #include <VirtDevObj.hpp>
+1 -1
View File
@@ -37,7 +37,7 @@
* BBBLUE specific initialization * BBBLUE specific initialization
*/ */
#include <stddef.h> #include <stddef.h>
#include <px4_log.h> #include <px4_platform_common/log.h>
#include <robotcontrol.h> #include <robotcontrol.h>
+1 -1
View File
@@ -43,7 +43,7 @@
* Included Files * Included Files
****************************************************************************************************/ ****************************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <nuttx/compiler.h> #include <nuttx/compiler.h>
#include <stdint.h> #include <stdint.h>
+3 -3
View File
@@ -45,8 +45,8 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <px4_tasks.h> #include <px4_platform_common/tasks.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdio.h> #include <stdio.h>
@@ -67,7 +67,7 @@
#include <drivers/drv_board_led.h> #include <drivers/drv_board_led.h>
#include <systemlib/px4_macros.h> #include <systemlib/px4_macros.h>
#include <px4_init.h> #include <px4_platform_common/init.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-Processor Definitions
+1 -1
View File
@@ -37,7 +37,7 @@
* Crazyflie LED backend. * Crazyflie LED backend.
*/ */
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <stdbool.h> #include <stdbool.h>
+1 -1
View File
@@ -2,7 +2,7 @@
* Included Files * Included Files
************************************************************************************/ ************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
+1 -1
View File
@@ -36,7 +36,7 @@
#ifndef _DRV_CRAZYFLIE_H #ifndef _DRV_CRAZYFLIE_H
#define _DRV_CRAZYFLIE_H #define _DRV_CRAZYFLIE_H
#include <px4_defines.h> #include <px4_platform_common/defines.h>
#include <stdint.h> #include <stdint.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
+1 -1
View File
@@ -40,7 +40,7 @@
*/ */
#include <px4_defines.h> #include <px4_platform_common/defines.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> #include <stdio.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
@@ -36,10 +36,10 @@
* Entry point for syslink module used to communicate with the NRF module on a Crazyflie * Entry point for syslink module used to communicate with the NRF module on a Crazyflie
*/ */
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <px4_tasks.h> #include <px4_platform_common/tasks.h>
#include <px4_posix.h> #include <px4_platform_common/posix.h>
#include <px4_defines.h> #include <px4_platform_common/defines.h>
#include <unistd.h> #include <unistd.h>
#include <stdio.h> #include <stdio.h>
+3 -3
View File
@@ -41,9 +41,9 @@
* @author Nicolae Rosia <nicolae.rosia@gmail.com> * @author Nicolae Rosia <nicolae.rosia@gmail.com>
*/ */
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <px4_tasks.h> #include <px4_platform_common/tasks.h>
#include <px4_posix.h> #include <px4_platform_common/posix.h>
#include <drivers/drv_adc.h> #include <drivers/drv_adc.h>
#include <VirtDevObj.hpp> #include <VirtDevObj.hpp>
@@ -31,7 +31,7 @@
* *
****************************************************************************/ ****************************************************************************/
#include <px4_posix.h> #include <px4_platform_common/posix.h>
#include <drivers/drv_led.h> #include <drivers/drv_led.h>
#include <string.h> #include <string.h>
@@ -31,7 +31,7 @@
* *
****************************************************************************/ ****************************************************************************/
#include <px4_defines.h> #include <px4_platform_common/defines.h>
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
@@ -41,9 +41,9 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <px4_workqueue.h> #include <px4_platform_common/workqueue.h>
#include <px4_defines.h> #include <px4_platform_common/defines.h>
#include <drivers/drv_hrt.h> #include <drivers/drv_hrt.h>
+1 -1
View File
@@ -43,7 +43,7 @@
* Included Files * Included Files
****************************************************************************************************/ ****************************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <nuttx/compiler.h> #include <nuttx/compiler.h>
#include <stdint.h> #include <stdint.h>
+1 -1
View File
@@ -67,7 +67,7 @@
#include <drivers/drv_hrt.h> #include <drivers/drv_hrt.h>
#include <drivers/drv_board_led.h> #include <drivers/drv_board_led.h>
#include <systemlib/px4_macros.h> #include <systemlib/px4_macros.h>
#include <px4_init.h> #include <px4_platform_common/init.h>
#include <drivers/boards/common/board_dma_alloc.h> #include <drivers/boards/common/board_dma_alloc.h>
# if defined(FLASH_BASED_PARAMS) # if defined(FLASH_BASED_PARAMS)
+1 -1
View File
@@ -37,7 +37,7 @@
* LED backend. * LED backend.
*/ */
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <stdbool.h> #include <stdbool.h>
+1 -1
View File
@@ -41,7 +41,7 @@
* Included Files * Included Files
************************************************************************************/ ************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdint.h> #include <stdint.h>
@@ -31,8 +31,8 @@
* *
****************************************************************************/ ****************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <px4_defines.h> #include <px4_platform_common/defines.h>
#include <cstring> #include <cstring>
+1 -1
View File
@@ -46,7 +46,7 @@
* Included Files * Included Files
****************************************************************************************************/ ****************************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <nuttx/compiler.h> #include <nuttx/compiler.h>
#include <stdint.h> #include <stdint.h>
+3 -3
View File
@@ -46,8 +46,8 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <px4_tasks.h> #include <px4_platform_common/tasks.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdio.h> #include <stdio.h>
@@ -69,7 +69,7 @@
#include <dataman/dataman.h> #include <dataman/dataman.h>
#include <systemlib/px4_macros.h> #include <systemlib/px4_macros.h>
#include <px4_init.h> #include <px4_platform_common/init.h>
# if defined(FLASH_BASED_PARAMS) # if defined(FLASH_BASED_PARAMS)
# include <parameters/flashparams/flashfs.h> # include <parameters/flashparams/flashfs.h>
+1 -1
View File
@@ -38,7 +38,7 @@
* AEROFC_V1 LED backend. * AEROFC_V1 LED backend.
*/ */
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <stdbool.h> #include <stdbool.h>
+1 -1
View File
@@ -42,7 +42,7 @@
* Included Files * Included Files
************************************************************************************/ ************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
+1 -1
View File
@@ -43,7 +43,7 @@
* Included Files * Included Files
****************************************************************************************************/ ****************************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <nuttx/compiler.h> #include <nuttx/compiler.h>
#include <stdint.h> #include <stdint.h>
+1 -1
View File
@@ -69,7 +69,7 @@
#include <drivers/drv_hrt.h> #include <drivers/drv_hrt.h>
#include <drivers/drv_board_led.h> #include <drivers/drv_board_led.h>
#include <systemlib/px4_macros.h> #include <systemlib/px4_macros.h>
#include <px4_init.h> #include <px4_platform_common/init.h>
#include <drivers/boards/common/board_dma_alloc.h> #include <drivers/boards/common/board_dma_alloc.h>
/**************************************************************************** /****************************************************************************
+1 -1
View File
@@ -37,7 +37,7 @@
* PX4FMU LED backend. * PX4FMU LED backend.
*/ */
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <stdbool.h> #include <stdbool.h>
+1 -1
View File
@@ -41,7 +41,7 @@
* Included Files * Included Files
************************************************************************************/ ************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdint.h> #include <stdint.h>
+1 -1
View File
@@ -43,7 +43,7 @@
* Included Files * Included Files
****************************************************************************************************/ ****************************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <nuttx/compiler.h> #include <nuttx/compiler.h>
#include <stdint.h> #include <stdint.h>
+1 -1
View File
@@ -68,7 +68,7 @@
#include <drivers/drv_hrt.h> #include <drivers/drv_hrt.h>
#include <drivers/drv_board_led.h> #include <drivers/drv_board_led.h>
#include <systemlib/px4_macros.h> #include <systemlib/px4_macros.h>
#include <px4_init.h> #include <px4_platform_common/init.h>
#include <drivers/boards/common/board_dma_alloc.h> #include <drivers/boards/common/board_dma_alloc.h>
/**************************************************************************** /****************************************************************************
+1 -1
View File
@@ -37,7 +37,7 @@
* LED backend. * LED backend.
*/ */
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <stdbool.h> #include <stdbool.h>
+1 -1
View File
@@ -41,7 +41,7 @@
* Included Files * Included Files
************************************************************************************/ ************************************************************************************/
#include <px4_config.h> #include <px4_platform_common/px4_config.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdint.h> #include <stdint.h>

Some files were not shown because too many files have changed in this diff Show More