2019年3月6日

QT对linux下/sys/class/gpio中的gpio的控制

摘要: #define SYSFS_GPIO_EXPORT "/sys/class/gpio/export"#define SYSFS_GPIO_RST_PIN_VAL "926"#define SYSFS_GPIO_RST_DIR "/sys/class/gpio/gpio926/direction"#d 阅读全文

posted @ 2019-03-06 09:59 小小小哈 阅读(3298) 评论(0) 推荐(0) 编辑

QT 线程的暂停和继续

摘要: 可以使用互斥量的方式,来进行暂停和开继续 .h文件 #include <QMutex> QMutex _mutex; .cpp文件 //暂停 void mythread::pause(){ this->_mutex.lock();} //开始void mythread::resume(){ this 阅读全文

posted @ 2019-03-06 09:48 小小小哈 阅读(2919) 评论(0) 推荐(0) 编辑

QT的close和系统的close冲突

摘要: 在QT中关于文件读写,即使加了头文件,你会发现close()函数会报错 error: no matching function for call to 'communicat::close(int&), 因为QT本身也有close函数,就会发生冲突。 所以如果是文件读写函数需要写成如下格式 ::cl 阅读全文

posted @ 2019-03-06 09:44 小小小哈 阅读(774) 评论(0) 推荐(0) 编辑

导航