随笔分类 -  Linux 内核 && 驱动 / IMX6ULL

正点原子和韦东山im6ull学习笔记
摘要:以下代码为整点原子代码: 多点触摸相关API函数: int input_mt_init_slots( struct input_dev *dev, unsigned int num_slots, unsigned int flags) // 初始化slots // 函数参数和返回值含义如下: dev 阅读全文
posted @ 2024-03-31 23:29 lethe1203 阅读(141) 评论(0) 推荐(0) 编辑
摘要:此处代码为正点原子代码 probe函数重点: 1、dts获得硬件信息 2、alloc/set/register input_dev alloc:input_allocate_device或devm_input_allocate_device,input_dev.name等不重要 set:重点为ev_ 阅读全文
posted @ 2024-03-31 17:45 lethe1203 阅读(16) 评论(0) 推荐(0) 编辑
摘要:此篇不涉及gpio子系统和pinctrl原理解释,只列举相关操作函数: 通用的GPIO操作: 1. gpio_request(unsigned gpio, const char *label):向内核申请指定gpio,所申请的IO口会被内核记录 参数:gpio:申请IO口编号 ,label:申请者的 阅读全文
posted @ 2024-03-23 22:40 lethe1203 阅读(143) 评论(0) 推荐(0) 编辑
摘要:参考资料:https://www.bilibili.com/video/BV1fJ411i7PB?p=25&vd_source=432ba293ecfc949a4174ab91ccc526d6 dts节点: dtsled { #address-cells = <1>; #size-cells = < 阅读全文
posted @ 2024-03-23 21:55 lethe1203 阅读(37) 评论(0) 推荐(0) 编辑
摘要:代码参考正点原子 在https://www.cnblogs.com/lethe1203/p/18091283一文中,存在以下的几个问题: 1、使用register_chrdev函数注册字符设备,浪费了大量的次设备号,而且需要手动指定主设备号,还需要事先确认好哪一个主设备号没用 2、需要手动mknod 阅读全文
posted @ 2024-03-23 18:23 lethe1203 阅读(34) 评论(0) 推荐(0) 编辑
摘要:基本概念可参考https://www.cnblogs.com/lethe1203/p/18091326、 代码参考正点原子 led驱动文件led.c: #include <linux/types.h> #include <linux/kernel.h> #include <linux/delay.h 阅读全文
posted @ 2024-03-23 17:24 lethe1203 阅读(14) 评论(0) 推荐(0) 编辑
摘要:参考资料: https://www.bilibili.com/video/BV1fJ411i7PB?p=3&vd_source=432ba293ecfc949a4174ab91ccc526d6 基本概念: 字符设备是Linux驱动中最基本的一类设备驱动,字符设备就是一个一个字节,按照字节流进行读写操 阅读全文
posted @ 2024-03-23 16:33 lethe1203 阅读(142) 评论(0) 推荐(0) 编辑