摘要: select和poll系统调用最终会使设备驱动中的poll()函数被执行, Linux2.5.45内核还引入和epoll()即extended poll。 int select(int numfds, fd_set *readfds, fd_set *writefds, fd_set *except 阅读全文
posted @ 2023-12-12 23:43 七块蛋糕 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 两个函数send and recv 1 num = send(s, addr_of_data, len_of_data, 0); 2 num = recv(s, addr_of_buffer, len_of_buffer, 0); 3 close(s); s: socket s, 是其他client 阅读全文
posted @ 2023-11-20 06:40 七块蛋糕 阅读(3) 评论(0) 推荐(0) 编辑
摘要: To use a character driver, first you should register it with the system. Then you should expose it to the user space. 1. cdev_init and cdev_add functi 阅读全文
posted @ 2023-10-25 22:40 七块蛋糕 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 1. 查看识别在某个目录下文件类型: $ ls -ld <file name> 2. 文件可能的类型, 跟着不一样的后缀 1 – : regular file 2 d : directory 3 c : character device file 4 b : block device file 5 阅读全文
posted @ 2023-08-18 17:46 七块蛋糕 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 1 tar xfv ./linux*.tar.gz 阅读全文
posted @ 2023-08-14 18:22 七块蛋糕 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 当一个工程里的某些文件需要更新,此时你想执行这个工程,那么此时make就排上用场了。使用make时需要同时有一个对应的makefile(或者Makefile),它定义了一系列需要编译,处理的任务。 make调用编译器编译一系列源代码为二进制文件。 makefile里的基本结构是rule,其由三部分组 阅读全文
posted @ 2023-08-14 04:34 七块蛋糕 阅读(21) 评论(0) 推荐(0) 编辑
摘要: gcc code-editor(e.g VS Code) 阅读全文
posted @ 2023-06-05 05:40 七块蛋糕 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 拼接字符串, 在定义好变量之后, 输出时候的拼接, 注意无意输出一些空格 。 比如: #!/bin/bash a1="China" a2="${a1}, Japan and Korean are the three important countries in east asia. \n" a3=" 阅读全文
posted @ 2023-06-04 22:43 七块蛋糕 阅读(8) 评论(0) 推荐(0) 编辑
摘要: new bought  STM 32 f103 core board hardware connection problem One connection problem: after the core board is bought back, the pin header needs to be manually soldered to the board. Originally I thought it could 阅读全文
posted @ 2023-06-03 01:44 七块蛋糕 阅读(14) 评论(0) 推荐(0) 编辑