管理提醒: 本帖被 kasim 执行取消锁定操作(2009-11-04)
我是mini2440的板子,单独编译自带的examples中的led测试程序没问题,自带的arm-qtopia文件夹下有一个hello测试程序,现在我想实现这样一个功能:当我单击hello程序里的button时,led灯的第四个点亮,所以我重新修改连接button的槽如下:
void HelloForm::SayHello()
{
MessageLabel->setText("Hello, Qtopia world!");
int fd;
fd = open("/dev/leds0", 0);
if (fd < 0) {
fd = open("/dev/leds", 0);
}
if (fd < 0) {
perror("open device leds");
exit(1);
}
ioctl(fd, 1, 3);
close(fd);
}
头文件也是包含了原led测试程序的头文件,现在编译出现错误说‘open’was not declared in this scope
但ioctl和close函数却没有错误提示,这是什么原因呢?XX was terminated due to application error(11)
[ 此帖被kasim在2009-11-04 16:58重新编辑 ]