上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页
摘要: 1 增加头文件 #include "QTextCodec"2 在文件中增加如下内容 QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); QTextCodec::setCodecForCStrings(QTextCodec::co... 阅读全文
posted @ 2015-03-17 11:04 luxiaolai 阅读(250) 评论(0) 推荐(0) 编辑
摘要: CC=arm-linux-gcctarget=testsource=test.call: $(target)$(target): $(source)$(CC) -o $@ $<.PHONY:cleanclean:rm -f ~.* test 阅读全文
posted @ 2015-03-06 13:14 luxiaolai 阅读(342) 评论(0) 推荐(0) 编辑
摘要: #ifdef DEBUG #define debug(fmt,args...) printk(fmt ,##args) #define debugX(level,fmt,args...) if (DEBUG>=level) printk(fmt,##args); #else #define debu... 阅读全文
posted @ 2015-03-06 09:01 luxiaolai 阅读(226) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include s... 阅读全文
posted @ 2015-03-05 22:37 luxiaolai 阅读(492) 评论(0) 推荐(0) 编辑
摘要: //重启软件 void MainWindow::on_pushButton_UI_reboot_clicked(){ //方式1 需要主函数中事件循环判断 //qApp->exit(773); //重启代码,773 = 'r'+'e'+'s'+'t'+'a'+'r'+'t' ==>restart//... 阅读全文
posted @ 2015-02-25 14:22 luxiaolai 阅读(743) 评论(0) 推荐(0) 编辑
摘要: 第一部分:关于sleep函数,我们先来看一下他的作用:sleep函数是使调用sleep函数的线程休眠,线程主动放弃时间片。当经过指定的时间间隔后,再启动线程,继续执行代码。sleep函数并不能起到定时的作用,主要作用是延时。在一些多线程中可能会看到sleep(0);其主要目的是让出时间片。sleep... 阅读全文
posted @ 2015-01-29 14:00 luxiaolai 阅读(16323) 评论(0) 推荐(0) 编辑
摘要: gcc -shared hello.c -o libhello.sogcc -o test test.c -L库所在目录 -l库名 阅读全文
posted @ 2015-01-20 17:06 luxiaolai 阅读(145) 评论(0) 推荐(0) 编辑
摘要: module tw(clk,k_or,k1,k2);input clk;output k_or,k1,k2;reg [2:0] c1,c2;reg m1,m2;initialbeginc1=0;c2=0;m1=0;m2=0;endalways @(posedge clk)beginif(c1==a)... 阅读全文
posted @ 2015-01-20 14:58 luxiaolai 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 内核中的 likely() 与 unlikely()在 2.6 内核中,随处可以见到 likely() 和 unlikely() 的身影,那么为什么要用它们?它们之间有什么区别?首先要明确: if(likely(value)) 等价于 if(value) if(unlikely(value)) 也等... 阅读全文
posted @ 2015-01-16 08:55 luxiaolai 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 我的板子设置HCLK=100M因此CLKVAL= int(HCLK/(VCLK*2)-1),其中VCLK即上图的DCLK=6.4M, CLKVAL="int"(100/12.8-1)=int(6.8)=6因此 VCLK = HCLK/[(CLKVAL+1)x2]= 100/2*(6+1)= 7.14... 阅读全文
posted @ 2014-11-25 20:25 luxiaolai 阅读(1067) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 11 下一页