
笔记
源码注释器
这个作者很懒,什么都没留下…
展开
-
decay_load 函数注释
decay_load 函数原创 2023-09-16 14:49:50 · 185 阅读 · 0 评论 -
ubuntu 使用虚拟串口查看开机日志
大体上按如下教程进行。https://www.cnblogs.com/huahaofeng/p/3730619.html文件 /etc/default/grub,我是这样改的GRUB_DEFAULT=0GRUB_HIDDEN_TIMEOUT=0GRUB_HIDDEN_TIMEOUT_QUIET=trueGRUB_TIMEOUT=10GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian#GRUB_CMDLINE_LI转载 2021-08-24 11:41:47 · 841 阅读 · 0 评论 -
为什么 /proc/meminfo 节点获取的 MemTotal 小于物理内存
/proc/meminfo MemTotal原创 2022-10-18 16:37:19 · 1073 阅读 · 1 评论 -
arm架构在linux系统上的mmu页表
arm架构 linux mmu页表原创 2022-10-14 14:17:45 · 627 阅读 · 0 评论 -
linux下spi调试小工具spidev_test、spi-tools
spidev_test spi-tools原创 2022-09-27 17:12:26 · 12158 阅读 · 2 评论 -
printk %p %px %pK
printk %p %px %pK。原创 2022-09-26 17:20:32 · 3367 阅读 · 0 评论 -
regmap接口的差异
regmap接口 差异原创 2022-08-31 15:27:16 · 160 阅读 · 0 评论 -
对比度、亮度、色调 和 yuv分量 的关系
对比度 亮度 色调原创 2022-08-08 09:52:21 · 299 阅读 · 0 评论 -
gdb+qemu 调试uboot,符号表需要重新加载到指定地址
gdb qemu uboot 符号表原创 2022-06-27 18:01:24 · 907 阅读 · 0 评论 -
ddr的 N-Bit Prefetch 的解释
ddr prefech原创 2022-06-24 16:59:49 · 709 阅读 · 0 评论 -
关于 libtool 的 -all-static 选项的讨论
autotool 编译静态链接的程序转载 2022-06-15 17:16:01 · 221 阅读 · 0 评论 -
handle_conflicting_encoders 函数的作用
函数的目的是判断能否保证:参数state范围内的connector都能跟自己最合适的那个encoder绑定。其判断条件如下:1、state范围内的不同connector的最佳绑定encoder是同一个,就返回-EINVAL;2、如果state范围内connector的最佳encoder已经被state外的connector绑定过了,那么有两种处理方式:a、保持冲突encoder和原来connector的绑定关系,返回-EINVAL;b、解除冲突encoder和原来connector的绑定关系s原创 2022-05-20 14:22:23 · 151 阅读 · 0 评论 -
notepad++ 取消回车后的自动缩进功能
原创 2022-05-17 11:03:36 · 961 阅读 · 0 评论 -
Kernel config options for kgdb
Kernel config options for kgdbTo enable CONFIG_KGDB you should look under:menuselection:Kernel hacking --> Kernel debugging and select:menuselection:KGDB: kernel debugger.While it is not a hard requirement that you have symbols in your vmlinuxfile,原创 2022-04-19 09:40:27 · 241 阅读 · 0 评论 -
红黑树 rb_first_postorder rb_next_postorder 两个函数作用举例
struct rb_node *rb;for (rb = rb_first_postorder(&root.rb_root); rb; rb = rb_next_postorder(rb)) {}上述for循环作用是遍历红黑树上每个结点,假如遍历的是如下这棵树 a / \ b c / \ / \ d e h i / \ f g顺序是: d f g e b h i c a...原创 2022-04-11 09:24:49 · 751 阅读 · 0 评论 -
agent-proxy小工具——用一个串口,既当控制台又当kgdb调试通道
agent-proxy下载地址1、下载后不需配置,直接make即可。2、启动代理,将串口映射成两个本地网络端口agent-proxy 5550^5551 0 /dev/ttyUSB0,115200把3、telnet登录一个端口,充当控制台telnet localhost 55504、gdb连接另一个端口,充当调试通道(gdb) target remote localhost:5551...原创 2022-03-31 19:15:50 · 1065 阅读 · 0 评论 -
在imx6平台实现多个串口控制台
默认linux只注册一个console,修改串口驱动可以实现多路串口都注册成console1、修改驱动https://download.youkuaiyun.com/download/zqwone/85051936另,device tree里也要开启多路串口的节点:&uart1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_uart1>; status = "okay";};&uart2 { pinctrl原创 2022-03-29 15:00:34 · 269 阅读 · 0 评论 -
用gdb的ptype命令查看结构体成员偏移量
(gdb) ptype /o struct amba_device/* offset | size */ type = struct amba_device {/* 0 | 456 */ struct device {/* 0 | 36 */ struct kobject {/* 0 | 4 */ const char *name;/* 4原创 2022-03-27 11:05:23 · 2729 阅读 · 0 评论 -
用 ioctl MEDIA_IOC_G_TOPOLOGY 命令获取 /dev/mediaX 节点的拓扑结构,示例程序
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <fcntl.h>#include <unistd.h>#include <sys/stat.h>#include <sys/types.h>#include <sys/ioctl.h>#include <asm/types.h>#include <原创 2022-03-03 18:08:53 · 405 阅读 · 0 评论 -
round_up 和 round_down
/* * This looks more complex than it should be. But we need to * get the type for the ~ right in round_down (it needs to be * as wide as the result!), and we want to evaluate the macro * arguments just once each. */#define __round_mask(x, y) ((__typ.原创 2022-02-27 16:25:15 · 1787 阅读 · 0 评论 -
sscanf返回值的含义
sscanf返回值的含义成功则返回参数数目,失败则返回-1,错误原因存于errno中经多次测试[来源请求],在linux系统中成功返回的是成功转换的值的个数,例如:sscanf(“1 2 3”,"%d %d %d",buf1, buf2, buf3); 成功调用返回值为3,即buf1,buf2,buf3均成功转换。sscanf(“1 2”,"%d %d %d",buf1, buf2, buf3); 成功调用返回值为2,即只有buf1,buf2成功转换。...原创 2022-02-13 10:46:02 · 5755 阅读 · 1 评论 -
修改linux命令行终端的显示区行数列数
stty rows 50 columns 200原创 2022-01-24 17:01:50 · 2940 阅读 · 0 评论 -
ftrace中event的filter 运算公式解析过程
echo "((sig >= 10 && sig < 15) || sig == 17) && comm != bash" > /sys/kernel/debug/tracing/events/signal/signal_generate/filter首先,参数((sig >= 10 && sig < 15) || sig == 17) && comm != bash先拆分到filter_parse_state原创 2022-01-21 13:53:57 · 732 阅读 · 0 评论 -
查看linux内核代码中宏展开后结果的方法
假如想看 kernel/printk/printk.c 里宏展开后的结果,运行命令:make kernel/printk/printk.i原创 2022-01-18 11:28:12 · 1053 阅读 · 0 评论 -
变更进程的控制终端和stdio
tty1 = open("/dev/tty2", O_RDONLY | O_WRONLY);tty2 = open("/dev/tty", O_RDONLY | O_WRONLY);dup2(tty1, STDIN_FILENO); 将0文件描述符指向/dev/tty2节点dup2(tty1, STDOUT_FILENO);dup2(tty1, STDERR_FILENO);printf("this is printf\n"); 在tty2窗口打印write(tty2, "this is w原创 2021-12-16 17:59:32 · 139 阅读 · 0 评论 -
dbm db
dbw 功率和1W的比值:10lg(P/1w)dbm 功率和1mW的比值:10lg(P/1mw)1w=0dbw=30dbmdb 两个功率的倍数 10lg(p1/p2)=10lg(p1/1mw) - 10lg(p2/1mw)即p1 dbm - p2 dbm = ?db参考:https://blog.youkuaiyun.com/xld_19920728/article/details/85256909原创 2021-11-22 11:46:25 · 581 阅读 · 0 评论 -
Program Size: Code=48008 RO-data=5660 RW-data=604 ZI-data=2124
一般 MCU 包含的存储空间有:片内 Flash 与片内 RAM,RAM 相当于内存,Flash 相当于硬盘。编译器会将一个程序分类为好几个部分,分别存储在 MCU 不同的存储区。Keil 工程在编译完之后,会有相应的程序所占用的空间提示信息,如下所示:linking...Program Size: Code=48008 RO-data=5660 RW-data=604 ZI-data=2124After Build - User command \#1: fromelf --bin.\\build转载 2021-11-18 13:41:21 · 448 阅读 · 0 评论 -
input子系统调试
一、多点触控协议介绍https://blog.youkuaiyun.com/u013491946/article/details/84871794二、安装input子系统工具包sudo apt install input-utils三、查看系统已注册的input设备sudo lsinput/dev/input/event0bustype : BUS_HOSTvendor : 0x0product : 0x1version : 0name : “Power Button”phys :转载 2021-11-17 10:46:48 · 409 阅读 · 0 评论 -
zynq平台sd卡启动用的多分区img文件的制作
http://blog.sina.com.cn/s/blog_9ac48e3c0102ybep.html原创 2021-10-12 13:14:19 · 1114 阅读 · 0 评论 -
linux新建账户ls没有颜色的解决方法
linux新建账户ls没有颜色:需要去/etc/skel/把下边的.bash_history .bash_logout .bashrc 或者把全部文件拷到用户家目录。原创 2021-10-08 15:44:03 · 307 阅读 · 0 评论 -
zynq平台用bootgen命令制作BOOT.bin
创建 boot.bif 文件,内容:the_ROM_image:{[bootloader]fsbl.elfu-boot.elf}创建 Makefile 文件,内容:BOOTGEN ?= bootgen.PHONY: all cleanall:@$(BOOTGEN) -image boot.bif -o BOOT.bin -w onclean:@rm -f BOOT*.bin将 fsbl.elf、u-boot.elf 放到同一文件下。(注意:elf扩展名一定不能少。u-boot.e原创 2021-09-28 10:21:26 · 2461 阅读 · 0 评论