diff --git a/bsp_q7s/boardconfig/busConf.h b/bsp_q7s/boardconfig/busConf.h index 27f44b04..b70060f5 100644 --- a/bsp_q7s/boardconfig/busConf.h +++ b/bsp_q7s/boardconfig/busConf.h @@ -3,15 +3,54 @@ namespace q7s { -static constexpr char SPI_DEFAULT_DEV[] = "dev/spidev2.0"; -static constexpr char SPI_RW_DEV[] = "dev/spidev3.0"; +static constexpr char SPI_DEFAULT_DEV[] = "/dev/spidev2.0"; +static constexpr char SPI_RW_DEV[] = "/dev/spidev3.0"; -static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-0"; +static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-1"; static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ttyUL3"; +static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ttyUL4"; +static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ttyUL8"; +static constexpr char GPIO_ACS_BOARD_DEFAULT_CHIP[] = "gpiochip5"; +static constexpr char GPIO_MGM2_LIS3_CHIP[] = "gpiochip6"; + +// TODO: Determine new pins, additional ADIS gyro device +static constexpr uint32_t GPIO_GYRO_0_ADIS_CS = 1; +static constexpr uint32_t GPIO_GYRO_1_L3G_CS = 7; +static constexpr uint32_t GPIO_GYRO_2_ADIS_CS = 3; +static constexpr uint32_t GPIO_GYRO_3_L3G_CS = 3; + +static constexpr uint32_t GPIO_MGM_0_LIS3_CS = 5; +static constexpr uint32_t GPIO_MGM_1_RM3100_CS = 16; +static constexpr uint32_t GPIO_MGM_2_LIS3_CS = 0; +static constexpr uint32_t GPIO_MGM_3_RM3100_CS = 10; + +static constexpr char GPIO_RW_DEFAULT_CHIP[] = "gpiochip5"; +static constexpr uint32_t GPIO_RW_0_CS = 7; +static constexpr uint32_t GPIO_RW_1_CS = 3; +static constexpr uint32_t GPIO_RW_2_CS = 11; +static constexpr uint32_t GPIO_RW_3_CS = 6; + +static constexpr char GPIO_RW_SPI_MUX_CHIP[] = "gpiochip11"; +static constexpr uint32_t GPIO_RW_SPI_MUX_CS = 57; + +static constexpr char GPIO_HEATER_CHIP[] = "gpiochip7"; +static constexpr uint32_t GPIO_HEATER_0_PIN = 6; +static constexpr uint32_t GPIO_HEATER_1_PIN = 12; +static constexpr uint32_t GPIO_HEATER_2_PIN = 7; +static constexpr uint32_t GPIO_HEATER_3_PIN = 5; +static constexpr uint32_t GPIO_HEATER_4_PIN = 3; +static constexpr uint32_t GPIO_HEATER_5_PIN = 0; +static constexpr uint32_t GPIO_HEATER_6_PIN = 1; +static constexpr uint32_t GPIO_HEATER_7_PIN = 11; + +static constexpr char GPIO_SOLAR_ARR_DEPL_CHIP[] = "gpiochip7"; +static constexpr uint32_t GPIO_SOL_DEPL_SA_0_PIN = 4; +static constexpr uint32_t GPIO_SOL_DEPL_SA_1_PIN = 2; + +static constexpr char GPIO_RAD_SENSOR_CHIP[] = "gpiochip5"; +static constexpr uint32_t GPIO_RAD_SENSOR_CS = 19; } - - #endif /* BSP_Q7S_BOARDCONFIG_BUSCONF_H_ */ diff --git a/bsp_q7s/core/ObjectFactory.cpp b/bsp_q7s/core/ObjectFactory.cpp index 1f9cccca..0faa6562 100644 --- a/bsp_q7s/core/ObjectFactory.cpp +++ b/bsp_q7s/core/ObjectFactory.cpp @@ -21,6 +21,7 @@ #include "linux/devices/SusHandler.h" #include "linux/csp/CspCookie.h" #include "linux/csp/CspComIF.h" +#include "linux/obc/CCSDSIPCoreBridge.h" #include "mission/core/GenericFactory.h" #include "mission/devices/PDU1Handler.h" @@ -44,10 +45,9 @@ #include "mission/devices/devicedefinitions/RadSensorDefinitions.h" #include "mission/devices/devicedefinitions/Max31865Definitions.h" #include "mission/devices/devicedefinitions/RwDefinitions.h" -#include -#include +#include "mission/devices/devicedefinitions/StarTrackerDefinitions.h" +#include "mission/devices/GPSHyperionHandler.h" #include "mission/utility/TmFunnel.h" -#include "linux/obc/CCSDSIPCoreBridge.h" #include "fsfw_hal/linux/uart/UartComIF.h" #include "fsfw_hal/linux/uart/UartCookie.h" @@ -107,13 +107,14 @@ void ObjectFactory::produce(void* args){ new CoreController(objects::CORE_CONTROLLER); LinuxLibgpioIF* gpioComIF = nullptr; UartComIF* uartComIF = nullptr; - createCommunicationInterfaces(&gpioComIF, &uartComIF); + SpiComIF* spiComIF = nullptr; + createCommunicationInterfaces(&gpioComIF, &uartComIF, &spiComIF); createTmpComponents(); #if BOARD_TE0720 == 0 createPcduComponents(); createRadSensorComponent(gpioComIF); - createSunSensorComponents(gpioComIF); + createSunSensorComponents(gpioComIF, spiComIF); #if OBSW_ADD_ACS_BOARD == 1 createAcsBoardComponents(gpioComIF, uartComIF); #endif /* OBSW_ADD_ACS_BOARD == 1 */ @@ -130,13 +131,6 @@ void ObjectFactory::produce(void* args){ I2cCookie* imtqI2cCookie = new I2cCookie(addresses::IMTQ, IMTQ::MAX_REPLY_SIZE, q7s::I2C_DEFAULT_DEV); new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie); - -#if OBSW_ADD_PLOC_MPSOC == 1 - UartCookie* mpsocUartCookie = new UartCookie(objects::RW1, q7s::UART_PLOC_MPSOC_DEV, - UartModes::NON_CANONICAL, uart::PLOC_MPSOC_BAUD, PLOC_MPSOC::MAX_REPLY_SIZE); - new PlocMPSoCHandler(objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocUartCookie); -#endif /* OBSW_ADD_PLOC_MPSOC */ - createReactionWheelComponents(gpioComIF); #endif /* TE7020 != 0 */ @@ -160,27 +154,28 @@ void ObjectFactory::produce(void* args){ new FileSystemHandler(objects::FILE_SYSTEM_HANDLER); #if OBSW_ADD_PLOC_MPSOC == 1 - UartCookie* plocMpsocCookie = new UartCookie(objects::RW1, std::string("/dev/ttyUL3"), - UartModes::NON_CANONICAL, 115200, PLOC_MPSOC::MAX_REPLY_SIZE); + UartCookie* plocMpsocCookie = new UartCookie(objects::PLOC_MPSOC_HANDLER, + q7s::UART_PLOC_MPSOC_DEV, UartModes::NON_CANONICAL, uart::PLOC_MPSOC_BAUD, + PLOC_MPSOC::MAX_REPLY_SIZE); new PlocMPSoCHandler(objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, plocMpsocCookie); #endif -#if OBSW_ADD_STAR_TRACKER == 1 - UartCookie* starTrackerCookie = new UartCookie(objects::START_TRACKER, std::string("/dev/ttyUL8"), - UartModes::NON_CANONICAL, 115200, StarTracker::MAX_FRAME_SIZE* 2 + 2); - starTrackerCookie->setNoFixedSizeReply(); - new StarTrackerHandler(objects::START_TRACKER, objects::UART_COM_IF, starTrackerCookie); -#endif - #if OBSW_ADD_PLOC_SUPERVISOR == 1 UartCookie* plocSupervisorCookie = new UartCookie(objects::PLOC_SUPERVISOR_HANDLER, - std::string("/dev/ttyUL4"), UartModes::NON_CANONICAL, 115200, + q7s::UART_PLOC_SUPERVSIOR_DEV, UartModes::NON_CANONICAL, uart::PLOC_SUPERVISOR_BAUD, PLOC_SPV::MAX_PACKET_SIZE * 20); plocSupervisorCookie->setNoFixedSizeReply(); PlocSupervisorHandler* plocSupervisor = new PlocSupervisorHandler( objects::PLOC_SUPERVISOR_HANDLER, objects::UART_COM_IF, plocSupervisorCookie); plocSupervisor->setStartUpImmediately(); +#endif +#if OBSW_ADD_STAR_TRACKER == 1 + UartCookie* starTrackerCookie = new UartCookie(objects::START_TRACKER, + q7s::UART_STAR_TRACKER_DEV, UartModes::NON_CANONICAL, uart::STAR_TRACKER_BAUD, + StarTracker::MAX_FRAME_SIZE* 2 + 2); + starTrackerCookie->setNoFixedSizeReply(); + new StarTrackerHandler(objects::START_TRACKER, objects::UART_COM_IF, starTrackerCookie); #endif new PlocUpdater(objects::PLOC_UPDATER); @@ -194,9 +189,9 @@ void ObjectFactory::createTmpComponents() { TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-0")); #else I2cCookie* i2cCookieTmp1075tcs1 = new I2cCookie(addresses::TMP1075_TCS_1, - TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-1")); + TMP1075::MAX_REPLY_LENGTH, q7s::I2C_DEFAULT_DEV); I2cCookie* i2cCookieTmp1075tcs2 = new I2cCookie(addresses::TMP1075_TCS_2, - TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-1")); + TMP1075::MAX_REPLY_LENGTH, q7s::I2C_DEFAULT_DEV); #endif /* Temperature sensors */ @@ -211,8 +206,8 @@ void ObjectFactory::createTmpComponents() { } void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF **gpioComIF, - UartComIF** uartComIF) { - if(gpioComIF == nullptr or uartComIF == nullptr) { + UartComIF** uartComIF, SpiComIF** spiComIF) { + if(gpioComIF == nullptr or uartComIF == nullptr or spiComIF == nullptr) { sif::error << "ObjectFactory::createCommunicationInterfaces: Invalid passed ComIF pointer" << std::endl; } @@ -223,7 +218,7 @@ void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF **gpioComIF, new I2cComIF(objects::I2C_COM_IF); *uartComIF = new UartComIF(objects::UART_COM_IF); #if Q7S_ADD_SPI_TEST == 0 - new SpiComIF(objects::SPI_COM_IF, *gpioComIF); + *spiComIF = new SpiComIF(objects::SPI_COM_IF, *gpioComIF); #endif /* Q7S_ADD_SPI_TEST == 0 */ /* Adding gpios for chip select decoding to the gpioComIf */ gpioCallbacks::initSpiCsDecoder(*gpioComIF); @@ -261,8 +256,8 @@ void ObjectFactory::createPcduComponents() { void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) { GpioCookie* gpioCookieRadSensor = new GpioCookie; - GpiodRegular* chipSelectRadSensor = new GpiodRegular(std::string("gpiochip5"), 19, - std::string("Chip Select Radiation Sensor"), gpio::OUT, 1); + GpiodRegular* chipSelectRadSensor = new GpiodRegular(q7s::GPIO_RAD_SENSOR_CHIP, + q7s::GPIO_RAD_SENSOR_CS, "Chip Select Radiation Sensor", gpio::OUT, 1); gpioCookieRadSensor->addGpio(gpioIds::CS_RAD_SENSOR, chipSelectRadSensor); gpioComIF->addGpios(gpioCookieRadSensor); @@ -272,46 +267,48 @@ void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) { new RadiationSensorHandler(objects::RAD_SENSOR, objects::SPI_COM_IF, spiCookieRadSensor); } -void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF *gpioComIF) { +void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF *gpioComIF, + SpiComIF* spiComIF) { GpioCookie* gpioCookieSus = new GpioCookie(); + GpioCallback* susgpio = nullptr; - GpioCallback* susgpio = new GpioCallback(std::string("Chip select SUS 1"), gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 1", gpio::OUT, 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_1, susgpio); - susgpio = new GpioCallback(std::string("Chip select SUS 2"), gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 2", gpio::OUT, 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_2, susgpio); - susgpio = new GpioCallback(std::string("Chip select SUS 3"), gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 3", gpio::OUT, 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_3, susgpio); - susgpio = new GpioCallback(std::string("Chip select SUS 4"), gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 4", gpio::OUT, 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_4, susgpio); - susgpio = new GpioCallback(std::string("Chip select SUS 5"), gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 5", gpio::OUT, 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_5, susgpio); - susgpio = new GpioCallback(std::string("Chip select SUS 6"), gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 6", gpio::OUT, 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_6, susgpio); - susgpio = new GpioCallback(std::string("Chip select SUS 7"), gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 7", gpio::OUT, 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_7, susgpio); - susgpio = new GpioCallback(std::string("Chip select SUS 8"), gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 8", gpio::OUT, 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_8, susgpio); - susgpio = new GpioCallback(std::string("Chip select SUS 9"), gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 9", gpio::OUT, 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_9, susgpio); - susgpio = new GpioCallback(std::string("Chip select SUS 10"), gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 10", gpio::OUT, 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_10, susgpio); - susgpio = new GpioCallback(std::string("Chip select SUS 11"), gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 11", gpio::OUT, 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_11, susgpio); - susgpio = new GpioCallback(std::string("Chip select SUS 12"), gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 12", gpio::OUT, 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_12, susgpio); - susgpio = new GpioCallback(std::string("Chip select SUS 13"), gpio::OUT, 1, + susgpio = new GpioCallback("Chip select SUS 13", gpio::OUT, 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieSus->addGpio(gpioIds::CS_SUS_13, susgpio); @@ -388,30 +385,31 @@ void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF *gpioComIF) { void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComIF* uartComIF) { GpioCookie* gpioCookieAcsBoard = new GpioCookie(); GpiodRegular* gpio = nullptr; - gpio = new GpiodRegular(std::string("gpiochip5"), 1, std::string("CS_GYRO_0_ADIS"), - gpio::OUT, gpio::HIGH); + // TODO: Determine new Gyro GPIO pins + gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_GYRO_0_ADIS_CS, + "CS_GYRO_0_ADIS", gpio::OUT, gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ADIS_CS, gpio); - gpio = new GpiodRegular(std::string("gpiochip5"), 7, std::string("CS_GYRO_1_L3G"), - gpio::OUT, gpio::HIGH); + gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_GYRO_1_L3G_CS, + "CS_GYRO_1_L3G", gpio::OUT, gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::GYRO_1_L3G_CS, gpio); - gpio = new GpiodRegular(std::string("gpiochip5"), 3, std::string("CS_GYRO_2_L3G"), - gpio::OUT, gpio::HIGH); - gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_L3G_CS, gpio); + gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_GYRO_2_ADIS_CS, + "CS_GYRO_2_ADIS", gpio::OUT, gpio::HIGH); + gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ADIS_CS, gpio); + gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_GYRO_3_L3G_CS, + "CS_GYRO_3_L3G", gpio::OUT, gpio::HIGH); + gpioCookieAcsBoard->addGpio(gpioIds::GYRO_3_L3G_CS, gpio); - gpio = new GpiodRegular(std::string("gpiochip5"), 5, std::string("CS_MGM_0_LIS3_A"), - gpio::OUT, gpio::HIGH); + gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_MGM_0_LIS3_CS, + "CS_MGM_0_LIS3_A", gpio::OUT, gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::MGM_0_LIS3_CS, gpio); - - gpio = new GpiodRegular(std::string("gpiochip5"), 16, std::string("CS_MGM_1_RM3100_A"), - gpio::OUT, gpio::HIGH); + gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_MGM_1_RM3100_CS, + "CS_MGM_1_RM3100_A", gpio::OUT, gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::MGM_1_RM3100_CS, gpio); - - gpio = new GpiodRegular(std::string("gpiochip6"), 0, std::string("CS_MGM_2_LIS3_B"), - gpio::OUT, gpio::HIGH); + gpio = new GpiodRegular(q7s::GPIO_MGM2_LIS3_CHIP, q7s::GPIO_MGM_2_LIS3_CS, + "CS_MGM_2_LIS3_B", gpio::OUT, gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::MGM_2_LIS3_CS, gpio); - - gpio = new GpiodRegular(std::string("gpiochip5"), 10, std::string("CS_MGM_3_RM3100_B"), - gpio::OUT, gpio::HIGH); + gpio = new GpiodRegular(q7s::GPIO_ACS_BOARD_DEFAULT_CHIP, q7s::GPIO_MGM_3_RM3100_CS, + "CS_MGM_3_RM3100_B", gpio::OUT, gpio::HIGH); gpioCookieAcsBoard->addGpio(gpioIds::MGM_3_RM3100_CS, gpio); gpioComIF->addGpios(gpioCookieAcsBoard); @@ -472,38 +470,38 @@ void ObjectFactory::createHeaterComponents() { GpioCookie* heaterGpiosCookie = new GpioCookie; /* Pin H2-11 on stack connector */ - GpiodRegular* gpioConfigHeater0 = new GpiodRegular(std::string("gpiochip7"), 6, - std::string("Heater0"), gpio::OUT, 0); + GpiodRegular* gpioConfigHeater0 = new GpiodRegular(q7s::GPIO_HEATER_CHIP, + q7s::GPIO_HEATER_0_PIN, "Heater0", gpio::OUT, 0); heaterGpiosCookie->addGpio(gpioIds::HEATER_0, gpioConfigHeater0); /* Pin H2-12 on stack connector */ - GpiodRegular* gpioConfigHeater1 = new GpiodRegular(std::string("gpiochip7"), 12, - std::string("Heater1"), gpio::OUT, 0); + GpiodRegular* gpioConfigHeater1 = new GpiodRegular(q7s::GPIO_HEATER_CHIP, + q7s::GPIO_HEATER_1_PIN, "Heater1", gpio::OUT, 0); heaterGpiosCookie->addGpio(gpioIds::HEATER_1, gpioConfigHeater1); /* Pin H2-13 on stack connector */ - GpiodRegular* gpioConfigHeater2 = new GpiodRegular(std::string("gpiochip7"), 7, - std::string("Heater2"), gpio::OUT, 0); + GpiodRegular* gpioConfigHeater2 = new GpiodRegular(q7s::GPIO_HEATER_CHIP, + q7s::GPIO_HEATER_2_PIN, "Heater2", gpio::OUT, 0); heaterGpiosCookie->addGpio(gpioIds::HEATER_2, gpioConfigHeater2); - GpiodRegular* gpioConfigHeater3 = new GpiodRegular(std::string("gpiochip7"), 5, - std::string("Heater3"), gpio::OUT, 0); + GpiodRegular* gpioConfigHeater3 = new GpiodRegular(q7s::GPIO_HEATER_CHIP, + q7s::GPIO_HEATER_3_PIN, "Heater3", gpio::OUT, 0); heaterGpiosCookie->addGpio(gpioIds::HEATER_3, gpioConfigHeater3); - GpiodRegular* gpioConfigHeater4 = new GpiodRegular(std::string("gpiochip7"), 3, - std::string("Heater4"), gpio::OUT, 0); + GpiodRegular* gpioConfigHeater4 = new GpiodRegular(q7s::GPIO_HEATER_CHIP, + q7s::GPIO_HEATER_4_PIN, "Heater4", gpio::OUT, 0); heaterGpiosCookie->addGpio(gpioIds::HEATER_4, gpioConfigHeater4); - GpiodRegular* gpioConfigHeater5 = new GpiodRegular(std::string("gpiochip7"), 0, - std::string("Heater5"), gpio::OUT, 0); + GpiodRegular* gpioConfigHeater5 = new GpiodRegular(q7s::GPIO_HEATER_CHIP, + q7s::GPIO_HEATER_5_PIN, "Heater5", gpio::OUT, 0); heaterGpiosCookie->addGpio(gpioIds::HEATER_5, gpioConfigHeater5); - GpiodRegular* gpioConfigHeater6 = new GpiodRegular(std::string("gpiochip7"), 1, - std::string("Heater6"), gpio::OUT, 0); + GpiodRegular* gpioConfigHeater6 = new GpiodRegular(q7s::GPIO_HEATER_CHIP, + q7s::GPIO_HEATER_6_PIN, "Heater6", gpio::OUT, 0); heaterGpiosCookie->addGpio(gpioIds::HEATER_6, gpioConfigHeater6); - GpiodRegular* gpioConfigHeater7 = new GpiodRegular(std::string("gpiochip7"), 11, - std::string("Heater7"), gpio::OUT, 0); + GpiodRegular* gpioConfigHeater7 = new GpiodRegular(q7s::GPIO_HEATER_CHIP, + q7s::GPIO_HEATER_7_PIN, "Heater7", gpio::OUT, 0); heaterGpiosCookie->addGpio(gpioIds::HEATER_7, gpioConfigHeater7); new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, heaterGpiosCookie, @@ -513,11 +511,11 @@ void ObjectFactory::createHeaterComponents() { void ObjectFactory::createSolarArrayDeploymentComponents() { GpioCookie* solarArrayDeplCookie = new GpioCookie; - GpiodRegular* gpioConfigDeplSA0 = new GpiodRegular(std::string("gpiochip7"), 4, - std::string("DeplSA1"), gpio::OUT, 0); + GpiodRegular* gpioConfigDeplSA0 = new GpiodRegular(q7s::GPIO_SOLAR_ARR_DEPL_CHIP, + q7s::GPIO_SOL_DEPL_SA_0_PIN, "DeplSA0", gpio::OUT, 0); solarArrayDeplCookie->addGpio(gpioIds::DEPLSA1, gpioConfigDeplSA0); - GpiodRegular* gpioConfigDeplSA1 = new GpiodRegular(std::string("gpiochip7"), 2, - std::string("DeplSA2"), gpio::OUT, 0); + GpiodRegular* gpioConfigDeplSA1 = new GpiodRegular(q7s::GPIO_SOLAR_ARR_DEPL_CHIP, + q7s::GPIO_SOL_DEPL_SA_1_PIN, "DeplSA1", gpio::OUT, 0); solarArrayDeplCookie->addGpio(gpioIds::DEPLSA2, gpioConfigDeplSA1); //TODO: Find out burn time. For now set to 1000 ms. @@ -537,105 +535,105 @@ void ObjectFactory::createSyrlinksComponents() { void ObjectFactory::createRtdComponents(LinuxLibgpioIF *gpioComIF) { GpioCookie* rtdGpioCookie = new GpioCookie; - GpioCallback* gpioRtdIc3 = new GpioCallback(std::string("Chip select RTD IC3"), gpio::OUT, 1, + GpioCallback* gpioRtdIc3 = new GpioCallback("Chip select RTD IC3", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); rtdGpioCookie->addGpio(gpioIds::RTD_IC3, gpioRtdIc3); - GpioCallback* gpioRtdIc4 = new GpioCallback(std::string("Chip select RTD IC4"), gpio::OUT, 1, + GpioCallback* gpioRtdIc4 = new GpioCallback("Chip select RTD IC4", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); rtdGpioCookie->addGpio(gpioIds::RTD_IC4, gpioRtdIc4); - GpioCallback* gpioRtdIc5 = new GpioCallback(std::string("Chip select RTD IC5"), gpio::OUT, 1, + GpioCallback* gpioRtdIc5 = new GpioCallback("Chip select RTD IC5", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); rtdGpioCookie->addGpio(gpioIds::RTD_IC5, gpioRtdIc5); - GpioCallback* gpioRtdIc6 = new GpioCallback(std::string("Chip select RTD IC6"), gpio::OUT, 1, + GpioCallback* gpioRtdIc6 = new GpioCallback("Chip select RTD IC6", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); rtdGpioCookie->addGpio(gpioIds::RTD_IC6, gpioRtdIc6); - GpioCallback* gpioRtdIc7 = new GpioCallback(std::string("Chip select RTD IC7"), gpio::OUT, 1, + GpioCallback* gpioRtdIc7 = new GpioCallback("Chip select RTD IC7", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); rtdGpioCookie->addGpio(gpioIds::RTD_IC7, gpioRtdIc7); - GpioCallback* gpioRtdIc8 = new GpioCallback(std::string("Chip select RTD IC8"), gpio::OUT, 1, + GpioCallback* gpioRtdIc8 = new GpioCallback("Chip select RTD IC8", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); rtdGpioCookie->addGpio(gpioIds::RTD_IC8, gpioRtdIc8); - GpioCallback* gpioRtdIc9 = new GpioCallback(std::string("Chip select RTD IC9"), gpio::OUT, 1, + GpioCallback* gpioRtdIc9 = new GpioCallback("Chip select RTD IC9", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); rtdGpioCookie->addGpio(gpioIds::RTD_IC9, gpioRtdIc9); - GpioCallback* gpioRtdIc10 = new GpioCallback(std::string("Chip select RTD IC10"), gpio::OUT, 1, + GpioCallback* gpioRtdIc10 = new GpioCallback("Chip select RTD IC10", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); rtdGpioCookie->addGpio(gpioIds::RTD_IC10, gpioRtdIc10); - GpioCallback* gpioRtdIc11 = new GpioCallback(std::string("Chip select RTD IC11"), gpio::OUT, 1, + GpioCallback* gpioRtdIc11 = new GpioCallback("Chip select RTD IC11", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); rtdGpioCookie->addGpio(gpioIds::RTD_IC11, gpioRtdIc11); - GpioCallback* gpioRtdIc12 = new GpioCallback(std::string("Chip select RTD IC12"), gpio::OUT, 1, + GpioCallback* gpioRtdIc12 = new GpioCallback("Chip select RTD IC12", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); rtdGpioCookie->addGpio(gpioIds::RTD_IC12, gpioRtdIc12); - GpioCallback* gpioRtdIc13 = new GpioCallback(std::string("Chip select RTD IC13"), gpio::OUT, 1, + GpioCallback* gpioRtdIc13 = new GpioCallback("Chip select RTD IC13", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); rtdGpioCookie->addGpio(gpioIds::RTD_IC13, gpioRtdIc13); - GpioCallback* gpioRtdIc14 = new GpioCallback(std::string("Chip select RTD IC14"), gpio::OUT, 1, + GpioCallback* gpioRtdIc14 = new GpioCallback("Chip select RTD IC14", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); rtdGpioCookie->addGpio(gpioIds::RTD_IC14, gpioRtdIc14); - GpioCallback* gpioRtdIc15 = new GpioCallback(std::string("Chip select RTD IC15"), gpio::OUT, 1, + GpioCallback* gpioRtdIc15 = new GpioCallback("Chip select RTD IC15", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); rtdGpioCookie->addGpio(gpioIds::RTD_IC15, gpioRtdIc15); - GpioCallback* gpioRtdIc16 = new GpioCallback(std::string("Chip select RTD IC16"), gpio::OUT, 1, + GpioCallback* gpioRtdIc16 = new GpioCallback("Chip select RTD IC16", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); rtdGpioCookie->addGpio(gpioIds::RTD_IC16, gpioRtdIc16); - GpioCallback* gpioRtdIc17 = new GpioCallback(std::string("Chip select RTD IC17"), gpio::OUT, 1, + GpioCallback* gpioRtdIc17 = new GpioCallback("Chip select RTD IC17", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); rtdGpioCookie->addGpio(gpioIds::RTD_IC17, gpioRtdIc17); - GpioCallback* gpioRtdIc18 = new GpioCallback(std::string("Chip select RTD IC18"), gpio::OUT, 1, + GpioCallback* gpioRtdIc18 = new GpioCallback("Chip select RTD IC18", gpio::OUT, gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); rtdGpioCookie->addGpio(gpioIds::RTD_IC18, gpioRtdIc18); gpioComIF->addGpios(rtdGpioCookie); SpiCookie* spiRtdIc3 = new SpiCookie(addresses::RTD_IC3, gpioIds::RTD_IC3, - std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, - spi::SpiModes::MODE_3, 2000000); + q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, + spi::SpiModes::MODE_1, spi::RTD_SPEED); SpiCookie* spiRtdIc4 = new SpiCookie(addresses::RTD_IC4, gpioIds::RTD_IC4, - std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, - spi::SpiModes::MODE_1, 2000000); + q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, + spi::SpiModes::MODE_1, spi::RTD_SPEED); SpiCookie* spiRtdIc5 = new SpiCookie(addresses::RTD_IC5, gpioIds::RTD_IC5, - std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, - spi::SpiModes::MODE_1, 2000000); + q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, + spi::SpiModes::MODE_1, spi::RTD_SPEED); SpiCookie* spiRtdIc6 = new SpiCookie(addresses::RTD_IC6, gpioIds::RTD_IC6, - std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, - spi::SpiModes::MODE_1, 2000000); + q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, + spi::SpiModes::MODE_1, spi::RTD_SPEED); SpiCookie* spiRtdIc7 = new SpiCookie(addresses::RTD_IC7, gpioIds::RTD_IC7, - std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, - spi::SpiModes::MODE_1, 2000000); + q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, + spi::SpiModes::MODE_1, spi::RTD_SPEED); SpiCookie* spiRtdIc8 = new SpiCookie(addresses::RTD_IC8, gpioIds::RTD_IC8, - std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, - spi::SpiModes::MODE_1, 2000000); + q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, + spi::SpiModes::MODE_1, spi::RTD_SPEED); SpiCookie* spiRtdIc9 = new SpiCookie(addresses::RTD_IC9, gpioIds::RTD_IC9, - std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, - spi::SpiModes::MODE_1, 2000000); + q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, + spi::SpiModes::MODE_1, spi::RTD_SPEED); SpiCookie* spiRtdIc10 = new SpiCookie(addresses::RTD_IC10, gpioIds::RTD_IC10, - std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, - spi::SpiModes::MODE_1, 2000000); + q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, + spi::SpiModes::MODE_1, spi::RTD_SPEED); SpiCookie* spiRtdIc11 = new SpiCookie(addresses::RTD_IC11, gpioIds::RTD_IC11, - std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, - spi::SpiModes::MODE_1, 2000000); + q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, + spi::SpiModes::MODE_1, spi::RTD_SPEED); SpiCookie* spiRtdIc12 = new SpiCookie(addresses::RTD_IC12, gpioIds::RTD_IC12, - std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, - spi::SpiModes::MODE_1, 2000000); + q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, + spi::SpiModes::MODE_1, spi::RTD_SPEED); SpiCookie* spiRtdIc13 = new SpiCookie(addresses::RTD_IC13, gpioIds::RTD_IC13, - std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, - spi::SpiModes::MODE_1, 2000000); + q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, + spi::SpiModes::MODE_1, spi::RTD_SPEED); SpiCookie* spiRtdIc14 = new SpiCookie(addresses::RTD_IC14, gpioIds::RTD_IC14, - std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, - spi::SpiModes::MODE_1, 2000000); + q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, + spi::SpiModes::MODE_1, spi::RTD_SPEED); SpiCookie* spiRtdIc15 = new SpiCookie(addresses::RTD_IC15, gpioIds::RTD_IC15, - std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, - spi::SpiModes::MODE_1, 3900000); + q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, + spi::SpiModes::MODE_1, spi::RTD_SPEED); SpiCookie* spiRtdIc16 = new SpiCookie(addresses::RTD_IC16, gpioIds::RTD_IC16, std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, - spi::SpiModes::MODE_1, 2000000); + spi::SpiModes::MODE_1, spi::RTD_SPEED); SpiCookie* spiRtdIc17 = new SpiCookie(addresses::RTD_IC17, gpioIds::RTD_IC17, - std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, - spi::SpiModes::MODE_1, 2000000); + q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, + spi::SpiModes::MODE_1, spi::RTD_SPEED); SpiCookie* spiRtdIc18 = new SpiCookie(addresses::RTD_IC18, gpioIds::RTD_IC18, - std::string(q7s::SPI_DEFAULT_DEV), Max31865Definitions::MAX_REPLY_SIZE, - spi::SpiModes::MODE_1, 2000000); + q7s::SPI_DEFAULT_DEV, Max31865Definitions::MAX_REPLY_SIZE, + spi::SpiModes::MODE_1, spi::RTD_SPEED); Max31865PT1000Handler* rtdIc3 = new Max31865PT1000Handler(objects::RTD_IC3, objects::SPI_COM_IF, spiRtdIc3, 0); // 0 is switchId @@ -691,28 +689,28 @@ void ObjectFactory::createRtdComponents(LinuxLibgpioIF *gpioComIF) { void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) { GpioCookie* gpioCookieRw = new GpioCookie; GpioCallback* csRw1 = new GpioCallback("Chip select reaction wheel 1", gpio::OUT, - 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieRw->addGpio(gpioIds::CS_RW1, csRw1); GpioCallback* csRw2 = new GpioCallback("Chip select reaction wheel 2", gpio::OUT, - 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieRw->addGpio(gpioIds::CS_RW2, csRw2); GpioCallback* csRw3 = new GpioCallback("Chip select reaction wheel 3", gpio::OUT, - 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieRw->addGpio(gpioIds::CS_RW3, csRw3); GpioCallback* csRw4 = new GpioCallback("Chip select reaction wheel 4", gpio::OUT, - 1, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); + gpio::HIGH, &gpioCallbacks::spiCsDecoderCallback, gpioComIF); gpioCookieRw->addGpio(gpioIds::CS_RW4, csRw4); - GpiodRegular* enRw1 = new GpiodRegular("gpiochip5", 7, + GpiodRegular* enRw1 = new GpiodRegular(q7s::GPIO_RW_DEFAULT_CHIP, q7s::GPIO_RW_0_CS, "Enable reaction wheel 1", gpio::OUT, 0); gpioCookieRw->addGpio(gpioIds::EN_RW1, enRw1); - GpiodRegular* enRw2 = new GpiodRegular("gpiochip5", 3, + GpiodRegular* enRw2 = new GpiodRegular(q7s::GPIO_RW_DEFAULT_CHIP, q7s::GPIO_RW_1_CS, "Enable reaction wheel 2", gpio::OUT, 0); gpioCookieRw->addGpio(gpioIds::EN_RW2, enRw2); - GpiodRegular* enRw3 = new GpiodRegular("gpiochip5", 11, + GpiodRegular* enRw3 = new GpiodRegular(q7s::GPIO_RW_DEFAULT_CHIP, q7s::GPIO_RW_2_CS, "Enable reaction wheel 3", gpio::OUT, 0); gpioCookieRw->addGpio(gpioIds::EN_RW3, enRw3); - GpiodRegular* enRw4 = new GpiodRegular("gpiochip5", 6, + GpiodRegular* enRw4 = new GpiodRegular(q7s::GPIO_RW_DEFAULT_CHIP, q7s::GPIO_RW_3_CS, "Enable reaction wheel 4", gpio::OUT, 0); gpioCookieRw->addGpio(gpioIds::EN_RW4, enRw4); @@ -721,7 +719,8 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) { * 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). */ - GpiodRegular* spiMux = new GpiodRegular("gpiochip11", 54, "EMIO 0 SPI Mux", gpio::OUT, 0); + GpiodRegular* spiMux = new GpiodRegular(q7s::GPIO_RW_SPI_MUX_CHIP, q7s::GPIO_RW_SPI_MUX_CS, + "EMIO 0 SPI Mux", gpio::OUT, 0); gpioCookieRw->addGpio(gpioIds::SPI_MUX, spiMux); gpioComIF->addGpios(gpioCookieRw); diff --git a/bsp_q7s/core/ObjectFactory.h b/bsp_q7s/core/ObjectFactory.h index 6cd1b378..0e7ff9ff 100644 --- a/bsp_q7s/core/ObjectFactory.h +++ b/bsp_q7s/core/ObjectFactory.h @@ -3,17 +3,19 @@ class LinuxLibgpioIF; class UartComIF; +class SpiComIF; namespace ObjectFactory { void setStatics(); void produce(void* args); -void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF); +void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF, + SpiComIF** spiComIF); void createTmpComponents(); void createPcduComponents(); void createRadSensorComponent(LinuxLibgpioIF* gpioComIF); -void createSunSensorComponents(LinuxLibgpioIF* gpioComIF); +void createSunSensorComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF); void createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComIF* uartComIF); void createHeaterComponents(); void createSolarArrayDeploymentComponents(); diff --git a/common/config/commonObjects.h b/common/config/commonObjects.h index ef61d4b8..6b987a32 100644 --- a/common/config/commonObjects.h +++ b/common/config/commonObjects.h @@ -75,10 +75,10 @@ enum commonObjects: uint32_t { GPS0_HANDLER = 0x44130045, GPS1_HANDLER = 0x44130146, - RW1 = 0x44120001, - RW2 = 0x44120002, - RW3 = 0x44120003, - RW4 = 0x44120004, + RW1 = 0x44120047, + RW2 = 0x44120148, + RW3 = 0x44120249, + RW4 = 0x44120350, START_TRACKER = 0x44130001, diff --git a/common/config/devConf.h b/common/config/devConf.h index e5201450..ce21c8b3 100644 --- a/common/config/devConf.h +++ b/common/config/devConf.h @@ -29,11 +29,15 @@ static constexpr spi::SpiModes DEFAULT_ADIS16507_MODE = spi::SpiModes::MODE_3; static constexpr uint32_t RW_SPEED = 300000; static constexpr spi::SpiModes RW_MODE = spi::SpiModes::MODE_0; +static constexpr uint32_t RTD_SPEED = 2000000; + } namespace uart { static constexpr uint32_t PLOC_MPSOC_BAUD = 115200; +static constexpr uint32_t PLOC_SUPERVISOR_BAUD = 115200; +static constexpr uint32_t STAR_TRACKER_BAUD = 115200; } diff --git a/fsfw b/fsfw index 406b77ea..e3697d6d 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 406b77ea81816c2113aec9239b3e5d2ed71e7cb5 +Subproject commit e3697d6d8c38b278ebc34704fa772f671e36eb57 diff --git a/linux/boardtest/SpiTestClass.cpp b/linux/boardtest/SpiTestClass.cpp index 84750f66..290318a2 100644 --- a/linux/boardtest/SpiTestClass.cpp +++ b/linux/boardtest/SpiTestClass.cpp @@ -223,7 +223,7 @@ void SpiTestClass::performL3gTest(uint8_t l3gId) { currentGpioId = gpioIds::GYRO_1_L3G_CS; } else { - currentGpioId = gpioIds::GYRO_2_L3G_CS; + currentGpioId = gpioIds::GYRO_3_L3G_CS; } uint32_t spiSpeed = 3'900'000; spi::SpiModes spiMode = spi::SpiModes::MODE_3; @@ -352,7 +352,7 @@ void SpiTestClass::acsInit() { gpio = new GpiodRegular(q7sGpioName5, gyro2L3gd20ChipSelect, "GYRO_2_L3G", gpio::Direction::OUT, gpio::HIGH); - gpioCookie->addGpio(gpioIds::GYRO_2_L3G_CS, gpio); + gpioCookie->addGpio(gpioIds::GYRO_3_L3G_CS, gpio); gpio = new GpiodRegular(q7sGpioName6, mgm2Lis3mdlChipSelect, "MGM_2_LIS3", gpio::Direction::OUT, gpio::HIGH); diff --git a/linux/fsfwconfig/devices/gpioIds.h b/linux/fsfwconfig/devices/gpioIds.h index aad06629..ae91e905 100644 --- a/linux/fsfwconfig/devices/gpioIds.h +++ b/linux/fsfwconfig/devices/gpioIds.h @@ -4,86 +4,87 @@ #include namespace gpioIds { - enum gpioId_t { - HEATER_0, - HEATER_1, - HEATER_2, - HEATER_3, - HEATER_4, - HEATER_5, - HEATER_6, - HEATER_7, - DEPLSA1, - DEPLSA2, +enum gpioId_t { + HEATER_0, + HEATER_1, + HEATER_2, + HEATER_3, + HEATER_4, + HEATER_5, + HEATER_6, + HEATER_7, + DEPLSA1, + DEPLSA2, - MGM_0_LIS3_CS, - MGM_1_RM3100_CS, - GYRO_0_ADIS_CS, - GYRO_1_L3G_CS, - GYRO_2_L3G_CS, - MGM_2_LIS3_CS, - MGM_3_RM3100_CS, + MGM_0_LIS3_CS, + MGM_1_RM3100_CS, + GYRO_0_ADIS_CS, + GYRO_1_L3G_CS, + GYRO_2_ADIS_CS, + GYRO_3_L3G_CS, + MGM_2_LIS3_CS, + MGM_3_RM3100_CS, - TEST_ID_0, - TEST_ID_1, + TEST_ID_0, + TEST_ID_1, - RTD_IC3, - RTD_IC4, - RTD_IC5, - RTD_IC6, - RTD_IC7, - RTD_IC8, - RTD_IC9, - RTD_IC10, - RTD_IC11, - RTD_IC12, - RTD_IC13, - RTD_IC14, - RTD_IC15, - RTD_IC16, - RTD_IC17, - RTD_IC18, + RTD_IC3, + RTD_IC4, + RTD_IC5, + RTD_IC6, + RTD_IC7, + RTD_IC8, + RTD_IC9, + RTD_IC10, + RTD_IC11, + RTD_IC12, + RTD_IC13, + RTD_IC14, + RTD_IC15, + RTD_IC16, + RTD_IC17, + RTD_IC18, - CS_SUS_1, - CS_SUS_2, - CS_SUS_3, - CS_SUS_4, - CS_SUS_5, - CS_SUS_6, - CS_SUS_7, - CS_SUS_8, - CS_SUS_9, - CS_SUS_10, - CS_SUS_11, - CS_SUS_12, - CS_SUS_13, + CS_SUS_1, + CS_SUS_2, + CS_SUS_3, + CS_SUS_4, + CS_SUS_5, + CS_SUS_6, + CS_SUS_7, + CS_SUS_8, + CS_SUS_9, + CS_SUS_10, + CS_SUS_11, + CS_SUS_12, + CS_SUS_13, - SPI_MUX_BIT_1, - SPI_MUX_BIT_2, - SPI_MUX_BIT_3, - SPI_MUX_BIT_4, - SPI_MUX_BIT_5, - SPI_MUX_BIT_6, + SPI_MUX_BIT_1, + SPI_MUX_BIT_2, + SPI_MUX_BIT_3, + SPI_MUX_BIT_4, + SPI_MUX_BIT_5, + SPI_MUX_BIT_6, - CS_RAD_SENSOR, + CS_RAD_SENSOR, - PAPB_BUSY_N, - PAPB_EMPTY, + PAPB_BUSY_N, + PAPB_EMPTY, - EN_RW1, - EN_RW2, - EN_RW3, - EN_RW4, + EN_RW1, + EN_RW2, + EN_RW3, + EN_RW4, - CS_RW1, - CS_RW2, - CS_RW3, - CS_RW4, + CS_RW1, + CS_RW2, + CS_RW3, + CS_RW4, - EN_RW_CS, + EN_RW_CS, - SPI_MUX - }; + SPI_MUX +}; } diff --git a/tmtc b/tmtc index 28e527b8..261eef44 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 28e527b8f9002a8baa03d90f1e5693796cd1e237 +Subproject commit 261eef449e309549644d8566c8d1034c5696335d