have to user proper types now
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2021-09-27 10:51:47 +02:00
parent a5f9d0c0d5
commit 3af5b8560d
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
4 changed files with 19 additions and 18 deletions

View File

@ -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);

View File

@ -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();

View File

@ -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

2
fsfw

@ -1 +1 @@
Subproject commit e227b5dead43c292918fb9f140a1c7c4073c8081
Subproject commit a84c770dfb8447325c263da42d5cecd99b38d1f0