changed all gpio configurations to open by line name
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
parent
11537f9988
commit
9fd4c477f0
@ -95,6 +95,43 @@ static constexpr uint32_t SPI_MUX_BIT_5 = 17;
|
|||||||
static constexpr uint32_t SPI_MUX_BIT_6 = 9;
|
static constexpr uint32_t SPI_MUX_BIT_6 = 9;
|
||||||
static constexpr uint32_t EN_RW_CS = 17;
|
static constexpr uint32_t EN_RW_CS = 17;
|
||||||
|
|
||||||
|
namespace gpioNames {
|
||||||
|
static constexpr char GYRO_0_ADIS_CS[] = "gyro_0_adis_chip_select";
|
||||||
|
static constexpr char GYRO_1_L3G_CS[] = "gyro_1_l3g_chip_select";
|
||||||
|
static constexpr char GYRO_2_ADIS_CS[] = "gyro_2_adis_chip_select";
|
||||||
|
static constexpr char GYRO_3_L3G_CS[] = "gyro_3_l3g_chip_select";
|
||||||
|
static constexpr char MGM_0_CS[] = "mgm_0_lis3_chip_select";
|
||||||
|
static constexpr char MGM_1_CS[] = "mgm_1_rm3100_chip_select";
|
||||||
|
static constexpr char MGM_2_CS[] = "mgm_2_lis3_chip_select";
|
||||||
|
static constexpr char MGM_3_CS[] = "mgm_3_rm3100_chip_select";
|
||||||
|
static constexpr char RESET_GNSS_0[] = "reset_gnss_0";
|
||||||
|
static constexpr char RESET_GNSS_1[] = "reset_gnss_1";
|
||||||
|
static constexpr char GYRO_0_ENABLE[] = "gyro_0_enable";
|
||||||
|
static constexpr char GYRO_2_ENABLE[] = "gyro_2_enable";
|
||||||
|
static constexpr char HEATER_0[] = "heater0";
|
||||||
|
static constexpr char HEATER_1[] = "heater1";
|
||||||
|
static constexpr char HEATER_2[] = "heater2";
|
||||||
|
static constexpr char HEATER_3[] = "heater3";
|
||||||
|
static constexpr char HEATER_4[] = "heater4";
|
||||||
|
static constexpr char HEATER_5[] = "heater5";
|
||||||
|
static constexpr char HEATER_6[] = "heater6";
|
||||||
|
static constexpr char HEATER_7[] = "heater7";
|
||||||
|
static constexpr char SA_DPL_PIN_0[] = "sa_dpl_0";
|
||||||
|
static constexpr char SA_DPL_PIN_1[] = "sa_dpl_1";
|
||||||
|
static constexpr char SPI_MUX_BIT_1_PIN[] = "spi_mux_bit_1";
|
||||||
|
static constexpr char SPI_MUX_BIT_2_PIN[] = "spi_mux_bit_2";
|
||||||
|
static constexpr char SPI_MUX_BIT_3_PIN[] = "spi_mux_bit_3";
|
||||||
|
static constexpr char SPI_MUX_BIT_4_PIN[] = "spi_mux_bit_4";
|
||||||
|
static constexpr char SPI_MUX_BIT_5_PIN[] = "spi_mux_bit_5";
|
||||||
|
static constexpr char SPI_MUX_BIT_6_PIN[] = "spi_mux_bit_6";
|
||||||
|
static constexpr char EN_RW_CS[] = "en_rw_cs";
|
||||||
|
static constexpr char EN_RW_1[] = "enable_rw_1";
|
||||||
|
static constexpr char EN_RW_2[] = "enable_rw_2";
|
||||||
|
static constexpr char EN_RW_3[] = "enable_rw_3";
|
||||||
|
static constexpr char EN_RW_4[] = "enable_rw_4";
|
||||||
|
static constexpr char SPI_MUX_SELECT[] = "spi_mux_select";
|
||||||
|
static constexpr char RAD_SENSOR_CHIP_SELECT[] = "rad_sensor_chip_select";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* BSP_Q7S_BOARDCONFIG_BUSCONF_H_ */
|
#endif /* BSP_Q7S_BOARDCONFIG_BUSCONF_H_ */
|
||||||
|
@ -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);
|
||||||
|
@ -24,31 +24,26 @@ void initSpiCsDecoder(GpioIF* gpioComIF) {
|
|||||||
|
|
||||||
GpioCookie* spiMuxGpios = new GpioCookie;
|
GpioCookie* spiMuxGpios = new GpioCookie;
|
||||||
|
|
||||||
GpiodRegularByLabel* spiMuxBit = nullptr;
|
GpiodRegularByLineName* spiMuxBit = nullptr;
|
||||||
/** Setting mux bit 1 to low will disable IC21 on the interface board */
|
/** Setting mux bit 1 to low will disable IC21 on the interface board */
|
||||||
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_1,
|
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_1_PIN, "SPI Mux Bit 1",
|
||||||
"SPI Mux Bit 1", gpio::OUT, gpio::LOW);
|
gpio::OUT, gpio::LOW);
|
||||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_1, spiMuxBit);
|
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_1, spiMuxBit);
|
||||||
/** Setting mux bit 2 to low disables IC1 on the TCS board */
|
/** Setting mux bit 2 to low disables IC1 on the TCS board */
|
||||||
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_2,
|
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_2_PIN, "SPI Mux Bit 2", gpio::OUT, gpio::LOW);
|
||||||
"SPI Mux Bit 2", gpio::OUT, gpio::LOW);
|
|
||||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_2, spiMuxBit);
|
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_2, spiMuxBit);
|
||||||
/** Setting mux bit 3 to low disables IC2 on the TCS board and IC22 on the interface board */
|
/** Setting mux bit 3 to low disables IC2 on the TCS board and IC22 on the interface board */
|
||||||
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_3,
|
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_3_PIN, "SPI Mux Bit 3", gpio::OUT, gpio::LOW);
|
||||||
"SPI Mux Bit 3", gpio::OUT, gpio::LOW);
|
|
||||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_3, spiMuxBit);
|
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_3, spiMuxBit);
|
||||||
/** The following gpios can take arbitrary initial values */
|
/** The following gpios can take arbitrary initial values */
|
||||||
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_4,
|
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_4_PIN, "SPI Mux Bit 4", gpio::OUT, gpio::LOW);
|
||||||
"SPI Mux Bit 4", gpio::OUT, gpio::LOW);
|
|
||||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_4, spiMuxBit);
|
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_4, spiMuxBit);
|
||||||
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_5,
|
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_5_PIN, "SPI Mux Bit 5", gpio::OUT, gpio::LOW);
|
||||||
"SPI Mux Bit 5", gpio::OUT, gpio::LOW);
|
|
||||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_5, spiMuxBit);
|
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_5, spiMuxBit);
|
||||||
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_6,
|
spiMuxBit = new GpiodRegularByLineName(q7s::gpioNames::SPI_MUX_BIT_6_PIN, "SPI Mux Bit 6", gpio::OUT, gpio::LOW);
|
||||||
"SPI Mux Bit 6", gpio::OUT, gpio::LOW);
|
|
||||||
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_6, spiMuxBit);
|
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_6, spiMuxBit);
|
||||||
GpiodRegularByLabel* enRwDecoder = new GpiodRegularByLabel(q7s::GPIO_FLEX_OBC1F_B1,
|
GpiodRegularByLineName* enRwDecoder = new GpiodRegularByLineName(q7s::gpioNames::EN_RW_CS,
|
||||||
q7s::EN_RW_CS, "EN_RW_CS", gpio::OUT, gpio::HIGH);
|
"EN_RW_CS", gpio::OUT, gpio::HIGH);
|
||||||
spiMuxGpios->addGpio(gpioIds::EN_RW_CS, enRwDecoder);
|
spiMuxGpios->addGpio(gpioIds::EN_RW_CS, enRwDecoder);
|
||||||
|
|
||||||
result = gpioComInterface->addGpios(spiMuxGpios);
|
result = gpioComInterface->addGpios(spiMuxGpios);
|
||||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit e7df520780242f98f9a1189906c0ade1a8a99f29
|
Subproject commit 16b125ef6cdfbe1349e5b21b783cd72c871372a8
|
@ -439,8 +439,8 @@ ReturnValue_t pst::pstSpi(FixedTimeslotTaskIF *thisSequence) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if OBSW_ADD_ACS_BOARD == 1
|
#if OBSW_ADD_ACS_BOARD == 1
|
||||||
bool enableAside = true;
|
bool enableAside = false;
|
||||||
bool enableBside = false;
|
bool enableBside = true;
|
||||||
if(enableAside) {
|
if(enableAside) {
|
||||||
// A side
|
// A side
|
||||||
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0,
|
thisSequence->addSlot(objects::MGM_0_LIS3_HANDLER, length * 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user