From d9024b6c221808b01dd001a0c1d7b5eb0f81772b Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Sat, 7 May 2022 13:50:36 +0200 Subject: [PATCH] adaption in DummyGpioIF due to API change in GpioIF --- bsp_te0720_1cfa/OBSWConfig.h.in | 82 +-------------------------------- test/gpio/DummyGpioIF.cpp | 4 +- test/gpio/DummyGpioIF.h | 2 +- 3 files changed, 5 insertions(+), 83 deletions(-) diff --git a/bsp_te0720_1cfa/OBSWConfig.h.in b/bsp_te0720_1cfa/OBSWConfig.h.in index e7af42ad..14867682 100644 --- a/bsp_te0720_1cfa/OBSWConfig.h.in +++ b/bsp_te0720_1cfa/OBSWConfig.h.in @@ -13,51 +13,6 @@ /** All of the following flags should be enabled for mission code */ /*******************************************************************/ -//! Timers can mess up the code when debugging -//! All of this should be enabled for mission code! -#if defined XIPHOS_Q7S - -#define Q7S_EM 0 - -#define OBSW_USE_CCSDS_IP_CORE 1 -// Set to 1 if all telemetry should be sent to the PTME IP Core -#define OBSW_TM_TO_PTME 0 -// Set to 1 if telecommands are received via the PDEC IP Core -#define OBSW_TC_FROM_PDEC 0 - -#define OBSW_ENABLE_TIMERS 1 -#define OBSW_ADD_MGT 1 -#define OBSW_ADD_BPX_BATTERY_HANDLER 1 -#define OBSW_ADD_STAR_TRACKER @OBSW_ADD_STAR_TRACKER@ -#define OBSW_ADD_PLOC_SUPERVISOR 1 -#define OBSW_ADD_PLOC_MPSOC 1 -#define OBSW_ADD_SUN_SENSORS 1 -#define OBSW_ADD_SUS_BOARD_ASS 1 -#define OBSW_ADD_ACS_BOARD 1 -#define OBSW_ADD_ACS_HANDLERS 1 -#define OBSW_ADD_RW 0 -#define OBSW_ADD_RTD_DEVICES 1 -#define OBSW_ADD_TMP_DEVICES 1 -#define OBSW_ADD_RAD_SENSORS 1 -#define OBSW_ADD_PL_PCDU 1 -#define OBSW_ADD_SYRLINKS 0 -#define OBSW_ADD_GPS 1 -#define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0 -#define OBSW_STAR_TRACKER_GROUND_CONFIG 1 -#define OBSW_MPSOC_JTAG_BOOT 0 - -#endif // XIPHOS_Q7S - -// This is a really tricky switch.. It initializes the PCDU switches to their default states -// at powerup. I think it would be better -// to leave it off for now. It makes testing a lot more difficult and it might mess with -// something the operators might want to do by giving the software too much intelligence -// at the wrong place. The system component might command all the Switches accordingly anyway -#define OBSW_INITIALIZE_SWITCHES 0 -#define OBSW_ENABLE_PERIODIC_HK 0 - -#ifdef TE0720_1CFA - #define OBSW_USE_CCSDS_IP_CORE 0 // Set to 1 if all telemetry should be sent to the PTME IP Core #define OBSW_TM_TO_PTME 0 @@ -68,8 +23,8 @@ #define OBSW_ADD_MGT 0 #define OBSW_ADD_BPX_BATTERY_HANDLER 0 #define OBSW_ADD_STAR_TRACKER 0 -#define OBSW_ADD_PLOC_SUPERVISOR 1 -#define OBSW_ADD_PLOC_MPSOC 0 +#define OBSW_ADD_PLOC_SUPERVISOR 0 +#define OBSW_ADD_PLOC_MPSOC 1 #define OBSW_ADD_SUN_SENSORS 0 #define OBSW_ADD_ACS_BOARD 1 #define OBSW_ADD_ACS_HANDLERS 0 @@ -150,40 +105,7 @@ #define OBSW_DEBUG_PLOC_SUPERVISOR 1 #define OBSW_DEBUG_PLOC_MPSOC 1 -#else -#define OBSW_DEBUG_PLOC_SUPERVISOR 1 -#define OBSW_DEBUG_PLOC_MPSOC 1 -#endif - -#ifdef EGSE -#define OBSW_DEBUG_STARTRACKER 1 -#else #define OBSW_DEBUG_STARTRACKER 0 -#endif - -#ifdef RASPBERRY_PI - -#define OBSW_ENABLE_TIMERS 1 -#define OBSW_ADD_STAR_TRACKER 0 -#define OBSW_ADD_PLOC_SUPERVISOR 0 -#define OBSW_ADD_PLOC_MPSOC 0 -#define OBSW_ADD_SUN_SENSORS 0 -#define OBSW_ADD_MGT 0 -#define OBSW_ADD_ACS_BOARD 0 -#define OBSW_ADD_ACS_HANDLERS 0 -#define OBSW_ADD_GPS_0 0 -#define OBSW_ADD_GPS_1 0 -#define OBSW_ADD_RW 0 -#define OBSW_ADD_BPX_BATTERY_HANDLER 0 -#define OBSW_ADD_RTD_DEVICES 0 -#define OBSW_ADD_PL_PCDU 0 -#define OBSW_ADD_TMP_DEVICES 0 -#define OBSW_ADD_RAD_SENSORS 0 -#define OBSW_ADD_SYRLINKS 0 -#define OBSW_STAR_TRACKER_GROUND_CONFIG 1 - -#endif // RASPBERRY_PI - #define OBSW_TCP_SERVER_WIRETAPPING 0 /*******************************************************************/ diff --git a/test/gpio/DummyGpioIF.cpp b/test/gpio/DummyGpioIF.cpp index 2db78eec..3938f711 100644 --- a/test/gpio/DummyGpioIF.cpp +++ b/test/gpio/DummyGpioIF.cpp @@ -10,7 +10,7 @@ ReturnValue_t DummyGpioIF::pullHigh(gpioId_t gpioId) { return RETURN_OK; } ReturnValue_t DummyGpioIF::pullLow(gpioId_t gpioId) { return RETURN_OK; } -ReturnValue_t DummyGpioIF::readGpio(gpioId_t gpioId, int* gpioState) { - *gpioState = 0; +ReturnValue_t DummyGpioIF::readGpio(gpioId_t gpioId, gpio::Levels& gpioState) { + gpioState = gpio::Levels::LOW; return RETURN_OK; } diff --git a/test/gpio/DummyGpioIF.h b/test/gpio/DummyGpioIF.h index e6037628..8a259f00 100644 --- a/test/gpio/DummyGpioIF.h +++ b/test/gpio/DummyGpioIF.h @@ -10,7 +10,7 @@ class DummyGpioIF : public GpioIF { virtual ReturnValue_t addGpios(GpioCookie* cookie); virtual ReturnValue_t pullHigh(gpioId_t gpioId); virtual ReturnValue_t pullLow(gpioId_t gpioId); - virtual ReturnValue_t readGpio(gpioId_t gpioId, int* gpioState); + virtual ReturnValue_t readGpio(gpioId_t gpioId, gpio::Levels& gpioState); }; #endif /* TEST_GPIO_DUMMYGPIOIF_H_ */