|
|
@ -290,14 +290,15 @@ void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
|
|
|
|
using namespace gpio;
|
|
|
|
GpioCookie* gpioCookieRadSensor = new GpioCookie;
|
|
|
|
GpioCookie* gpioCookieRadSensor = new GpioCookie;
|
|
|
|
std::stringstream consumer;
|
|
|
|
std::stringstream consumer;
|
|
|
|
consumer << "0x" << std::hex << objects::RAD_SENSOR;
|
|
|
|
consumer << "0x" << std::hex << objects::RAD_SENSOR;
|
|
|
|
GpiodRegularByLineName* gpio = new GpiodRegularByLineName(
|
|
|
|
GpiodRegularByLineName* gpio = new GpiodRegularByLineName(
|
|
|
|
q7s::gpioNames::RAD_SENSOR_CHIP_SELECT, consumer.str(), gpio::DIR_OUT, gpio::HIGH);
|
|
|
|
q7s::gpioNames::RAD_SENSOR_CHIP_SELECT, consumer.str(), Direction::OUT, Levels::HIGH);
|
|
|
|
gpioCookieRadSensor->addGpio(gpioIds::CS_RAD_SENSOR, gpio);
|
|
|
|
gpioCookieRadSensor->addGpio(gpioIds::CS_RAD_SENSOR, gpio);
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_RADFET, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_RADFET, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
gpioCookieRadSensor->addGpio(gpioIds::ENABLE_RADFET, gpio);
|
|
|
|
gpioCookieRadSensor->addGpio(gpioIds::ENABLE_RADFET, gpio);
|
|
|
|
gpioComIF->addGpios(gpioCookieRadSensor);
|
|
|
|
gpioComIF->addGpios(gpioCookieRadSensor);
|
|
|
|
|
|
|
|
|
|
|
@ -314,43 +315,44 @@ void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF) {
|
|
|
|
void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF) {
|
|
|
|
|
|
|
|
using namespace gpio;
|
|
|
|
GpioCookie* gpioCookieSus = new GpioCookie();
|
|
|
|
GpioCookie* gpioCookieSus = new GpioCookie();
|
|
|
|
GpioCallback* susgpio = nullptr;
|
|
|
|
GpioCallback* susgpio = nullptr;
|
|
|
|
|
|
|
|
|
|
|
|
susgpio = new GpioCallback("Chip select SUS 0", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
susgpio = new GpioCallback("Chip select SUS 0", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
gpioCookieSus->addGpio(gpioIds::CS_SUS_0, susgpio);
|
|
|
|
gpioCookieSus->addGpio(gpioIds::CS_SUS_0, susgpio);
|
|
|
|
susgpio = new GpioCallback("Chip select SUS 1", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
susgpio = new GpioCallback("Chip select SUS 1", Direction::OUT, Levels::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::DIR_OUT, gpio::HIGH,
|
|
|
|
susgpio = new GpioCallback("Chip select SUS 2", Direction::OUT, Levels::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::DIR_OUT, gpio::HIGH,
|
|
|
|
susgpio = new GpioCallback("Chip select SUS 3", Direction::OUT, Levels::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::DIR_OUT, gpio::HIGH,
|
|
|
|
susgpio = new GpioCallback("Chip select SUS 4", Direction::OUT, Levels::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::DIR_OUT, gpio::HIGH,
|
|
|
|
susgpio = new GpioCallback("Chip select SUS 5", Direction::OUT, Levels::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::DIR_OUT, gpio::HIGH,
|
|
|
|
susgpio = new GpioCallback("Chip select SUS 6", Direction::OUT, Levels::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::DIR_OUT, gpio::HIGH,
|
|
|
|
susgpio = new GpioCallback("Chip select SUS 7", Direction::OUT, Levels::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::DIR_OUT, gpio::HIGH,
|
|
|
|
susgpio = new GpioCallback("Chip select SUS 8", Direction::OUT, Levels::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::DIR_OUT, gpio::HIGH,
|
|
|
|
susgpio = new GpioCallback("Chip select SUS 9", Direction::OUT, Levels::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::DIR_OUT, gpio::HIGH,
|
|
|
|
susgpio = new GpioCallback("Chip select SUS 10", Direction::OUT, Levels::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::DIR_OUT, gpio::HIGH,
|
|
|
|
susgpio = new GpioCallback("Chip select SUS 11", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
gpioCookieSus->addGpio(gpioIds::CS_SUS_11, susgpio);
|
|
|
|
gpioCookieSus->addGpio(gpioIds::CS_SUS_11, susgpio);
|
|
|
|
|
|
|
|
|
|
|
@ -473,101 +475,102 @@ void ObjectFactory::createSunSensorComponents(LinuxLibgpioIF* gpioComIF, SpiComI
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComIF* uartComIF) {
|
|
|
|
void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComIF* uartComIF) {
|
|
|
|
|
|
|
|
using namespace gpio;
|
|
|
|
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
|
|
|
|
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
|
|
|
|
|
|
|
|
|
|
|
|
std::stringstream consumer;
|
|
|
|
std::stringstream consumer;
|
|
|
|
GpiodRegularByLineName* gpio = nullptr;
|
|
|
|
GpiodRegularByLineName* gpio = nullptr;
|
|
|
|
consumer << "0x" << std::hex << objects::GYRO_0_ADIS_HANDLER;
|
|
|
|
consumer << "0x" << std::hex << objects::GYRO_0_ADIS_HANDLER;
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_0_ADIS_CS, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_0_ADIS_CS, consumer.str(), Direction::OUT,
|
|
|
|
gpio::HIGH);
|
|
|
|
Levels::HIGH);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ADIS_CS, gpio);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ADIS_CS, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::GYRO_1_L3G_HANDLER;
|
|
|
|
consumer << "0x" << std::hex << objects::GYRO_1_L3G_HANDLER;
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_1_L3G_CS, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_1_L3G_CS, consumer.str(), Direction::OUT,
|
|
|
|
gpio::HIGH);
|
|
|
|
Levels::HIGH);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_1_L3G_CS, gpio);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_1_L3G_CS, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::GYRO_2_ADIS_HANDLER;
|
|
|
|
consumer << "0x" << std::hex << objects::GYRO_2_ADIS_HANDLER;
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_2_ADIS_CS, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_2_ADIS_CS, consumer.str(), Direction::OUT,
|
|
|
|
gpio::HIGH);
|
|
|
|
Levels::HIGH);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ADIS_CS, gpio);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ADIS_CS, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::GYRO_3_L3G_HANDLER;
|
|
|
|
consumer << "0x" << std::hex << objects::GYRO_3_L3G_HANDLER;
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_3_L3G_CS, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_3_L3G_CS, consumer.str(), Direction::OUT,
|
|
|
|
gpio::HIGH);
|
|
|
|
Levels::HIGH);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_3_L3G_CS, gpio);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_3_L3G_CS, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::MGM_0_LIS3_HANDLER;
|
|
|
|
consumer << "0x" << std::hex << objects::MGM_0_LIS3_HANDLER;
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_0_CS, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_0_CS, consumer.str(), Direction::OUT,
|
|
|
|
gpio::HIGH);
|
|
|
|
Levels::HIGH);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::MGM_0_LIS3_CS, gpio);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::MGM_0_LIS3_CS, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::MGM_1_RM3100_HANDLER;
|
|
|
|
consumer << "0x" << std::hex << objects::MGM_1_RM3100_HANDLER;
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_1_CS, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_1_CS, consumer.str(), Direction::OUT,
|
|
|
|
gpio::HIGH);
|
|
|
|
Levels::HIGH);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::MGM_1_RM3100_CS, gpio);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::MGM_1_RM3100_CS, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::MGM_2_LIS3_HANDLER;
|
|
|
|
consumer << "0x" << std::hex << objects::MGM_2_LIS3_HANDLER;
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_2_CS, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_2_CS, consumer.str(), Direction::OUT,
|
|
|
|
gpio::HIGH);
|
|
|
|
Levels::HIGH);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::MGM_2_LIS3_CS, gpio);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::MGM_2_LIS3_CS, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::MGM_3_RM3100_HANDLER;
|
|
|
|
consumer << "0x" << std::hex << objects::MGM_3_RM3100_HANDLER;
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_3_CS, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_3_CS, consumer.str(), Direction::OUT,
|
|
|
|
gpio::HIGH);
|
|
|
|
Levels::HIGH);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::MGM_3_RM3100_CS, gpio);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::MGM_3_RM3100_CS, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::GPS_CONTROLLER;
|
|
|
|
consumer << "0x" << std::hex << objects::GPS_CONTROLLER;
|
|
|
|
// GNSS reset pins are active low
|
|
|
|
// GNSS reset pins are active low
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::RESET_GNSS_0, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::RESET_GNSS_0, consumer.str(), Direction::OUT,
|
|
|
|
gpio::HIGH);
|
|
|
|
Levels::HIGH);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_0_NRESET, gpio);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_0_NRESET, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::GPS_CONTROLLER;
|
|
|
|
consumer << "0x" << std::hex << objects::GPS_CONTROLLER;
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::RESET_GNSS_1, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::RESET_GNSS_1, consumer.str(), Direction::OUT,
|
|
|
|
gpio::HIGH);
|
|
|
|
Levels::HIGH);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_1_NRESET, gpio);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_1_NRESET, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::GYRO_0_ADIS_HANDLER;
|
|
|
|
consumer << "0x" << std::hex << objects::GYRO_0_ADIS_HANDLER;
|
|
|
|
// Enable pins must be pulled low for regular operations
|
|
|
|
// Enable pins must be pulled low for regular operations
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_0_ENABLE, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_0_ENABLE, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ENABLE, gpio);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ENABLE, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::GYRO_2_ADIS_HANDLER;
|
|
|
|
consumer << "0x" << std::hex << objects::GYRO_2_ADIS_HANDLER;
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_2_ENABLE, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_2_ENABLE, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ENABLE, gpio);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ENABLE, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
// Enable pins for GNSS
|
|
|
|
// Enable pins for GNSS
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::GPS_CONTROLLER;
|
|
|
|
consumer << "0x" << std::hex << objects::GPS_CONTROLLER;
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GNSS_0_ENABLE, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GNSS_0_ENABLE, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_0_ENABLE, gpio);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_0_ENABLE, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::GPS_CONTROLLER;
|
|
|
|
consumer << "0x" << std::hex << objects::GPS_CONTROLLER;
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GNSS_1_ENABLE, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GNSS_1_ENABLE, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_1_ENABLE, gpio);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_1_ENABLE, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
// Select pin. 0 for GPS side A, 1 for GPS side B
|
|
|
|
// Select pin. 0 for GPS side A, 1 for GPS side B
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::GPS_CONTROLLER;
|
|
|
|
consumer << "0x" << std::hex << objects::GPS_CONTROLLER;
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GNSS_SELECT, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GNSS_SELECT, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_SELECT, gpio);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_SELECT, gpio);
|
|
|
|
gpioComIF->addGpios(gpioCookieAcsBoard);
|
|
|
|
gpioComIF->addGpios(gpioCookieAcsBoard);
|
|
|
|
|
|
|
|
|
|
|
@ -694,43 +697,44 @@ void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComI
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::createHeaterComponents() {
|
|
|
|
void ObjectFactory::createHeaterComponents() {
|
|
|
|
|
|
|
|
using namespace gpio;
|
|
|
|
GpioCookie* heaterGpiosCookie = new GpioCookie;
|
|
|
|
GpioCookie* heaterGpiosCookie = new GpioCookie;
|
|
|
|
GpiodRegularByLineName* gpio = nullptr;
|
|
|
|
GpiodRegularByLineName* gpio = nullptr;
|
|
|
|
|
|
|
|
|
|
|
|
std::stringstream consumer;
|
|
|
|
std::stringstream consumer;
|
|
|
|
consumer << "0x" << std::hex << objects::HEATER_HANDLER;
|
|
|
|
consumer << "0x" << std::hex << objects::HEATER_HANDLER;
|
|
|
|
/* Pin H2-11 on stack connector */
|
|
|
|
/* Pin H2-11 on stack connector */
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_0, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_0, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_0, gpio);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_0, gpio);
|
|
|
|
/* Pin H2-12 on stack connector */
|
|
|
|
/* Pin H2-12 on stack connector */
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_1, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_1, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_1, gpio);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_1, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
/* Pin H2-13 on stack connector */
|
|
|
|
/* Pin H2-13 on stack connector */
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_2, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_2, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_2, gpio);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_2, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_3, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_3, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_3, gpio);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_3, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_4, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_4, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_4, gpio);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_4, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_5, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_5, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_5, gpio);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_5, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_6, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_6, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_6, gpio);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_6, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_7, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_7, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_7, gpio);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_7, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, heaterGpiosCookie,
|
|
|
|
new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, heaterGpiosCookie,
|
|
|
@ -738,16 +742,17 @@ void ObjectFactory::createHeaterComponents() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::createSolarArrayDeploymentComponents() {
|
|
|
|
void ObjectFactory::createSolarArrayDeploymentComponents() {
|
|
|
|
|
|
|
|
using namespace gpio;
|
|
|
|
GpioCookie* solarArrayDeplCookie = new GpioCookie;
|
|
|
|
GpioCookie* solarArrayDeplCookie = new GpioCookie;
|
|
|
|
GpiodRegularByLineName* gpio = nullptr;
|
|
|
|
GpiodRegularByLineName* gpio = nullptr;
|
|
|
|
|
|
|
|
|
|
|
|
std::stringstream consumer;
|
|
|
|
std::stringstream consumer;
|
|
|
|
consumer << "0x" << std::hex << objects::SOLAR_ARRAY_DEPL_HANDLER;
|
|
|
|
consumer << "0x" << std::hex << objects::SOLAR_ARRAY_DEPL_HANDLER;
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::SA_DPL_PIN_0, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::SA_DPL_PIN_0, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA1, gpio);
|
|
|
|
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA1, gpio);
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::SA_DPL_PIN_1, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::SA_DPL_PIN_1, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA2, gpio);
|
|
|
|
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA2, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: Find out burn time. For now set to 1000 ms.
|
|
|
|
// TODO: Find out burn time. For now set to 1000 ms.
|
|
|
@ -767,54 +772,55 @@ void ObjectFactory::createSyrlinksComponents() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::createRtdComponents(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
void ObjectFactory::createRtdComponents(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
|
|
|
|
using namespace gpio;
|
|
|
|
GpioCookie* rtdGpioCookie = new GpioCookie;
|
|
|
|
GpioCookie* rtdGpioCookie = new GpioCookie;
|
|
|
|
|
|
|
|
|
|
|
|
GpioCallback* gpioRtdIc0 = new GpioCallback("Chip select RTD IC0", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* gpioRtdIc0 = new GpioCallback("Chip select RTD IC0", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_3, gpioRtdIc0);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_3, gpioRtdIc0);
|
|
|
|
GpioCallback* gpioRtdIc1 = new GpioCallback("Chip select RTD IC1", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* gpioRtdIc1 = new GpioCallback("Chip select RTD IC1", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_4, gpioRtdIc1);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_4, gpioRtdIc1);
|
|
|
|
GpioCallback* gpioRtdIc2 = new GpioCallback("Chip select RTD IC2", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* gpioRtdIc2 = new GpioCallback("Chip select RTD IC2", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_5, gpioRtdIc2);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_5, gpioRtdIc2);
|
|
|
|
GpioCallback* gpioRtdIc3 = new GpioCallback("Chip select RTD IC3", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* gpioRtdIc3 = new GpioCallback("Chip select RTD IC3", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_6, gpioRtdIc3);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_6, gpioRtdIc3);
|
|
|
|
GpioCallback* gpioRtdIc4 = new GpioCallback("Chip select RTD IC4", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* gpioRtdIc4 = new GpioCallback("Chip select RTD IC4", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_7, gpioRtdIc4);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_7, gpioRtdIc4);
|
|
|
|
GpioCallback* gpioRtdIc5 = new GpioCallback("Chip select RTD IC5", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* gpioRtdIc5 = new GpioCallback("Chip select RTD IC5", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_8, gpioRtdIc5);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_8, gpioRtdIc5);
|
|
|
|
GpioCallback* gpioRtdIc6 = new GpioCallback("Chip select RTD IC6", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* gpioRtdIc6 = new GpioCallback("Chip select RTD IC6", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_9, gpioRtdIc6);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_9, gpioRtdIc6);
|
|
|
|
GpioCallback* gpioRtdIc7 = new GpioCallback("Chip select RTD IC7", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* gpioRtdIc7 = new GpioCallback("Chip select RTD IC7", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_10, gpioRtdIc7);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_10, gpioRtdIc7);
|
|
|
|
GpioCallback* gpioRtdIc8 = new GpioCallback("Chip select RTD IC8", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* gpioRtdIc8 = new GpioCallback("Chip select RTD IC8", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_11, gpioRtdIc8);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_11, gpioRtdIc8);
|
|
|
|
GpioCallback* gpioRtdIc9 = new GpioCallback("Chip select RTD IC9", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* gpioRtdIc9 = new GpioCallback("Chip select RTD IC9", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_12, gpioRtdIc9);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_12, gpioRtdIc9);
|
|
|
|
GpioCallback* gpioRtdIc10 = new GpioCallback("Chip select RTD IC10", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* gpioRtdIc10 = new GpioCallback("Chip select RTD IC10", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_13, gpioRtdIc10);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_13, gpioRtdIc10);
|
|
|
|
GpioCallback* gpioRtdIc11 = new GpioCallback("Chip select RTD IC11", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* gpioRtdIc11 = new GpioCallback("Chip select RTD IC11", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_14, gpioRtdIc11);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_14, gpioRtdIc11);
|
|
|
|
GpioCallback* gpioRtdIc12 = new GpioCallback("Chip select RTD IC12", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* gpioRtdIc12 = new GpioCallback("Chip select RTD IC12", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_15, gpioRtdIc12);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_15, gpioRtdIc12);
|
|
|
|
GpioCallback* gpioRtdIc13 = new GpioCallback("Chip select RTD IC13", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* gpioRtdIc13 = new GpioCallback("Chip select RTD IC13", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_16, gpioRtdIc13);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_16, gpioRtdIc13);
|
|
|
|
GpioCallback* gpioRtdIc14 = new GpioCallback("Chip select RTD IC14", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* gpioRtdIc14 = new GpioCallback("Chip select RTD IC14", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_17, gpioRtdIc14);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_17, gpioRtdIc14);
|
|
|
|
GpioCallback* gpioRtdIc15 = new GpioCallback("Chip select RTD IC15", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* gpioRtdIc15 = new GpioCallback("Chip select RTD IC15", Direction::OUT, Levels::HIGH,
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_18, gpioRtdIc15);
|
|
|
|
rtdGpioCookie->addGpio(gpioIds::RTD_IC_18, gpioRtdIc15);
|
|
|
|
|
|
|
|
|
|
|
@ -959,40 +965,45 @@ void ObjectFactory::createRtdComponents(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
|
|
|
|
using namespace gpio;
|
|
|
|
GpioCookie* gpioCookieRw = new GpioCookie;
|
|
|
|
GpioCookie* gpioCookieRw = new GpioCookie;
|
|
|
|
GpioCallback* csRw1 = new GpioCallback("Chip select reaction wheel 1", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* csRw1 =
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
new GpioCallback("Chip select reaction wheel 1", Direction::OUT, Levels::HIGH,
|
|
|
|
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::CS_RW1, csRw1);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::CS_RW1, csRw1);
|
|
|
|
GpioCallback* csRw2 = new GpioCallback("Chip select reaction wheel 2", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* csRw2 =
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
new GpioCallback("Chip select reaction wheel 2", Direction::OUT, Levels::HIGH,
|
|
|
|
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::CS_RW2, csRw2);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::CS_RW2, csRw2);
|
|
|
|
GpioCallback* csRw3 = new GpioCallback("Chip select reaction wheel 3", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* csRw3 =
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
new GpioCallback("Chip select reaction wheel 3", Direction::OUT, Levels::HIGH,
|
|
|
|
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::CS_RW3, csRw3);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::CS_RW3, csRw3);
|
|
|
|
GpioCallback* csRw4 = new GpioCallback("Chip select reaction wheel 4", gpio::DIR_OUT, gpio::HIGH,
|
|
|
|
GpioCallback* csRw4 =
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
new GpioCallback("Chip select reaction wheel 4", Direction::OUT, Levels::HIGH,
|
|
|
|
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::CS_RW4, csRw4);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::CS_RW4, csRw4);
|
|
|
|
|
|
|
|
|
|
|
|
std::stringstream consumer;
|
|
|
|
std::stringstream consumer;
|
|
|
|
GpiodRegularByLineName* gpio = nullptr;
|
|
|
|
GpiodRegularByLineName* gpio = nullptr;
|
|
|
|
consumer << "0x" << std::hex << objects::RW1;
|
|
|
|
consumer << "0x" << std::hex << objects::RW1;
|
|
|
|
gpio =
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_1, consumer.str(), Direction::OUT,
|
|
|
|
new GpiodRegularByLineName(q7s::gpioNames::EN_RW_1, consumer.str(), gpio::DIR_OUT, gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW1, gpio);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW1, gpio);
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::RW2;
|
|
|
|
consumer << "0x" << std::hex << objects::RW2;
|
|
|
|
gpio =
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_2, consumer.str(), Direction::OUT,
|
|
|
|
new GpiodRegularByLineName(q7s::gpioNames::EN_RW_2, consumer.str(), gpio::DIR_OUT, gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW2, gpio);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW2, gpio);
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::RW3;
|
|
|
|
consumer << "0x" << std::hex << objects::RW3;
|
|
|
|
gpio =
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_3, consumer.str(), Direction::OUT,
|
|
|
|
new GpiodRegularByLineName(q7s::gpioNames::EN_RW_3, consumer.str(), gpio::DIR_OUT, gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW3, gpio);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW3, gpio);
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::RW4;
|
|
|
|
consumer << "0x" << std::hex << objects::RW4;
|
|
|
|
gpio =
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_4, consumer.str(), Direction::OUT,
|
|
|
|
new GpiodRegularByLineName(q7s::gpioNames::EN_RW_4, consumer.str(), gpio::DIR_OUT, gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW4, gpio);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW4, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
gpioComIF->addGpios(gpioCookieRw);
|
|
|
|
gpioComIF->addGpios(gpioCookieRw);
|
|
|
@ -1044,6 +1055,7 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
|
|
|
|
using namespace gpio;
|
|
|
|
// GPIO definitions of signals connected to the virtual channel interfaces of the PTME IP Core
|
|
|
|
// GPIO definitions of signals connected to the virtual channel interfaces of the PTME IP Core
|
|
|
|
GpioCookie* gpioCookiePtmeIp = new GpioCookie;
|
|
|
|
GpioCookie* gpioCookiePtmeIp = new GpioCookie;
|
|
|
|
GpiodRegularByLineName* gpio = nullptr;
|
|
|
|
GpiodRegularByLineName* gpio = nullptr;
|
|
|
@ -1121,8 +1133,8 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
consumer.str("");
|
|
|
|
consumer.str("");
|
|
|
|
consumer << "0x" << std::hex << objects::PDEC_HANDLER;
|
|
|
|
consumer << "0x" << std::hex << objects::PDEC_HANDLER;
|
|
|
|
// GPIO also low after linux boot (specified by device-tree)
|
|
|
|
// GPIO also low after linux boot (specified by device-tree)
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PDEC_RESET, consumer.str(), gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PDEC_RESET, consumer.str(), Direction::OUT,
|
|
|
|
gpio::LOW);
|
|
|
|
Levels::LOW);
|
|
|
|
gpioCookiePdec->addGpio(gpioIds::PDEC_RESET, gpio);
|
|
|
|
gpioCookiePdec->addGpio(gpioIds::PDEC_RESET, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
gpioComIF->addGpios(gpioCookiePdec);
|
|
|
|
gpioComIF->addGpios(gpioCookiePdec);
|
|
|
@ -1133,18 +1145,18 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
#if BOARD_TE0720 == 0
|
|
|
|
#if BOARD_TE0720 == 0
|
|
|
|
GpioCookie* gpioRS485Chip = new GpioCookie;
|
|
|
|
GpioCookie* gpioRS485Chip = new GpioCookie;
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_CLOCK, "RS485 Transceiver",
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_CLOCK, "RS485 Transceiver",
|
|
|
|
gpio::Direction::DIR_OUT, gpio::LOW);
|
|
|
|
Direction::OUT, Levels::LOW);
|
|
|
|
gpioRS485Chip->addGpio(gpioIds::RS485_EN_TX_CLOCK, gpio);
|
|
|
|
gpioRS485Chip->addGpio(gpioIds::RS485_EN_TX_CLOCK, gpio);
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_DATA, "RS485 Transceiver",
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_TX_DATA, "RS485 Transceiver",
|
|
|
|
gpio::Direction::DIR_OUT, gpio::LOW);
|
|
|
|
Direction::OUT, Levels::LOW);
|
|
|
|
gpioRS485Chip->addGpio(gpioIds::RS485_EN_TX_DATA, gpio);
|
|
|
|
gpioRS485Chip->addGpio(gpioIds::RS485_EN_TX_DATA, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
// Default configuration enables RX channels (RXEN = LOW)
|
|
|
|
// Default configuration enables RX channels (RXEN = LOW)
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_RX_CLOCK, "RS485 Transceiver",
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_RX_CLOCK, "RS485 Transceiver",
|
|
|
|
gpio::Direction::DIR_OUT, gpio::LOW);
|
|
|
|
Direction::OUT, Levels::LOW);
|
|
|
|
gpioRS485Chip->addGpio(gpioIds::RS485_EN_RX_CLOCK, gpio);
|
|
|
|
gpioRS485Chip->addGpio(gpioIds::RS485_EN_RX_CLOCK, gpio);
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_RX_DATA, "RS485 Transceiver",
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::RS485_EN_RX_DATA, "RS485 Transceiver",
|
|
|
|
gpio::Direction::DIR_OUT, gpio::LOW);
|
|
|
|
Direction::OUT, Levels::LOW);
|
|
|
|
gpioRS485Chip->addGpio(gpioIds::RS485_EN_RX_DATA, gpio);
|
|
|
|
gpioRS485Chip->addGpio(gpioIds::RS485_EN_RX_DATA, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
gpioComIF->addGpios(gpioRS485Chip);
|
|
|
|
gpioComIF->addGpios(gpioRS485Chip);
|
|
|
@ -1152,43 +1164,44 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF) {
|
|
|
|
void ObjectFactory::createPlPcduComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF) {
|
|
|
|
|
|
|
|
using namespace gpio;
|
|
|
|
// Create all GPIO components first
|
|
|
|
// Create all GPIO components first
|
|
|
|
GpioCookie* plPcduGpios = new GpioCookie;
|
|
|
|
GpioCookie* plPcduGpios = new GpioCookie;
|
|
|
|
GpiodRegularByLineName* gpio = nullptr;
|
|
|
|
GpiodRegularByLineName* gpio = nullptr;
|
|
|
|
std::string consumer;
|
|
|
|
std::string consumer;
|
|
|
|
// Switch pins are active high
|
|
|
|
// Switch pins are active high
|
|
|
|
consumer = "PLPCDU_ENB_VBAT_0";
|
|
|
|
consumer = "PLPCDU_ENB_VBAT_0";
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_VBAT0, consumer, gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_VBAT0, consumer,
|
|
|
|
gpio::Levels::LOW);
|
|
|
|
gpio::Direction::OUT, gpio::Levels::LOW);
|
|
|
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_VBAT0, gpio);
|
|
|
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_VBAT0, gpio);
|
|
|
|
consumer = "PLPCDU_ENB_VBAT_1";
|
|
|
|
consumer = "PLPCDU_ENB_VBAT_1";
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_VBAT1, consumer, gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_VBAT1, consumer,
|
|
|
|
gpio::Levels::LOW);
|
|
|
|
gpio::Direction::OUT, gpio::Levels::LOW);
|
|
|
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_VBAT1, gpio);
|
|
|
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_VBAT1, gpio);
|
|
|
|
consumer = "PLPCDU_ENB_DRO";
|
|
|
|
consumer = "PLPCDU_ENB_DRO";
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_DRO, consumer, gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_DRO, consumer,
|
|
|
|
gpio::Levels::LOW);
|
|
|
|
gpio::Direction::OUT, gpio::Levels::LOW);
|
|
|
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_DRO, gpio);
|
|
|
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_DRO, gpio);
|
|
|
|
consumer = "PLPCDU_ENB_X8";
|
|
|
|
consumer = "PLPCDU_ENB_X8";
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_X8, consumer, gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_X8, consumer,
|
|
|
|
gpio::Levels::LOW);
|
|
|
|
gpio::Direction::OUT, gpio::Levels::LOW);
|
|
|
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_X8, gpio);
|
|
|
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_X8, gpio);
|
|
|
|
consumer = "PLPCDU_ENB_TX";
|
|
|
|
consumer = "PLPCDU_ENB_TX";
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_TX, consumer, gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_TX, consumer, Direction::OUT,
|
|
|
|
gpio::Levels::LOW);
|
|
|
|
gpio::Levels::LOW);
|
|
|
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_TX, gpio);
|
|
|
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_TX, gpio);
|
|
|
|
consumer = "PLPCDU_ENB_MPA";
|
|
|
|
consumer = "PLPCDU_ENB_MPA";
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_MPA, consumer, gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_MPA, consumer, Direction::OUT,
|
|
|
|
gpio::Levels::LOW);
|
|
|
|
gpio::Levels::LOW);
|
|
|
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_MPA, gpio);
|
|
|
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_MPA, gpio);
|
|
|
|
consumer = "PLPCDU_ENB_HPA";
|
|
|
|
consumer = "PLPCDU_ENB_HPA";
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_HPA, consumer, gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ENABLE_HPA, consumer, Direction::OUT,
|
|
|
|
gpio::Levels::LOW);
|
|
|
|
gpio::Levels::LOW);
|
|
|
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_HPA, gpio);
|
|
|
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ENB_HPA, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
// Chip select pin is active low
|
|
|
|
// Chip select pin is active low
|
|
|
|
consumer = "PLPCDU_ADC_CS";
|
|
|
|
consumer = "PLPCDU_ADC_CS";
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ADC_CS, consumer, gpio::DIR_OUT,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PL_PCDU_ADC_CS, consumer, Direction::OUT,
|
|
|
|
gpio::Levels::HIGH);
|
|
|
|
gpio::Levels::HIGH);
|
|
|
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ADC_CS, gpio);
|
|
|
|
plPcduGpios->addGpio(gpioIds::PLPCDU_ADC_CS, gpio);
|
|
|
|
gpioComIF->addGpios(plPcduGpios);
|
|
|
|
gpioComIF->addGpios(plPcduGpios);
|
|
|
|