mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-27 06:01:14 +01:00
gpio
fix crash on x64
This commit is contained in:
@@ -57,12 +57,18 @@ GPIO::GPIO(Direction dir, uint8_t gpio, bool state, QObject* parent)
|
||||
|
||||
void GPIO::set_value(bool value)
|
||||
{
|
||||
#if __aarch64__
|
||||
gpiod_line_request_set_value(m_request, m_offset, (enum gpiod_line_value)value);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool GPIO::value()
|
||||
{
|
||||
#if __aarch64__
|
||||
return (bool)gpiod_line_request_get_value(m_request, m_offset);
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
struct gpiod_line_request *
|
||||
|
||||
Reference in New Issue
Block a user