restructured everything, dummy file not necessary anymore

This commit is contained in:
Robin Müller 2021-03-23 16:44:43 +01:00
parent 547c788c81
commit f094e9921d
14 changed files with 24 additions and 18 deletions

View File

@ -15,14 +15,7 @@ if(NOT LIB_FSFW_NAME)
message(ERROR "LIB_FSFW_NAME needs to be set as a linkable target") message(ERROR "LIB_FSFW_NAME needs to be set as a linkable target")
endif() endif()
set_property(CACHE TGT_BSP PROPERTY STRINGS add_subdirectory(common)
arm/stm32h743zi-nucleo
arm/raspberrypi
)
target_sources(${LIB_FSFW_HAL_NAME} PRIVATE
Dummy.cpp
)
if(FSFW_HAL_ADD_LINUX) if(FSFW_HAL_ADD_LINUX)
add_subdirectory(${LINUX_HAL_PATH_NAME}) add_subdirectory(${LINUX_HAL_PATH_NAME})
@ -32,6 +25,6 @@ if(FSFW_HAL_ADD_STM32H7)
add_subdirectory(${STM32H7_PATH_NAME}) add_subdirectory(${STM32H7_PATH_NAME})
endif() endif()
target_link_libraries(${LIB_FSFW_HAL_NAME} target_link_libraries(${LIB_FSFW_HAL_NAME} PRIVATE
${LIB_FSFW_NAME} ${LIB_FSFW_NAME}
) )

View File

1
common/CMakeLists.txt Normal file
View File

@ -0,0 +1 @@
add_subdirectory(gpio)

View File

@ -0,0 +1,3 @@
target_sources(${LIB_FSFW_HAL_NAME} PRIVATE
GpioCookie.cpp
)

View File

@ -2,7 +2,4 @@ if(FSFW_HAL_ADD_RASPBERRY_PI)
add_subdirectory(rpi) add_subdirectory(rpi)
endif() endif()
target_sources(${LIB_FSFW_HAL_NAME} PRIVATE add_subdirectory(gpio)
GpioCookie.cpp
LinuxLibgpioIF.cpp
)

12
linux/gpio/CMakeLists.txt Normal file
View File

@ -0,0 +1,12 @@
target_sources(${LIB_FSFW_HAL_NAME} PRIVATE
LinuxLibgpioIF.cpp
)
# This abstraction layer requires the gpiod library. You can install this library
# with "sudo apt-get install -y libgpiod-dev". If you are cross-compiling, you need
# to install the package before syncing the sysroot to your host computer.
find_library(gpiod REQUIRED)
target_link_libraries(${LIB_FSFW_HAL_NAME} PRIVATE
gpiod
)

View File

@ -1,6 +1,6 @@
#include "LinuxLibgpioIF.h" #include "LinuxLibgpioIF.h"
#include "GpioCookie.h" #include "../../common/gpio/GpioCookie.h"
#include "gpioDefinitions.h" #include "../../common/gpio/gpioDefinitions.h"
#include <fsfw/serviceinterface/ServiceInterface.h> #include <fsfw/serviceinterface/ServiceInterface.h>

View File

@ -1,7 +1,7 @@
#ifndef LINUX_GPIO_LINUXLIBGPIOIF_H_ #ifndef LINUX_GPIO_LINUXLIBGPIOIF_H_
#define LINUX_GPIO_LINUXLIBGPIOIF_H_ #define LINUX_GPIO_LINUXLIBGPIOIF_H_
#include "GpioIF.h" #include "../../common/gpio/GpioIF.h"
#include <returnvalues/classIds.h> #include <returnvalues/classIds.h>
#include <fsfw/objectmanager/SystemObject.h> #include <fsfw/objectmanager/SystemObject.h>

View File

@ -1,5 +1,5 @@
#include "GpioRPi.h" #include "GpioRPi.h"
#include "../GpioCookie.h" #include "../../common/gpio/GpioCookie.h"
#include <FSFWConfig.h> #include <FSFWConfig.h>
#include <fsfw/serviceinterface/ServiceInterface.h> #include <fsfw/serviceinterface/ServiceInterface.h>

View File

@ -2,7 +2,7 @@
#define BSP_RPI_GPIO_GPIORPI_H_ #define BSP_RPI_GPIO_GPIORPI_H_
#include <fsfw/returnvalues/HasReturnvaluesIF.h> #include <fsfw/returnvalues/HasReturnvaluesIF.h>
#include "../gpioDefinitions.h" #include "../../common/gpio/gpioDefinitions.h"
class GpioCookie; class GpioCookie;