Introduction - If you have any usage issues, please Google them yourself
Embedded linux GPIO controller which
write by myself, used in QT Widgets Application.
[Tutorial]
//Init object
GpioControl m_gpioControl;
//Init no.84 GPIO OUT
m_gpioControl.Init(84);
//set no.84 GPIO hIgh power level
m_gpioControl.gpio_set_value(84, "1");
//set no.84 GPIO low power level
m_gpioControl.gpio_set_value(84, "0");
//Init no.13 GPIO IN
m_gpioControl.Init(13, false);
//read no.13 GPIO power level
char buf[2];
m_gpioControl.gpio_get_value(13, buf);
if(buf[0] == '0')
{
//no.13 GPIO power level is low
}
else
{
//no.13 GPIO power level is high
}