This commit is contained in:
parent
a4f99b3e78
commit
9958b37fba
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "devConf.h"
|
#include "devConf.h"
|
||||||
#include "gpioInit.h"
|
|
||||||
#include "devices/addresses.h"
|
#include "devices/addresses.h"
|
||||||
#include "devices/gpioIds.h"
|
#include "devices/gpioIds.h"
|
||||||
#include "fsfw/datapoollocal/LocalDataPoolManager.h"
|
#include "fsfw/datapoollocal/LocalDataPoolManager.h"
|
||||||
@ -11,6 +10,7 @@
|
|||||||
#include "fsfw/tmtcpacket/pus/tm.h"
|
#include "fsfw/tmtcpacket/pus/tm.h"
|
||||||
#include "fsfw/tmtcservices/CommandingServiceBase.h"
|
#include "fsfw/tmtcservices/CommandingServiceBase.h"
|
||||||
#include "fsfw/tmtcservices/PusServiceBase.h"
|
#include "fsfw/tmtcservices/PusServiceBase.h"
|
||||||
|
#include "gpioInit.h"
|
||||||
#include "linux/ObjectFactory.h"
|
#include "linux/ObjectFactory.h"
|
||||||
#include "linux/boardtest/LibgpiodTest.h"
|
#include "linux/boardtest/LibgpiodTest.h"
|
||||||
#include "linux/boardtest/SpiTestClass.h"
|
#include "linux/boardtest/SpiTestClass.h"
|
||||||
@ -83,7 +83,6 @@ void ObjectFactory::produce(void* args) {
|
|||||||
createSunSensorComponents(gpioIF, spiComIF, pwrSwitcher, spi::DEV);
|
createSunSensorComponents(gpioIF, spiComIF, pwrSwitcher, spi::DEV);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if OBSW_ADD_TEST_CODE == 1
|
#if OBSW_ADD_TEST_CODE == 1
|
||||||
createTestTasks();
|
createTestTasks();
|
||||||
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#ifndef BSP_LINUX_BOARD_DEFINITIONS_H_
|
#ifndef BSP_LINUX_BOARD_DEFINITIONS_H_
|
||||||
#define BSP_LINUX_BOARD_DEFINITIONS_H_
|
#define BSP_LINUX_BOARD_DEFINITIONS_H_
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
#include "OBSWConfig.h"
|
||||||
|
|
||||||
#ifdef RASPBERRY_PI
|
#ifdef RASPBERRY_PI
|
||||||
|
|
||||||
namespace spi {
|
namespace spi {
|
||||||
@ -29,7 +30,7 @@ static constexpr uint8_t SPI_MUX_2_BCM = 22;
|
|||||||
static constexpr uint8_t SPI_MUX_3_BCM = 23;
|
static constexpr uint8_t SPI_MUX_3_BCM = 23;
|
||||||
static constexpr uint8_t SPI_MUX_4_BCM = 5;
|
static constexpr uint8_t SPI_MUX_4_BCM = 5;
|
||||||
static constexpr uint8_t SPI_MUX_5_BCM = 6;
|
static constexpr uint8_t SPI_MUX_5_BCM = 6;
|
||||||
}
|
} // namespace gpio
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
#include "gpioInit.h"
|
#include "gpioInit.h"
|
||||||
#include "definitions.h"
|
|
||||||
|
|
||||||
#include <devices/gpioIds.h>
|
#include <devices/gpioIds.h>
|
||||||
|
|
||||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||||
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
||||||
#include "fsfw_hal/linux/rpi/GpioRPi.h"
|
|
||||||
#include <fsfw_hal/common/gpio/GpioIF.h>
|
#include <fsfw_hal/common/gpio/GpioIF.h>
|
||||||
|
|
||||||
|
#include "definitions.h"
|
||||||
|
#include "fsfw_hal/linux/rpi/GpioRPi.h"
|
||||||
|
|
||||||
#ifdef RASPBERRY_PI
|
#ifdef RASPBERRY_PI
|
||||||
|
|
||||||
struct MuxInfo {
|
struct MuxInfo {
|
||||||
@ -27,7 +27,7 @@ void rpi::gpio::initSpiCsDecoder(GpioIF* gpioComIF) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::array<::MuxInfo, 6> muxInfo {
|
std::array<::MuxInfo, 6> muxInfo{
|
||||||
MuxInfo(gpioIds::SPI_MUX_BIT_0, SPI_MUX_0_BCM, "SPI_MUX_0"),
|
MuxInfo(gpioIds::SPI_MUX_BIT_0, SPI_MUX_0_BCM, "SPI_MUX_0"),
|
||||||
MuxInfo(gpioIds::SPI_MUX_BIT_1, SPI_MUX_1_BCM, "SPI_MUX_1"),
|
MuxInfo(gpioIds::SPI_MUX_BIT_1, SPI_MUX_1_BCM, "SPI_MUX_1"),
|
||||||
MuxInfo(gpioIds::SPI_MUX_BIT_2, SPI_MUX_2_BCM, "SPI_MUX_2"),
|
MuxInfo(gpioIds::SPI_MUX_BIT_2, SPI_MUX_2_BCM, "SPI_MUX_2"),
|
||||||
@ -37,10 +37,10 @@ void rpi::gpio::initSpiCsDecoder(GpioIF* gpioComIF) {
|
|||||||
};
|
};
|
||||||
GpioCookie* spiMuxGpios = new GpioCookie;
|
GpioCookie* spiMuxGpios = new GpioCookie;
|
||||||
|
|
||||||
for (const auto& info: muxInfo) {
|
for (const auto& info : muxInfo) {
|
||||||
result = createRpiGpioConfig(spiMuxGpios, info.gpioId, info.bcmNum, info.consumer,
|
result = createRpiGpioConfig(spiMuxGpios, info.gpioId, info.bcmNum, info.consumer,
|
||||||
Direction::OUT, Levels::LOW);
|
Direction::OUT, Levels::LOW);
|
||||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
sif::error << "Creating Raspberry Pi SPI Mux GPIO failed with code " << result << std::endl;
|
sif::error << "Creating Raspberry Pi SPI Mux GPIO failed with code " << result << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ namespace gpio {
|
|||||||
*/
|
*/
|
||||||
void initSpiCsDecoder(GpioIF* gpioComIF);
|
void initSpiCsDecoder(GpioIF* gpioComIF);
|
||||||
|
|
||||||
} // namespace gpioCallbacks
|
} // namespace gpio
|
||||||
} // namespace rpi
|
} // namespace rpi
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -339,9 +339,7 @@ gpioId_t HeaterHandler::getGpioIdFromSwitchNr(int switchNr) {
|
|||||||
|
|
||||||
MessageQueueId_t HeaterHandler::getCommandQueue() const { return commandQueue->getId(); }
|
MessageQueueId_t HeaterHandler::getCommandQueue() const { return commandQueue->getId(); }
|
||||||
|
|
||||||
ReturnValue_t HeaterHandler::sendFuseOnCommand(uint8_t fuseNr) {
|
ReturnValue_t HeaterHandler::sendFuseOnCommand(uint8_t fuseNr) { return RETURN_OK; }
|
||||||
return RETURN_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t HeaterHandler::getSwitchState(uint8_t switchNr) const { return 0; }
|
ReturnValue_t HeaterHandler::getSwitchState(uint8_t switchNr) const { return 0; }
|
||||||
|
|
||||||
|
@ -350,9 +350,7 @@ ReturnValue_t PCDUHandler::sendSwitchCommand(uint8_t switchNr, ReturnValue_t onO
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PCDUHandler::sendFuseOnCommand(uint8_t fuseNr) {
|
ReturnValue_t PCDUHandler::sendFuseOnCommand(uint8_t fuseNr) { return RETURN_OK; }
|
||||||
return RETURN_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PCDUHandler::getSwitchState(uint8_t switchNr) const {
|
ReturnValue_t PCDUHandler::getSwitchState(uint8_t switchNr) const {
|
||||||
if (switchNr >= pcduSwitches::NUMBER_OF_SWITCHES) {
|
if (switchNr >= pcduSwitches::NUMBER_OF_SWITCHES) {
|
||||||
|
Loading…
Reference in New Issue
Block a user