基于Linux开发板的GPIO子系统,使用poll()函数监听io口的实时电平变化,使用示例:
GpioApi ioTest = new GpioApi(this);
ioTest->addOutIO(GpioApi::IO_C_0);//添加输出口
ioTest->addInIO(GpioApi::IO_G_11);//添加输入口
ioTest->addInIO(GpioApi::IO_G_10);
ioTest->addInIO(GpioApi::IO_G_12);
ioTest->setOutIO(GpioApi::IO_C_0, 1);//设置输出口电平
ioTest->start();//开始监听添加的
详情请见博客:https://blog.csdn.net/birdman_1992/article/details/91412538
1