mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
b gpio
This commit is contained in:
@@ -12,6 +12,8 @@ GPIO::GPIO(QObject *parent) : QObject(parent), m_offset(0)
|
||||
|
||||
GPIO::~GPIO()
|
||||
{
|
||||
if (!m_request.get())
|
||||
return;
|
||||
m_request->release();
|
||||
}
|
||||
|
||||
@@ -47,7 +49,7 @@ void GPIO::configure_pin(Direction dir, uint8_t gpio)
|
||||
void GPIO::set_value(bool value)
|
||||
{
|
||||
#if defined(__aarch64__) || defined(__x86_64__)
|
||||
if (!m_request.get())
|
||||
if (!m_request.get())
|
||||
return;
|
||||
m_request->set_value(m_offset, (gpiod::line::value)value);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user