V4L2框架

怎么写字符设备驱动? 构造file_operations: .open = drv_open .read = drv_read .write = drv_write 2.告诉内核: register_chrdev(主设备号,file_operations, name) 备注:主设备号可以写0,让系统自动分配 有的书不建议使用register_chrdev结构体:因为太老了。可以替换成如下步骤: step1: 分配cdev step2: 设置cdev step3: cdev_add 3.入口函数.:调用 register_chrdev 4.出口函数:调用 unregister_chrdev 对于复杂的字符设备驱动程序,引用分层概念 eg: LCD fbmem.c : 1.file_operations open/read/write 2.register_dev 3.入口和出口 只需要设置硬件相关: 1.分配fb_info 2.设置fb_info 3.注册 4.硬件相关的操作…

一些觉得不错的国外Mooc课程

https://www.coursera.org/learn/programming-languages/home/info 程序设计语言 https://www.coursera.org/learn/mobile-robot 移动机器人设计 https://www.coursera.org/learn/algorithms-part1 普林斯顿大学算法课程 https://www.coursera.org/specializations/computervision 计算机视觉专项课程 https://www.coursera.org/specializations/self-driving-cars 自动驾驶课程 https://www.coursera.org/specializations/modernrobotics 现代机器人 http://ais.informatik.uni-freiburg.de/teaching/ss18/robotics/ 机器人 https://www.coursera.org/learn/machine-learning/ 机器学习(有中文字幕) https://www.coursera.org/specializations/deep-learning 深度学习(有中文字幕) https://www.coursera.org/specializations/algorithms 斯坦福算法课程 https://www.coursera.org/learn/algorithmic-toolbox 算法工具箱 https://www.coursera.org/learn/logic-introduction 斯坦福大学逻辑学导论 https://www.coursera.org/specializations/scala scala专项课程 https://www.coursera.org/learn/progfun1 Scala 函数式程序设计原理 https://www.coursera.org/learn/comparch 计算机体系结构 https://www.coursera.org/specializations/robotics 机器人专项课程 https://www.coursera.org/learn/ntumlone-mathematicalfoundations 机器学习基石 https://www.coursera.org/specializations/machine-learning 机器学习专项课程 https://www.coursera.org/specializations/aml 高级机器学习专项 https://www.coursera.org/learn/model-thinking…

Leetcode: 9. Palindrome Number

Determine whether an integer is a palindrome. An integer is a palindrome when it reads the same backward as forward. Example 1: Input: 121 Output: true Example 2: Input: -121 Output: false Explanation: From left to right, it reads -121.…

Leetcode:705. Design HashSet

题目: Design a HashSet without using any built-in hash table libraries. To be specific, your design should include these functions: add(value): Insert a value into the HashSet. contains(value) : Return whether the value exists in the HashSet or not. remove(value):…