EIVE upstream #29
@ -301,8 +301,7 @@ ReturnValue_t LinuxLibgpioIF::readGpio(gpioId_t gpioId, gpio::Levels& gpioState)
|
|||||||
}
|
}
|
||||||
gpioState = static_cast<gpio::Levels>(gpiod_line_get_value(regularGpio->lineHandle));
|
gpioState = static_cast<gpio::Levels>(gpiod_line_get_value(regularGpio->lineHandle));
|
||||||
if (gpioState == gpio::Levels::FAILED) {
|
if (gpioState == gpio::Levels::FAILED) {
|
||||||
// TODO: Print error
|
return GPIO_GET_VALUE_FAILED;
|
||||||
return RETURN_FAILED;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
auto gpioCallback = dynamic_cast<GpioCallback*>(gpioMapIter->second);
|
auto gpioCallback = dynamic_cast<GpioCallback*>(gpioMapIter->second);
|
||||||
|
@ -31,7 +31,9 @@ class LinuxLibgpioIF : public GpioIF, public SystemObject {
|
|||||||
HasReturnvaluesIF::makeReturnCode(gpioRetvalId, 5);
|
HasReturnvaluesIF::makeReturnCode(gpioRetvalId, 5);
|
||||||
static constexpr ReturnValue_t GPIO_INIT_FAILED =
|
static constexpr ReturnValue_t GPIO_INIT_FAILED =
|
||||||
HasReturnvaluesIF::makeReturnCode(gpioRetvalId, 6);
|
HasReturnvaluesIF::makeReturnCode(gpioRetvalId, 6);
|
||||||
|
// Will be returned if getting the line value failed. Error type will be set to errno in this case
|
||||||
|
static constexpr ReturnValue_t GPIO_GET_VALUE_FAILED =
|
||||||
|
HasReturnvaluesIF::makeReturnCode(gpioRetvalId, 7);
|
||||||
LinuxLibgpioIF(object_id_t objectId);
|
LinuxLibgpioIF(object_id_t objectId);
|
||||||
virtual ~LinuxLibgpioIF();
|
virtual ~LinuxLibgpioIF();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user