gpio chips now opened by label
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
#include "gpioCallbacks.h"
|
||||
#include "busConf.h"
|
||||
#include <devices/gpioIds.h>
|
||||
|
||||
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
|
||||
@ -24,29 +25,29 @@ void initSpiCsDecoder(GpioIF* gpioComIF) {
|
||||
GpioCookie* spiMuxGpios = new GpioCookie;
|
||||
|
||||
/** Setting mux bit 1 to low will disable IC21 on the interface board */
|
||||
GpiodRegular* spiMuxBit1 = new GpiodRegular(std::string("gpiochip7"), 13,
|
||||
std::string("SPI Mux Bit 1"), gpio::OUT, 0);
|
||||
GpiodRegular* spiMuxBit1 = new GpiodRegular(std::string("SPI Mux Bit 1"), gpio::OUT, 0,
|
||||
q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_1);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_1, spiMuxBit1);
|
||||
/** Setting mux bit 2 to low disables IC1 on the TCS board */
|
||||
GpiodRegular* spiMuxBit2 = new GpiodRegular(std::string("gpiochip7"), 14,
|
||||
std::string("SPI Mux Bit 2"), gpio::OUT, 0);
|
||||
GpiodRegular* spiMuxBit2 = new GpiodRegular(std::string("SPI Mux Bit 2"), gpio::OUT, 0,
|
||||
q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_2);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_2, spiMuxBit2);
|
||||
/** Setting mux bit 3 to low disables IC2 on the TCS board and IC22 on the interface board */
|
||||
GpiodRegular* spiMuxBit3 = new GpiodRegular(std::string("gpiochip7"), 15,
|
||||
std::string("SPI Mux Bit 3"), gpio::OUT, 0);
|
||||
GpiodRegular* spiMuxBit3 = new GpiodRegular(std::string("SPI Mux Bit 3"), gpio::OUT, 0,
|
||||
q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_3);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_3, spiMuxBit3);
|
||||
/** The following gpios can take arbitrary initial values */
|
||||
GpiodRegular* spiMuxBit4 = new GpiodRegular(std::string("gpiochip7"), 16,
|
||||
std::string("SPI Mux Bit 4"), gpio::OUT, 0);
|
||||
GpiodRegular* spiMuxBit4 = new GpiodRegular(std::string("SPI Mux Bit 4"), gpio::OUT, 0,
|
||||
q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_4);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_4, spiMuxBit4);
|
||||
GpiodRegular* spiMuxBit5 = new GpiodRegular(std::string("gpiochip7"), 17,
|
||||
std::string("SPI Mux Bit 5"), gpio::OUT, 0);
|
||||
GpiodRegular* spiMuxBit5 = new GpiodRegular(std::string("SPI Mux Bit 5"), gpio::OUT, 0,
|
||||
q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_5);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_5, spiMuxBit5);
|
||||
GpiodRegular* spiMuxBit6 = new GpiodRegular(std::string("gpiochip7"), 9,
|
||||
std::string("SPI Mux Bit 6"), gpio::OUT, 0);
|
||||
GpiodRegular* spiMuxBit6 = new GpiodRegular(std::string("SPI Mux Bit 6"), gpio::OUT, 0,
|
||||
q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_6);
|
||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_6, spiMuxBit6);
|
||||
GpiodRegular* enRwDecoder = new GpiodRegular(std::string("gpiochip5"), 17,
|
||||
std::string("EN_RW_CS"), gpio::OUT, 1);
|
||||
GpiodRegular* enRwDecoder = new GpiodRegular(std::string("EN_RW_CS"), gpio::OUT, 1,
|
||||
q7s::GPIO_FLEX_OBC1F_B1, q7s::EN_RW_CS);
|
||||
spiMuxGpios->addGpio(gpioIds::EN_RW_CS, enRwDecoder);
|
||||
|
||||
result = gpioComInterface->addGpios(spiMuxGpios);
|
||||
|
Reference in New Issue
Block a user