mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-26 21:51:13 +01:00
gpio
Add release function
This commit is contained in:
@@ -27,6 +27,7 @@ int gpiod_line_request_set_value(struct gpiod_line_request *request,
|
|||||||
enum gpiod_line_value
|
enum gpiod_line_value
|
||||||
gpiod_line_request_get_value(struct gpiod_line_request *request,
|
gpiod_line_request_get_value(struct gpiod_line_request *request,
|
||||||
unsigned int offset) {}
|
unsigned int offset) {}
|
||||||
|
void gpiod_line_request_release(struct gpiod_line_request *request) {}
|
||||||
void gpiod_request_config_free(struct gpiod_request_config *config){}
|
void gpiod_request_config_free(struct gpiod_request_config *config){}
|
||||||
void gpiod_line_config_free(struct gpiod_line_config *config){}
|
void gpiod_line_config_free(struct gpiod_line_config *config){}
|
||||||
void gpiod_line_settings_free(struct gpiod_line_settings *settings){}
|
void gpiod_line_settings_free(struct gpiod_line_settings *settings){}
|
||||||
@@ -55,6 +56,11 @@ GPIO::GPIO(Direction dir, uint8_t gpio, bool state, QObject* parent)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GPIO::~GPIO()
|
||||||
|
{
|
||||||
|
gpiod_line_request_release(m_request);
|
||||||
|
}
|
||||||
|
|
||||||
void GPIO::set_value(bool value)
|
void GPIO::set_value(bool value)
|
||||||
{
|
{
|
||||||
#if __aarch64__
|
#if __aarch64__
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ class GPIO : public QObject {
|
|||||||
Output
|
Output
|
||||||
};
|
};
|
||||||
explicit GPIO(Direction dir, uint8_t gpio, bool state = false, QObject* parent = nullptr);
|
explicit GPIO(Direction dir, uint8_t gpio, bool state = false, QObject* parent = nullptr);
|
||||||
|
~GPIO();
|
||||||
void set_value(bool val);
|
void set_value(bool val);
|
||||||
bool value();
|
bool value();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user