摘要: #include <stdio.h> int main(int argc, char *argv[]) { int a[10]={ 0,1,33,200,45,34,89,90,23,13 }; int i,j; int temp; for(i=0;i<10;i++) { for(j=i+1;j<1 阅读全文
posted @ 2016-07-12 17:30 luxiaolai 阅读(545) 评论(0) 推荐(0) 编辑
摘要: 移植openssh至嵌入式ARM开发板2011-06-28 15:441. 开发板:SBC6020 CPU:AT91SAM9G20 Linux内核:2.6.30 板子拿到手其中的telnet服务不好用,所以就想着移植一个ssh的服务器上去。 2. 首先下载源码包: openssh-4.6p1.tar 阅读全文
posted @ 2016-04-15 14:30 luxiaolai 阅读(807) 评论(0) 推荐(0) 编辑
摘要: 例如: 在一个界面中有16个按钮(QPushButton)和4个(QRadioButton)这20个物件的SIGNAL(clicked(bool))都连接(connect)到同一个按键的处理槽中(void get_keyvalue(bool)) 那么就需要在get_keyvalue这个槽中把这些信号 阅读全文
posted @ 2016-03-18 13:55 luxiaolai 阅读(673) 评论(0) 推荐(0) 编辑
摘要: module key (clk,rst,key_up,led);input clk,rst,key_up;output reg [3:0] led;parameter T10ms=31'd2_000_00;reg clk_state;reg [31:0] cnt;parameter state_in 阅读全文
posted @ 2016-03-08 21:11 luxiaolai 阅读(848) 评论(0) 推荐(0) 编辑
摘要: 51单片机按键双击 关键字:51单片机 按键双击 //hnrain 改 //适用于CEPARK 51开发板 /****************************************************************************************** **** 阅读全文
posted @ 2016-03-08 09:10 luxiaolai 阅读(1020) 评论(0) 推荐(0) 编辑
摘要: #!/bin/shmodule="scull"device="scull"mode="664"# invoke insmod with all arguments we got# and use a pathname, as newer modutils don't look in . by def 阅读全文
posted @ 2016-02-29 16:59 luxiaolai 阅读(257) 评论(0) 推荐(0) 编辑
摘要: #include "stdio.h"typedef enum weekday{sun,mon,tue,wed,thu,fri,sat} week;typedef enum ledstate{on,off,tri} state;void main(){week a,b,c,d;state ledon, 阅读全文
posted @ 2016-02-29 15:44 luxiaolai 阅读(445) 评论(0) 推荐(0) 编辑
摘要: linux对于端口IO使用遵循分配,映射与使用 struct resource *request_mem_region(unsigned long start,unsigned long len,char *name); 申请失败返回NULL,否则非零。 void release_mem_regio 阅读全文
posted @ 2016-02-23 15:58 luxiaolai 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 通过文本文件/proc/sys/kernel/printk读写控制台记录级别 可以使所有内核消息出现在控制台,通过简单地输入 #echo 8 > /proc/sys/kernel/printk 阅读全文
posted @ 2016-02-23 13:55 luxiaolai 阅读(138) 评论(0) 推荐(0) 编辑
摘要: read方法是从设备拷贝数据到用户空间:使用copy_to_user write方法是从用户空间拷贝数据到设备:使用copy_from_user。 阅读全文
posted @ 2016-02-23 13:39 luxiaolai 阅读(499) 评论(0) 推荐(0) 编辑