open gpio by label test on te0720
This commit is contained in:
@ -529,8 +529,10 @@ void ObjectFactory::createHeaterComponents() {
|
||||
GpioCookie* heaterGpiosCookie = new GpioCookie;
|
||||
|
||||
/* Pin H2-11 on stack connector */
|
||||
GpiodRegular* gpioConfigHeater0 = new GpiodRegular(q7s::GPIO_HEATER_CHIP,
|
||||
q7s::GPIO_HEATER_0_PIN, "Heater0", gpio::OUT, 0);
|
||||
GpiodRegular* gpioConfigHeater0 = new GpiodRegular("Heater0", gpio::OUT, 0, "axi_gpio_q7_3v3",
|
||||
q7s::GPIO_HEATER_0_PIN);
|
||||
// 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 */
|
||||
@ -822,11 +824,15 @@ void ObjectFactory::createTestComponents(LinuxLibgpioIF* gpioComIF) {
|
||||
#endif
|
||||
|
||||
#if BOARD_TE0720 == 1 && OBSW_TEST_LIBGPIOD == 1
|
||||
#if OBSW_TEST_GPIO_LABEL == 1
|
||||
/* Configure MIO0 as input */
|
||||
GpiodRegular gpioConfigMio0(std::string("gpiochip0"), 0,
|
||||
std::string("MIO0"), gpio::IN, 0);
|
||||
GpiodRegular* testGpio = new GpiodRegular("MIO0", gpio::OUT, 0, "/amba_pl/gpio@41200000", 0);
|
||||
#else
|
||||
/* Configure MIO0 as input */
|
||||
GpiodRegular* testGpio = new GpiodRegular("gpiochip0", 0, "MIO0", gpio::IN, 0);
|
||||
#endif /* OBSW_TEST_GPIO_LABEL == 1 */
|
||||
GpioCookie* gpioCookie = new GpioCookie;
|
||||
gpioCookie->addGpio(gpioIds::TEST_ID_0, gpioConfigMio0);
|
||||
gpioCookie->addGpio(gpioIds::TEST_ID_0, testGpio);
|
||||
new LibgpiodTest(objects::LIBGPIOD_TEST, objects::GPIO_IF, gpioCookie);
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user