diff --git a/bsp_q7s/boardconfig/busConf.h b/bsp_q7s/boardconfig/busConf.h index a86a6c79..c78125ea 100644 --- a/bsp_q7s/boardconfig/busConf.h +++ b/bsp_q7s/boardconfig/busConf.h @@ -95,6 +95,43 @@ static constexpr uint32_t SPI_MUX_BIT_5 = 17; static constexpr uint32_t SPI_MUX_BIT_6 = 9; static constexpr uint32_t EN_RW_CS = 17; +namespace gpioNames { + static constexpr char GYRO_0_ADIS_CS[] = "gyro_0_adis_chip_select"; + static constexpr char GYRO_1_L3G_CS[] = "gyro_1_l3g_chip_select"; + static constexpr char GYRO_2_ADIS_CS[] = "gyro_2_adis_chip_select"; + static constexpr char GYRO_3_L3G_CS[] = "gyro_3_l3g_chip_select"; + static constexpr char MGM_0_CS[] = "mgm_0_lis3_chip_select"; + static constexpr char MGM_1_CS[] = "mgm_1_rm3100_chip_select"; + static constexpr char MGM_2_CS[] = "mgm_2_lis3_chip_select"; + static constexpr char MGM_3_CS[] = "mgm_3_rm3100_chip_select"; + static constexpr char RESET_GNSS_0[] = "reset_gnss_0"; + static constexpr char RESET_GNSS_1[] = "reset_gnss_1"; + static constexpr char GYRO_0_ENABLE[] = "gyro_0_enable"; + static constexpr char GYRO_2_ENABLE[] = "gyro_2_enable"; + static constexpr char HEATER_0[] = "heater0"; + static constexpr char HEATER_1[] = "heater1"; + static constexpr char HEATER_2[] = "heater2"; + static constexpr char HEATER_3[] = "heater3"; + static constexpr char HEATER_4[] = "heater4"; + static constexpr char HEATER_5[] = "heater5"; + static constexpr char HEATER_6[] = "heater6"; + static constexpr char HEATER_7[] = "heater7"; + static constexpr char SA_DPL_PIN_0[] = "sa_dpl_0"; + static constexpr char SA_DPL_PIN_1[] = "sa_dpl_1"; + static constexpr char SPI_MUX_BIT_1_PIN[] = "spi_mux_bit_1"; + static constexpr char SPI_MUX_BIT_2_PIN[] = "spi_mux_bit_2"; + static constexpr char SPI_MUX_BIT_3_PIN[] = "spi_mux_bit_3"; + static constexpr char SPI_MUX_BIT_4_PIN[] = "spi_mux_bit_4"; + static constexpr char SPI_MUX_BIT_5_PIN[] = "spi_mux_bit_5"; + static constexpr char SPI_MUX_BIT_6_PIN[] = "spi_mux_bit_6"; + static constexpr char EN_RW_CS[] = "en_rw_cs"; + static constexpr char EN_RW_1[] = "enable_rw_1"; + static constexpr char EN_RW_2[] = "enable_rw_2"; + static constexpr char EN_RW_3[] = "enable_rw_3"; + static constexpr char EN_RW_4[] = "enable_rw_4"; + static constexpr char SPI_MUX_SELECT[] = "spi_mux_select"; + static constexpr char RAD_SENSOR_CHIP_SELECT[] = "rad_sensor_chip_select"; +} } #endif /* BSP_Q7S_BOARDCONFIG_BUSCONF_H_ */ diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 6d6358c3..44b27890 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -267,9 +267,11 @@ void ObjectFactory::createPcduComponents() { void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) { GpioCookie* gpioCookieRadSensor = new GpioCookie; - auto chipSelectRadSensor = new GpiodRegularByLabel(q7s::GPIO_RAD_SENSOR_LABEL, - q7s::GPIO_RAD_SENSOR_CS, "Chip Select Radiation Sensor", gpio::OUT, gpio::HIGH); - gpioCookieRadSensor->addGpio(gpioIds::CS_RAD_SENSOR, chipSelectRadSensor); + std::stringstream consumer; + consumer << "0x" << std::hex << objects::RAD_SENSOR; + GpiodRegularByLineName* gpio = new GpiodRegularByLineName( + q7s::gpioNames::RAD_SENSOR_CHIP_SELECT, consumer.str(), gpio::OUT, gpio::HIGH); + gpioCookieRadSensor->addGpio(gpioIds::CS_RAD_SENSOR, gpio); gpioComIF->addGpios(gpioCookieRadSensor); SpiCookie* spiCookieRadSensor = new SpiCookie(addresses::RAD_SENSOR, gpioIds::CS_RAD_SENSOR, @@ -394,51 +396,79 @@ void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF *gpioComIF, SpiComI void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComIF* uartComIF) { GpioCookie* gpioCookieAcsBoard = new GpioCookie(); - GpiodRegularByLabel* gpio = nullptr; - gpio = new GpiodRegularByLabel(q7s::GPIO_GYRO_ADIS_LABEL, q7s::GPIO_GYRO_0_ADIS_CS, - "CS_GYRO_0_ADIS", gpio::OUT, gpio::HIGH); + + std::stringstream consumer; + GpiodRegularByLineName* gpio = nullptr; + consumer << "0x" << std::hex << objects::GYRO_0_ADIS_HANDLER; + gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_0_ADIS_CS, consumer.str(), gpio::OUT, gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ADIS_CS, gpio); - gpio = new GpiodRegularByLabel(q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_GYRO_1_L3G_CS, - "CS_GYRO_1_L3G", gpio::OUT, gpio::HIGH); + + consumer.str(""); + consumer << "0x" << std::hex << objects::GYRO_1_L3G_HANDLER; + gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_1_L3G_CS, consumer.str(), gpio::OUT, + gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::GYRO_1_L3G_CS, gpio); - gpio = new GpiodRegularByLabel(q7s::GPIO_GYRO_ADIS_LABEL, q7s::GPIO_GYRO_2_ADIS_CS, - "CS_GYRO_2_ADIS", gpio::OUT, gpio::HIGH); + + consumer.str(""); + consumer << "0x" << std::hex << objects::GYRO_2_ADIS_HANDLER; + gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_2_ADIS_CS, consumer.str(), gpio::OUT, + gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ADIS_CS, gpio); - gpio = new GpiodRegularByLabel(q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_GYRO_3_L3G_CS, - "CS_GYRO_3_L3G", gpio::OUT, gpio::HIGH); + + consumer.str(""); + consumer << "0x" << std::hex << objects::GYRO_3_L3G_HANDLER; + gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_3_L3G_CS, consumer.str(), gpio::OUT, + gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::GYRO_3_L3G_CS, gpio); - gpio = new GpiodRegularByLabel(q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_MGM_0_LIS3_CS, - "CS_MGM_0_LIS3_A", gpio::OUT, gpio::HIGH); + consumer.str(""); + consumer << "0x" << std::hex << objects::MGM_0_LIS3_HANDLER; + gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_0_CS, consumer.str(), gpio::OUT, + gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::MGM_0_LIS3_CS, gpio); - gpio = new GpiodRegularByLabel(q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_MGM_1_RM3100_CS, - "CS_MGM_1_RM3100_A", gpio::OUT, gpio::HIGH); + + consumer.str(""); + consumer << "0x" << std::hex << objects::MGM_1_RM3100_HANDLER; + gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_1_CS, consumer.str(), gpio::OUT, + gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::MGM_1_RM3100_CS, gpio); -// auto gpioChip = new GpiodRegularByChip(q7s::GPIO_MGM2_LIS3_LABEL, q7s::GPIO_MGM_2_LIS3_CS, -// "CS_MGM_2_LIS3_B", gpio::OUT, gpio::HIGH); - std::stringstream consumer; - consumer << std::hex << objects::MGM_2_LIS3_HANDLER; - auto gpioByLineName = new GpiodRegularByLineName("mgm_2_lis3_chip_select", consumer.str(), + + consumer.str(""); + consumer << "0x" << std::hex << objects::MGM_2_LIS3_HANDLER; + gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_2_CS, consumer.str(), gpio::OUT, gpio::HIGH); - gpioCookieAcsBoard->addGpio(gpioIds::MGM_2_LIS3_CS, gpioByLineName); - gpio = new GpiodRegularByLabel(q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_MGM_3_RM3100_CS, - "CS_MGM_3_RM3100_B", gpio::OUT, gpio::HIGH); + gpioCookieAcsBoard->addGpio(gpioIds::MGM_2_LIS3_CS, gpio); + + consumer.str(""); + consumer << "0x" << std::hex << objects::MGM_3_RM3100_HANDLER; + gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_3_CS, consumer.str(), gpio::OUT, + gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::MGM_3_RM3100_CS, gpio); + consumer.str(""); + consumer << "0x" << std::hex << objects::GPS0_HANDLER; // GNSS reset pins are active low - gpio = new GpiodRegularByLabel(q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_RESET_GNSS_0, - "GNSS_0_NRESET", gpio::OUT, gpio::HIGH); + gpio = new GpiodRegularByLineName(q7s::gpioNames::RESET_GNSS_0, consumer.str(), gpio::OUT, + gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::GNSS_0_NRESET, gpio); - gpio = new GpiodRegularByLabel(q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_RESET_GNSS_1, - "GNSS_1_NRESET", gpio::OUT, gpio::HIGH); + + consumer.str(""); + consumer << "0x" << std::hex << objects::GPS1_HANDLER; + gpio = new GpiodRegularByLineName(q7s::gpioNames::RESET_GNSS_1, consumer.str(), gpio::OUT, + gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::GNSS_1_NRESET, gpio); + consumer.str(""); + consumer << "0x" << std::hex << objects::GYRO_0_ADIS_HANDLER; // Enable pins must be pulled low for regular operations - gpio = new GpiodRegularByLabel(q7s::GPIO_FLEX_OBC1F_B0, q7s::GPIO_GYRO_0_ENABLE, - "GYRO_0_ENABLE", gpio::OUT, gpio::LOW); + gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_0_ENABLE, consumer.str(), + gpio::OUT, gpio::LOW); gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ENABLE, gpio); - gpio = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::GPIO_GYRO_2_ENABLE, - "GYRO_2_ENABLE", gpio::OUT, gpio::LOW); + + consumer.str(""); + consumer << "0x" << std::hex << objects::GYRO_2_ADIS_HANDLER; + gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_2_ENABLE, consumer.str(), gpio::OUT, + gpio::LOW); gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ENABLE, gpio); // TODO: Add enable pins for GPS as soon as new interface board design is finished @@ -546,40 +576,43 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComI void ObjectFactory::createHeaterComponents() { GpioCookie* heaterGpiosCookie = new GpioCookie; + GpiodRegularByLineName* gpio = nullptr; + std::stringstream consumer; + consumer << "0x" << std::hex << objects::HEATER_HANDLER; /* Pin H2-11 on stack connector */ - auto gpioConfigHeater0 = new GpiodRegularByLabel(q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_0_PIN, - "Heater0", gpio::OUT, gpio::LOW); - heaterGpiosCookie->addGpio(gpioIds::HEATER_0, gpioConfigHeater0); + gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_0, consumer.str(), gpio::OUT, + gpio::LOW); + heaterGpiosCookie->addGpio(gpioIds::HEATER_0, gpio); /* Pin H2-12 on stack connector */ - auto gpioConfigHeater1 = new GpiodRegularByLabel(q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_1_PIN, - "Heater1", gpio::OUT, gpio::LOW); - heaterGpiosCookie->addGpio(gpioIds::HEATER_1, gpioConfigHeater1); + gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_1, consumer.str(), gpio::OUT, + gpio::LOW); + heaterGpiosCookie->addGpio(gpioIds::HEATER_1, gpio); /* Pin H2-13 on stack connector */ - auto gpioConfigHeater2 = new GpiodRegularByLabel(q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_2_PIN, - "Heater2", gpio::OUT, gpio::LOW); - heaterGpiosCookie->addGpio(gpioIds::HEATER_2, gpioConfigHeater2); + gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_2, consumer.str(), gpio::OUT, + gpio::LOW); + heaterGpiosCookie->addGpio(gpioIds::HEATER_2, gpio); - auto gpioConfigHeater3 = new GpiodRegularByLabel(q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_3_PIN, - "Heater3", gpio::OUT, gpio::LOW); - heaterGpiosCookie->addGpio(gpioIds::HEATER_3, gpioConfigHeater3); + gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_3, consumer.str(), + gpio::OUT, gpio::LOW); + heaterGpiosCookie->addGpio(gpioIds::HEATER_3, gpio); - auto gpioConfigHeater4 = new GpiodRegularByLabel(q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_4_PIN, - "Heater4", gpio::OUT, gpio::LOW); - heaterGpiosCookie->addGpio(gpioIds::HEATER_4, gpioConfigHeater4); + gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_4, consumer.str(), + gpio::OUT, gpio::LOW); + heaterGpiosCookie->addGpio(gpioIds::HEATER_4, gpio); - auto gpioConfigHeater5 = new GpiodRegularByLabel(q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_5_PIN, - "Heater5", gpio::OUT, gpio::LOW); - heaterGpiosCookie->addGpio(gpioIds::HEATER_5, gpioConfigHeater5); + gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_5, consumer.str(), + gpio::OUT, gpio::LOW); + heaterGpiosCookie->addGpio(gpioIds::HEATER_5, gpio); - auto gpioConfigHeater6 = new GpiodRegularByLabel(q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_6_PIN, - "Heater6", gpio::OUT, gpio::LOW); - heaterGpiosCookie->addGpio(gpioIds::HEATER_6, gpioConfigHeater6); + gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_6, consumer.str(), + gpio::OUT, gpio::LOW); + heaterGpiosCookie->addGpio(gpioIds::HEATER_6, gpio); - auto gpioConfigHeater7 = new GpiodRegularByLabel(q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_7_PIN, - "Heater7", gpio::OUT, gpio::LOW); - heaterGpiosCookie->addGpio(gpioIds::HEATER_7, gpioConfigHeater7); + gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_7, consumer.str(), + gpio::OUT, gpio::LOW); + heaterGpiosCookie->addGpio(gpioIds::HEATER_7, gpio); new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, heaterGpiosCookie, objects::PCDU_HANDLER, pcduSwitches::TCS_BOARD_8V_HEATER_IN); @@ -587,13 +620,16 @@ void ObjectFactory::createHeaterComponents() { void ObjectFactory::createSolarArrayDeploymentComponents() { GpioCookie* solarArrayDeplCookie = new GpioCookie; + GpiodRegularByLineName* gpio = nullptr; - auto gpioConfigDeplSA0 = new GpiodRegularByLabel(q7s::GPIO_SOLAR_ARR_DEPL_LABEL, - q7s::GPIO_SOL_DEPL_SA_0_PIN, "DeplSA0", gpio::OUT, gpio::LOW); - solarArrayDeplCookie->addGpio(gpioIds::DEPLSA1, gpioConfigDeplSA0); - auto gpioConfigDeplSA1 = new GpiodRegularByLabel(q7s::GPIO_SOLAR_ARR_DEPL_LABEL, - q7s::GPIO_SOL_DEPL_SA_1_PIN, "DeplSA1", gpio::OUT, gpio::LOW); - solarArrayDeplCookie->addGpio(gpioIds::DEPLSA2, gpioConfigDeplSA1); + std::stringstream consumer; + consumer << "0x" << std::hex << objects::SOLAR_ARRAY_DEPL_HANDLER; + gpio = new GpiodRegularByLineName(q7s::gpioNames::SA_DPL_PIN_0, + consumer.str(), gpio::OUT, gpio::LOW); + solarArrayDeplCookie->addGpio(gpioIds::DEPLSA1, gpio); + gpio = new GpiodRegularByLineName(q7s::gpioNames::SA_DPL_PIN_1, consumer.str(), gpio::OUT, + gpio::LOW); + solarArrayDeplCookie->addGpio(gpioIds::DEPLSA2, gpio); //TODO: Find out burn time. For now set to 1000 ms. new SolarArrayDeploymentHandler(objects::SOLAR_ARRAY_DEPL_HANDLER, objects::GPIO_IF, @@ -772,35 +808,36 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) { &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieRw->addGpio(gpioIds::CS_RW4, csRw4); -// GpiodRegular* enRw1 = new GpiodRegular("Enable reaction wheel 1", gpio::OUT, 0, -// q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_0_CS); -// gpioCookieRw->addGpio(gpioIds::EN_RW1, enRw1); -// GpiodRegular* enRw2 = new GpiodRegular("Enable reaction wheel 2", gpio::OUT, 0, -// q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_1_CS); -// gpioCookieRw->addGpio(gpioIds::EN_RW2, enRw2); -// GpiodRegular* enRw3 = new GpiodRegular(, gpio::OUT, 0, -// q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_2_CS); - auto enRw1 = new GpiodRegularByLabel(q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_0_CS, - "Enable reaction wheel 1", gpio::OUT, gpio::LOW); - gpioCookieRw->addGpio(gpioIds::EN_RW1, enRw1); - auto enRw2 = new GpiodRegularByLabel(q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_1_CS, - "Enable reaction wheel 2", gpio::OUT, gpio::LOW); - gpioCookieRw->addGpio(gpioIds::EN_RW2, enRw2); - auto enRw3 = new GpiodRegularByLabel(q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_2_CS, - "Enable reaction wheel 3", gpio::OUT, gpio::LOW); - gpioCookieRw->addGpio(gpioIds::EN_RW3, enRw3); - auto enRw4 = new GpiodRegularByLabel(q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_3_CS, - "Enable reaction wheel 4", gpio::OUT, gpio::LOW); - gpioCookieRw->addGpio(gpioIds::EN_RW4, enRw4); + std::stringstream consumer; + GpiodRegularByLineName* gpio = nullptr; + consumer << "0x" << std::hex << objects::RW1; + gpio = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_1, consumer.str(), gpio::OUT, + gpio::LOW); + gpioCookieRw->addGpio(gpioIds::EN_RW1, gpio); + consumer.str(""); + consumer << "0x" << std::hex << objects::RW2; + gpio = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_2, consumer.str(), gpio::OUT, + gpio::LOW); + gpioCookieRw->addGpio(gpioIds::EN_RW2, gpio); + consumer.str(""); + consumer << "0x" << std::hex << objects::RW3; + gpio = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_3, consumer.str(), gpio::OUT, + gpio::LOW); + gpioCookieRw->addGpio(gpioIds::EN_RW3, gpio); + consumer.str(""); + consumer << "0x" << std::hex << objects::RW4; + gpio = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_4, consumer.str(), gpio::OUT, + gpio::LOW); + gpioCookieRw->addGpio(gpioIds::EN_RW4, gpio); /** * This GPIO is only internally connected to the SPI MUX module and responsible to disconnect * the PS SPI peripheral from the SPI interface and route out the SPI lines of the AXI SPI core. * Per default the PS SPI is selected (EMIO = 0). */ - auto spiMux = new GpiodRegularByLabel(q7s::GPIO_RW_SPI_MUX_LABEL, - q7s::GPIO_RW_SPI_MUX_CS, "EMIO 0 SPI Mux", gpio::OUT, gpio::LOW); - gpioCookieRw->addGpio(gpioIds::SPI_MUX, spiMux); + gpio = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_SELECT, + "SPI Reaction Wheel Callback ", gpio::OUT, gpio::LOW); + gpioCookieRw->addGpio(gpioIds::SPI_MUX, gpio); gpioComIF->addGpios(gpioCookieRw); @@ -820,6 +857,7 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) { auto rwHandler1 = new RwHandler(objects::RW1, objects::SPI_COM_IF, rw1SpiCookie, gpioComIF, gpioIds::EN_RW1); rw1SpiCookie->setCallbackArgs(rwHandler1); + rwHandler1->setStartUpImmediately(); auto rwHandler2 = new RwHandler(objects::RW2, objects::SPI_COM_IF, rw2SpiCookie, gpioComIF, gpioIds::EN_RW2); diff --git a/bsp_q7s/gpio/gpioCallbacks.cpp b/bsp_q7s/gpio/gpioCallbacks.cpp index da7c58e4..3787c829 100644 --- a/bsp_q7s/gpio/gpioCallbacks.cpp +++ b/bsp_q7s/gpio/gpioCallbacks.cpp @@ -24,31 +24,26 @@ void initSpiCsDecoder(GpioIF* gpioComIF) { GpioCookie* spiMuxGpios = new GpioCookie; - GpiodRegularByLabel* spiMuxBit = nullptr; + GpiodRegularByLineName* spiMuxBit = nullptr; /** Setting mux bit 1 to low will disable IC21 on the interface board */ - spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_1, - "SPI Mux Bit 1", gpio::OUT, gpio::LOW); + spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_1_PIN, "SPI Mux Bit 1", + gpio::OUT, gpio::LOW); spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_1, spiMuxBit); /** Setting mux bit 2 to low disables IC1 on the TCS board */ - spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_2, - "SPI Mux Bit 2", gpio::OUT, gpio::LOW); + spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_2_PIN, "SPI Mux Bit 2", gpio::OUT, gpio::LOW); spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_2, spiMuxBit); /** Setting mux bit 3 to low disables IC2 on the TCS board and IC22 on the interface board */ - spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_3, - "SPI Mux Bit 3", gpio::OUT, gpio::LOW); + spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_3_PIN, "SPI Mux Bit 3", gpio::OUT, gpio::LOW); spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_3, spiMuxBit); /** The following gpios can take arbitrary initial values */ - spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_4, - "SPI Mux Bit 4", gpio::OUT, gpio::LOW); + spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_4_PIN, "SPI Mux Bit 4", gpio::OUT, gpio::LOW); spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_4, spiMuxBit); - spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_5, - "SPI Mux Bit 5", gpio::OUT, gpio::LOW); + spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_5_PIN, "SPI Mux Bit 5", gpio::OUT, gpio::LOW); spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_5, spiMuxBit); - spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_6, - "SPI Mux Bit 6", gpio::OUT, gpio::LOW); + spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_6_PIN, "SPI Mux Bit 6", gpio::OUT, gpio::LOW); spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_6, spiMuxBit); - GpiodRegularByLabel* enRwDecoder = new GpiodRegularByLabel(q7s::GPIO_FLEX_OBC1F_B1, - q7s::EN_RW_CS, "EN_RW_CS", gpio::OUT, gpio::HIGH); + GpiodRegularByLineName* enRwDecoder = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_CS, + "EN_RW_CS", gpio::OUT, gpio::HIGH); spiMuxGpios->addGpio(gpioIds::EN_RW_CS, enRwDecoder); result = gpioComInterface->addGpios(spiMuxGpios); diff --git a/fsfw b/fsfw index e7df5207..16b125ef 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit e7df520780242f98f9a1189906c0ade1a8a99f29 +Subproject commit 16b125ef6cdfbe1349e5b21b783cd72c871372a8 diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp index 3b826119..642199da 100644 --- a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp +++ b/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp @@ -439,8 +439,8 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) { #endif #if OBSW_ADD_ACS_BOARD == 1 - bool enableAside = true; - bool enableBside = false; + bool enableAside = false; + bool enableBside = true; if(enableAside) { // A side thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0,