Merge pull request 'Update FSFW and minor improvements' (#102) from mueller/update-gpio into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #102 Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
This commit is contained in:
commit
90bd6b1fc1
@ -173,9 +173,13 @@ void initmission::createPstTasks(TaskFactory& factory,
|
||||
missedDeadlineFunc);
|
||||
result = pst::pstSpi(spiPst);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
|
||||
if(result != FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
|
||||
}
|
||||
}
|
||||
else {
|
||||
taskVec.push_back(spiPst);
|
||||
}
|
||||
taskVec.push_back(spiPst);
|
||||
#endif
|
||||
|
||||
FixedTimeslotTaskIF* uartPst = factory.createFixedTimeslotTask(
|
||||
|
@ -284,43 +284,43 @@ void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF *gpioComIF, SpiComI
|
||||
GpioCookie* gpioCookieSus = new GpioCookie();
|
||||
GpioCallback* susgpio = nullptr;
|
||||
|
||||
susgpio = new GpioCallback("Chip select SUS 1", gpio::OUT, 1,
|
||||
susgpio = new GpioCallback("Chip select SUS 1", gpio::OUT, gpio::HIGH,
|
||||
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_1, susgpio);
|
||||
susgpio = new GpioCallback("Chip select SUS 2", gpio::OUT, 1,
|
||||
susgpio = new GpioCallback("Chip select SUS 2", gpio::OUT, gpio::HIGH,
|
||||
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_2, susgpio);
|
||||
susgpio = new GpioCallback("Chip select SUS 3", gpio::OUT, 1,
|
||||
susgpio = new GpioCallback("Chip select SUS 3", gpio::OUT, gpio::HIGH,
|
||||
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_3, susgpio);
|
||||
susgpio = new GpioCallback("Chip select SUS 4", gpio::OUT, 1,
|
||||
susgpio = new GpioCallback("Chip select SUS 4", gpio::OUT, gpio::HIGH,
|
||||
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_4, susgpio);
|
||||
susgpio = new GpioCallback("Chip select SUS 5", gpio::OUT, 1,
|
||||
susgpio = new GpioCallback("Chip select SUS 5", gpio::OUT, gpio::HIGH,
|
||||
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_5, susgpio);
|
||||
susgpio = new GpioCallback("Chip select SUS 6", gpio::OUT, 1,
|
||||
susgpio = new GpioCallback("Chip select SUS 6", gpio::OUT, gpio::HIGH,
|
||||
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_6, susgpio);
|
||||
susgpio = new GpioCallback("Chip select SUS 7", gpio::OUT, 1,
|
||||
susgpio = new GpioCallback("Chip select SUS 7", gpio::OUT, gpio::HIGH,
|
||||
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_7, susgpio);
|
||||
susgpio = new GpioCallback("Chip select SUS 8", gpio::OUT, 1,
|
||||
susgpio = new GpioCallback("Chip select SUS 8", gpio::OUT, gpio::HIGH,
|
||||
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_8, susgpio);
|
||||
susgpio = new GpioCallback("Chip select SUS 9", gpio::OUT, 1,
|
||||
susgpio = new GpioCallback("Chip select SUS 9", gpio::OUT, gpio::HIGH,
|
||||
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_9, susgpio);
|
||||
susgpio = new GpioCallback("Chip select SUS 10", gpio::OUT, 1,
|
||||
susgpio = new GpioCallback("Chip select SUS 10", gpio::OUT, gpio::HIGH,
|
||||
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_10, susgpio);
|
||||
susgpio = new GpioCallback("Chip select SUS 11", gpio::OUT, 1,
|
||||
susgpio = new GpioCallback("Chip select SUS 11", gpio::OUT, gpio::HIGH,
|
||||
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_11, susgpio);
|
||||
susgpio = new GpioCallback("Chip select SUS 12", gpio::OUT, 1,
|
||||
susgpio = new GpioCallback("Chip select SUS 12", gpio::OUT, gpio::HIGH,
|
||||
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_12, susgpio);
|
||||
susgpio = new GpioCallback("Chip select SUS 13", gpio::OUT, 1,
|
||||
susgpio = new GpioCallback("Chip select SUS 13", gpio::OUT, gpio::HIGH,
|
||||
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_13, susgpio);
|
||||
|
||||
|
@ -53,7 +53,7 @@ void initSpiCsDecoder(GpioIF* gpioComIF) {
|
||||
}
|
||||
}
|
||||
|
||||
void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, int value,
|
||||
void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, gpio::Levels value,
|
||||
void* args) {
|
||||
|
||||
if (gpioComInterface == nullptr) {
|
||||
@ -67,10 +67,10 @@ void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, int value
|
||||
return;
|
||||
}
|
||||
|
||||
if (value == 1) {
|
||||
if (value == gpio::HIGH) {
|
||||
disableAllDecoder();
|
||||
}
|
||||
else if (value == 0) {
|
||||
else if (value == gpio::LOW) {
|
||||
switch (gpioId) {
|
||||
case(gpioIds::RTD_IC3): {
|
||||
enableDecoderTcsIc1();
|
||||
|
@ -17,7 +17,8 @@ namespace gpioCallbacks {
|
||||
* @brief This function implements the decoding to multiply gpios by using the decoder
|
||||
* chips SN74LVC138APWR on the TCS board and the interface board.
|
||||
*/
|
||||
void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, int value, void* args);
|
||||
void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp,
|
||||
gpio::Levels value, void* args);
|
||||
|
||||
/**
|
||||
* @brief This function sets mux bits 1-3 to a state which will only enable the decoder
|
||||
|
@ -4,7 +4,7 @@
|
||||
const char* const SW_NAME = "eive";
|
||||
|
||||
#define SW_VERSION 1
|
||||
#define SW_SUBVERSION 7
|
||||
#define SW_SUBVERSION 8
|
||||
#define SW_REVISION 0
|
||||
|
||||
#endif /* COMMON_CONFIG_OBSWVERSION_H_ */
|
||||
|
@ -7,8 +7,6 @@
|
||||
namespace CLASS_ID {
|
||||
enum commonClassIds: uint8_t {
|
||||
COMMON_CLASS_ID_START = FW_CLASS_ID_COUNT,
|
||||
MGM_LIS3MDL, //MGMLIS3
|
||||
MGM_RM3100, //MGMRM3100
|
||||
PCDU_HANDLER, //PCDU
|
||||
HEATER_HANDLER, //HEATER
|
||||
SYRLINKS_HANDLER, //SYRLINKS
|
||||
|
@ -6,8 +6,6 @@
|
||||
namespace SUBSYSTEM_ID {
|
||||
enum: uint8_t {
|
||||
COMMON_SUBSYSTEM_ID_START = FW_SUBSYSTEM_ID_RANGE,
|
||||
MGM_LIS3MDL = 106,
|
||||
MGM_RM3100 = 107,
|
||||
PCDU_HANDLER = 108,
|
||||
HEATER_HANDLER = 109,
|
||||
SA_DEPL_HANDLER = 110,
|
||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit 16b125ef6cdfbe1349e5b21b783cd72c871372a8
|
||||
Subproject commit a84c770dfb8447325c263da42d5cecd99b38d1f0
|
@ -72,7 +72,7 @@ static constexpr size_t FSFW_MAX_TM_PACKET_SIZE = 2048;
|
||||
|
||||
}
|
||||
|
||||
#define FSFW_HAL_LINUX_SPI_WIRETAPPING 0
|
||||
#define FSFW_HAL_SPI_WIRETAPPING 0
|
||||
#define FSFW_DEV_HYPERION_GPS_CREATE_NMEA_CSV 0
|
||||
|
||||
#define FSFW_HAL_L3GD20_GYRO_DEBUG 0
|
||||
|
@ -536,9 +536,16 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
|
||||
}
|
||||
#endif /* OBSW_ADD_ACS_BOARD == 1 */
|
||||
|
||||
if (thisSequence->checkSequence() != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::error << "SPI PST initialization failed" << std::endl;
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
ReturnValue_t seqCheck = thisSequence->checkSequence();
|
||||
if (seqCheck != HasReturnvaluesIF::RETURN_OK) {
|
||||
if(seqCheck == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||
sif::warning << "SPI PST is empty.." << std::endl;
|
||||
}
|
||||
else {
|
||||
sif::error << "SPI PST initialization failed" << std::endl;
|
||||
}
|
||||
|
||||
return seqCheck;
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ ReturnValue_t GyroADIS16507Handler::spiSendCallback(SpiComIF *comIf, SpiCookie *
|
||||
utility::handleIoctlError("SpiComIF::sendMessage: ioctl error.");
|
||||
result = SpiComIF::FULL_DUPLEX_TRANSFER_FAILED;
|
||||
}
|
||||
#if FSFW_HAL_LINUX_SPI_WIRETAPPING == 1
|
||||
#if FSFW_HAL_SPI_WIRETAPPING == 1
|
||||
comIf->performSpiWiretapping(cookie);
|
||||
#endif /* FSFW_LINUX_SPI_WIRETAPPING == 1 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user