have to user proper types now
This commit is contained in:
parent
a5f9d0c0d5
commit
3af5b8560d
@ -284,43 +284,43 @@ void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF *gpioComIF, SpiComI
|
|||||||
GpioCookie* gpioCookieSus = new GpioCookie();
|
GpioCookie* gpioCookieSus = new GpioCookie();
|
||||||
GpioCallback* susgpio = nullptr;
|
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);
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_1, susgpio);
|
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);
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_2, susgpio);
|
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);
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_3, susgpio);
|
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);
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_4, susgpio);
|
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);
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_5, susgpio);
|
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);
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_6, susgpio);
|
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);
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_7, susgpio);
|
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);
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_8, susgpio);
|
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);
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_9, susgpio);
|
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);
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_10, susgpio);
|
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);
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_11, susgpio);
|
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);
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_12, susgpio);
|
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);
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
||||||
gpioCookieSus->addGpio(gpioIds::CS_SUS_13, susgpio);
|
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) {
|
void* args) {
|
||||||
|
|
||||||
if (gpioComInterface == nullptr) {
|
if (gpioComInterface == nullptr) {
|
||||||
@ -67,10 +67,10 @@ void spiCsDecoderCallback(gpioId_t gpioId, gpio::GpioOperation gpioOp, int value
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value == 1) {
|
if (value == gpio::HIGH) {
|
||||||
disableAllDecoder();
|
disableAllDecoder();
|
||||||
}
|
}
|
||||||
else if (value == 0) {
|
else if (value == gpio::LOW) {
|
||||||
switch (gpioId) {
|
switch (gpioId) {
|
||||||
case(gpioIds::RTD_IC3): {
|
case(gpioIds::RTD_IC3): {
|
||||||
enableDecoderTcsIc1();
|
enableDecoderTcsIc1();
|
||||||
|
@ -17,7 +17,8 @@ namespace gpioCallbacks {
|
|||||||
* @brief This function implements the decoding to multiply gpios by using the decoder
|
* @brief This function implements the decoding to multiply gpios by using the decoder
|
||||||
* chips SN74LVC138APWR on the TCS board and the interface board.
|
* 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
|
* @brief This function sets mux bits 1-3 to a state which will only enable the decoder
|
||||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit e227b5dead43c292918fb9f140a1c7c4073c8081
|
Subproject commit a84c770dfb8447325c263da42d5cecd99b38d1f0
|
Loading…
Reference in New Issue
Block a user