|
|
@ -267,9 +267,11 @@ void ObjectFactory::createPcduComponents() {
|
|
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
void ObjectFactory::createRadSensorComponent(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
GpioCookie* gpioCookieRadSensor = new GpioCookie;
|
|
|
|
GpioCookie* gpioCookieRadSensor = new GpioCookie;
|
|
|
|
auto chipSelectRadSensor = new GpiodRegularByLabel(q7s::GPIO_RAD_SENSOR_LABEL,
|
|
|
|
std::stringstream consumer;
|
|
|
|
q7s::GPIO_RAD_SENSOR_CS, "Chip Select Radiation Sensor", gpio::OUT, gpio::HIGH);
|
|
|
|
consumer << "0x" << std::hex << objects::RAD_SENSOR;
|
|
|
|
gpioCookieRadSensor->addGpio(gpioIds::CS_RAD_SENSOR, chipSelectRadSensor);
|
|
|
|
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);
|
|
|
|
gpioComIF->addGpios(gpioCookieRadSensor);
|
|
|
|
|
|
|
|
|
|
|
|
SpiCookie* spiCookieRadSensor = new SpiCookie(addresses::RAD_SENSOR, gpioIds::CS_RAD_SENSOR,
|
|
|
|
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) {
|
|
|
|
void ObjectFactory::createAcsBoardComponents(LinuxLibgpioIF *gpioComIF, UartComIF* uartComIF) {
|
|
|
|
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
|
|
|
|
GpioCookie* gpioCookieAcsBoard = new GpioCookie();
|
|
|
|
GpiodRegularByLabel* gpio = nullptr;
|
|
|
|
|
|
|
|
gpio = new GpiodRegularByLabel(q7s::GPIO_GYRO_ADIS_LABEL, q7s::GPIO_GYRO_0_ADIS_CS,
|
|
|
|
std::stringstream consumer;
|
|
|
|
"CS_GYRO_0_ADIS", gpio::OUT, gpio::HIGH);
|
|
|
|
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);
|
|
|
|
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);
|
|
|
|
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);
|
|
|
|
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);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_3_L3G_CS, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
gpio = new GpiodRegularByLabel(q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_MGM_0_LIS3_CS,
|
|
|
|
consumer.str("");
|
|
|
|
"CS_MGM_0_LIS3_A", gpio::OUT, gpio::HIGH);
|
|
|
|
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);
|
|
|
|
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);
|
|
|
|
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);
|
|
|
|
consumer.str("");
|
|
|
|
std::stringstream consumer;
|
|
|
|
consumer << "0x" << std::hex << objects::MGM_2_LIS3_HANDLER;
|
|
|
|
consumer << std::hex << objects::MGM_2_LIS3_HANDLER;
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::MGM_2_CS, consumer.str(),
|
|
|
|
auto gpioByLineName = new GpiodRegularByLineName("mgm_2_lis3_chip_select", consumer.str(),
|
|
|
|
|
|
|
|
gpio::OUT, gpio::HIGH);
|
|
|
|
gpio::OUT, gpio::HIGH);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::MGM_2_LIS3_CS, gpioByLineName);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::MGM_2_LIS3_CS, gpio);
|
|
|
|
gpio = new GpiodRegularByLabel(q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_MGM_3_RM3100_CS,
|
|
|
|
|
|
|
|
"CS_MGM_3_RM3100_B", gpio::OUT, gpio::HIGH);
|
|
|
|
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);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::MGM_3_RM3100_CS, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
consumer.str("");
|
|
|
|
|
|
|
|
consumer << "0x" << std::hex << objects::GPS0_HANDLER;
|
|
|
|
// GNSS reset pins are active low
|
|
|
|
// GNSS reset pins are active low
|
|
|
|
gpio = new GpiodRegularByLabel(q7s::GPIO_ACS_BOARD_DEFAULT_LABEL, q7s::GPIO_RESET_GNSS_0,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::RESET_GNSS_0, consumer.str(), gpio::OUT,
|
|
|
|
"GNSS_0_NRESET", gpio::OUT, gpio::HIGH);
|
|
|
|
gpio::HIGH);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GNSS_0_NRESET, gpio);
|
|
|
|
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);
|
|
|
|
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
|
|
|
|
// Enable pins must be pulled low for regular operations
|
|
|
|
gpio = new GpiodRegularByLabel(q7s::GPIO_FLEX_OBC1F_B0, q7s::GPIO_GYRO_0_ENABLE,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::GYRO_0_ENABLE, consumer.str(),
|
|
|
|
"GYRO_0_ENABLE", gpio::OUT, gpio::LOW);
|
|
|
|
gpio::OUT, gpio::LOW);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_0_ENABLE, gpio);
|
|
|
|
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);
|
|
|
|
gpioCookieAcsBoard->addGpio(gpioIds::GYRO_2_ENABLE, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: Add enable pins for GPS as soon as new interface board design is finished
|
|
|
|
// 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() {
|
|
|
|
void ObjectFactory::createHeaterComponents() {
|
|
|
|
|
|
|
|
|
|
|
|
GpioCookie* heaterGpiosCookie = new GpioCookie;
|
|
|
|
GpioCookie* heaterGpiosCookie = new GpioCookie;
|
|
|
|
|
|
|
|
GpiodRegularByLineName* gpio = nullptr;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::stringstream consumer;
|
|
|
|
|
|
|
|
consumer << "0x" << std::hex << objects::HEATER_HANDLER;
|
|
|
|
/* Pin H2-11 on stack connector */
|
|
|
|
/* Pin H2-11 on stack connector */
|
|
|
|
auto gpioConfigHeater0 = new GpiodRegularByLabel(q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_0_PIN,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_0, consumer.str(), gpio::OUT,
|
|
|
|
"Heater0", gpio::OUT, gpio::LOW);
|
|
|
|
gpio::LOW);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_0, gpioConfigHeater0);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_0, gpio);
|
|
|
|
/* Pin H2-12 on stack connector */
|
|
|
|
/* Pin H2-12 on stack connector */
|
|
|
|
auto gpioConfigHeater1 = new GpiodRegularByLabel(q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_1_PIN,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_1, consumer.str(), gpio::OUT,
|
|
|
|
"Heater1", gpio::OUT, gpio::LOW);
|
|
|
|
gpio::LOW);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_1, gpioConfigHeater1);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_1, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
/* Pin H2-13 on stack connector */
|
|
|
|
/* Pin H2-13 on stack connector */
|
|
|
|
auto gpioConfigHeater2 = new GpiodRegularByLabel(q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_2_PIN,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_2, consumer.str(), gpio::OUT,
|
|
|
|
"Heater2", gpio::OUT, gpio::LOW);
|
|
|
|
gpio::LOW);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_2, gpioConfigHeater2);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_2, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
auto gpioConfigHeater3 = new GpiodRegularByLabel(q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_3_PIN,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_3, consumer.str(),
|
|
|
|
"Heater3", gpio::OUT, gpio::LOW);
|
|
|
|
gpio::OUT, gpio::LOW);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_3, gpioConfigHeater3);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_3, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
auto gpioConfigHeater4 = new GpiodRegularByLabel(q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_4_PIN,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_4, consumer.str(),
|
|
|
|
"Heater4", gpio::OUT, gpio::LOW);
|
|
|
|
gpio::OUT, gpio::LOW);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_4, gpioConfigHeater4);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_4, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
auto gpioConfigHeater5 = new GpiodRegularByLabel(q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_5_PIN,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_5, consumer.str(),
|
|
|
|
"Heater5", gpio::OUT, gpio::LOW);
|
|
|
|
gpio::OUT, gpio::LOW);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_5, gpioConfigHeater5);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_5, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
auto gpioConfigHeater6 = new GpiodRegularByLabel(q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_6_PIN,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_6, consumer.str(),
|
|
|
|
"Heater6", gpio::OUT, gpio::LOW);
|
|
|
|
gpio::OUT, gpio::LOW);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_6, gpioConfigHeater6);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_6, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
auto gpioConfigHeater7 = new GpiodRegularByLabel(q7s::GPIO_HEATER_LABEL, q7s::GPIO_HEATER_7_PIN,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::HEATER_7, consumer.str(),
|
|
|
|
"Heater7", gpio::OUT, gpio::LOW);
|
|
|
|
gpio::OUT, gpio::LOW);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_7, gpioConfigHeater7);
|
|
|
|
heaterGpiosCookie->addGpio(gpioIds::HEATER_7, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, heaterGpiosCookie,
|
|
|
|
new HeaterHandler(objects::HEATER_HANDLER, objects::GPIO_IF, heaterGpiosCookie,
|
|
|
|
objects::PCDU_HANDLER, pcduSwitches::TCS_BOARD_8V_HEATER_IN);
|
|
|
|
objects::PCDU_HANDLER, pcduSwitches::TCS_BOARD_8V_HEATER_IN);
|
|
|
@ -587,13 +620,16 @@ void ObjectFactory::createHeaterComponents() {
|
|
|
|
|
|
|
|
|
|
|
|
void ObjectFactory::createSolarArrayDeploymentComponents() {
|
|
|
|
void ObjectFactory::createSolarArrayDeploymentComponents() {
|
|
|
|
GpioCookie* solarArrayDeplCookie = new GpioCookie;
|
|
|
|
GpioCookie* solarArrayDeplCookie = new GpioCookie;
|
|
|
|
|
|
|
|
GpiodRegularByLineName* gpio = nullptr;
|
|
|
|
|
|
|
|
|
|
|
|
auto gpioConfigDeplSA0 = new GpiodRegularByLabel(q7s::GPIO_SOLAR_ARR_DEPL_LABEL,
|
|
|
|
std::stringstream consumer;
|
|
|
|
q7s::GPIO_SOL_DEPL_SA_0_PIN, "DeplSA0", gpio::OUT, gpio::LOW);
|
|
|
|
consumer << "0x" << std::hex << objects::SOLAR_ARRAY_DEPL_HANDLER;
|
|
|
|
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA1, gpioConfigDeplSA0);
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::SA_DPL_PIN_0,
|
|
|
|
auto gpioConfigDeplSA1 = new GpiodRegularByLabel(q7s::GPIO_SOLAR_ARR_DEPL_LABEL,
|
|
|
|
consumer.str(), gpio::OUT, gpio::LOW);
|
|
|
|
q7s::GPIO_SOL_DEPL_SA_1_PIN, "DeplSA1", gpio::OUT, gpio::LOW);
|
|
|
|
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA1, gpio);
|
|
|
|
solarArrayDeplCookie->addGpio(gpioIds::DEPLSA2, gpioConfigDeplSA1);
|
|
|
|
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.
|
|
|
|
//TODO: Find out burn time. For now set to 1000 ms.
|
|
|
|
new SolarArrayDeploymentHandler(objects::SOLAR_ARRAY_DEPL_HANDLER, objects::GPIO_IF,
|
|
|
|
new SolarArrayDeploymentHandler(objects::SOLAR_ARRAY_DEPL_HANDLER, objects::GPIO_IF,
|
|
|
@ -772,35 +808,36 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
&gpioCallbacks::spiCsDecoderCallback, gpioComIF);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::CS_RW4, csRw4);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::CS_RW4, csRw4);
|
|
|
|
|
|
|
|
|
|
|
|
// GpiodRegular* enRw1 = new GpiodRegular("Enable reaction wheel 1", gpio::OUT, 0,
|
|
|
|
std::stringstream consumer;
|
|
|
|
// q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_0_CS);
|
|
|
|
GpiodRegularByLineName* gpio = nullptr;
|
|
|
|
// gpioCookieRw->addGpio(gpioIds::EN_RW1, enRw1);
|
|
|
|
consumer << "0x" << std::hex << objects::RW1;
|
|
|
|
// GpiodRegular* enRw2 = new GpiodRegular("Enable reaction wheel 2", gpio::OUT, 0,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_1, consumer.str(), gpio::OUT,
|
|
|
|
// q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_1_CS);
|
|
|
|
gpio::LOW);
|
|
|
|
// gpioCookieRw->addGpio(gpioIds::EN_RW2, enRw2);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW1, gpio);
|
|
|
|
// GpiodRegular* enRw3 = new GpiodRegular(, gpio::OUT, 0,
|
|
|
|
consumer.str("");
|
|
|
|
// q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_2_CS);
|
|
|
|
consumer << "0x" << std::hex << objects::RW2;
|
|
|
|
auto enRw1 = new GpiodRegularByLabel(q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_0_CS,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_2, consumer.str(), gpio::OUT,
|
|
|
|
"Enable reaction wheel 1", gpio::OUT, gpio::LOW);
|
|
|
|
gpio::LOW);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW1, enRw1);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW2, gpio);
|
|
|
|
auto enRw2 = new GpiodRegularByLabel(q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_1_CS,
|
|
|
|
consumer.str("");
|
|
|
|
"Enable reaction wheel 2", gpio::OUT, gpio::LOW);
|
|
|
|
consumer << "0x" << std::hex << objects::RW3;
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW2, enRw2);
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_3, consumer.str(), gpio::OUT,
|
|
|
|
auto enRw3 = new GpiodRegularByLabel(q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_2_CS,
|
|
|
|
gpio::LOW);
|
|
|
|
"Enable reaction wheel 3", gpio::OUT, gpio::LOW);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW3, gpio);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW3, enRw3);
|
|
|
|
consumer.str("");
|
|
|
|
auto enRw4 = new GpiodRegularByLabel(q7s::GPIO_RW_DEFAULT_LABEL, q7s::GPIO_RW_3_CS,
|
|
|
|
consumer << "0x" << std::hex << objects::RW4;
|
|
|
|
"Enable reaction wheel 4", gpio::OUT, gpio::LOW);
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_4, consumer.str(), gpio::OUT,
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW4, enRw4);
|
|
|
|
gpio::LOW);
|
|
|
|
|
|
|
|
gpioCookieRw->addGpio(gpioIds::EN_RW4, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* This GPIO is only internally connected to the SPI MUX module and responsible to disconnect
|
|
|
|
* 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.
|
|
|
|
* 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).
|
|
|
|
* Per default the PS SPI is selected (EMIO = 0).
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
auto spiMux = new GpiodRegularByLabel(q7s::GPIO_RW_SPI_MUX_LABEL,
|
|
|
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_SELECT,
|
|
|
|
q7s::GPIO_RW_SPI_MUX_CS, "EMIO 0 SPI Mux", gpio::OUT, gpio::LOW);
|
|
|
|
"SPI Reaction Wheel Callback ", gpio::OUT, gpio::LOW);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::SPI_MUX, spiMux);
|
|
|
|
gpioCookieRw->addGpio(gpioIds::SPI_MUX, gpio);
|
|
|
|
|
|
|
|
|
|
|
|
gpioComIF->addGpios(gpioCookieRw);
|
|
|
|
gpioComIF->addGpios(gpioCookieRw);
|
|
|
|
|
|
|
|
|
|
|
@ -820,6 +857,7 @@ void ObjectFactory::createReactionWheelComponents(LinuxLibgpioIF* gpioComIF) {
|
|
|
|
auto rwHandler1 = new RwHandler(objects::RW1, objects::SPI_COM_IF, rw1SpiCookie, gpioComIF,
|
|
|
|
auto rwHandler1 = new RwHandler(objects::RW1, objects::SPI_COM_IF, rw1SpiCookie, gpioComIF,
|
|
|
|
gpioIds::EN_RW1);
|
|
|
|
gpioIds::EN_RW1);
|
|
|
|
rw1SpiCookie->setCallbackArgs(rwHandler1);
|
|
|
|
rw1SpiCookie->setCallbackArgs(rwHandler1);
|
|
|
|
|
|
|
|
rwHandler1->setStartUpImmediately();
|
|
|
|
|
|
|
|
|
|
|
|
auto rwHandler2 = new RwHandler(objects::RW2, objects::SPI_COM_IF, rw2SpiCookie, gpioComIF,
|
|
|
|
auto rwHandler2 = new RwHandler(objects::RW2, objects::SPI_COM_IF, rw2SpiCookie, gpioComIF,
|
|
|
|
gpioIds::EN_RW2);
|
|
|
|
gpioIds::EN_RW2);
|
|
|
|