|
2# embedsky_lxt
用的是qt creator 代码我找到原因了,是 beep *b;
指针没初始化。
现在的问题是我按了button之后蜂鸣器没反应~~!那个
槽这样写对吗?
connect(button,SIGNAL(clicked()),this,SLOT(beep_init()));
void beep::beep_init()
{
fd=open("/dev/PWM-Test",O_RDWR);
ioctl(fd,10,4);
}
还有led灯的槽
这样写也没反应
void led::led_init()
{
fd=open("/dev/GPIO-Control",O_RDWR);
ioctl(fd,0,0);
ioctl(fd,0,1);
ioctl(fd,0,2);
ioctl(fd,0,3);
}我看手册上好像也是这么写的为什么不对啊?谢谢了 |
|