Update documentation

pull/1/head
Simon Stürz 2019-09-13 15:49:48 +02:00
parent bdfc868f10
commit 6ce902b829
2 changed files with 17 additions and 16 deletions

View File

@ -1,8 +1,7 @@
#include "gpio.h"
/*!
\class Gpio
\brief Represents a system GPIO in linux systems.
\inmodule nymea-gpio
A "General Purpose Input/Output" (GPIO) is a flexible software-controlled
digital signal. They are provided from many kinds of chip, and are familiar
@ -84,6 +83,8 @@
The \l{Gpio} does not react on interrupts.
*/
#include "gpio.h"
Q_LOGGING_CATEGORY(dcGpio, "Gpio")
/*! Constructs a Gpio object to represent a GPIO with the given \a gpio number and \a parent. */

View File

@ -1,23 +1,23 @@
/*!
\class GpioMonitor
\brief Monitor for GPIO interrupts.
\class GpioMonitor
\brief Monitor for GPIO interrupts.
This class allows to monitor an input GPIO for the interrupts depending on the \l{Gpio:Edge} configuration.
This class allows to monitor an input GPIO for the interrupts depending on the \l{Gpio:Edge} configuration.
\code
GpioMonitor *monitor = new GpioMonitor(112, this);
\code
GpioMonitor *monitor = new GpioMonitor(112, this);
if (!monitor->enable()) {
qWarning() << "Could not enable GPIO monitor";
monitor->deleteLater();
return;
}
if (!monitor->enable()) {
qWarning() << "Could not enable GPIO monitor";
monitor->deleteLater();
return;
}
connect(monitor, &GpioMonitor::interruptOccured, this, [this, monitor](bool value){
qDebug() << "GPIO value changed" << value;
});
connect(monitor, &GpioMonitor::interruptOccured, this, [this, monitor](bool value){
qDebug() << "GPIO value changed" << value;
});
\endcode
\endcode
*/