阅读源码的一些activity
读书破万卷
今天少内耗10点半睡觉和今天早晚运动
每天有限 多动脑 多运动 多实践 多学习
展开
-
struct v4l2_buffer 描述符
```cstruct v4l2_buffer{ __u32 index; // sequence number enum v4l2_buf_type type; // V4L2_BUF_TYPE_VIDEO_CAPTURE | V4L2_BUF_TYPE_VIDEO_OUTPUT __u32 bytesused; // The size of the image data __u32 flags; enum v4l2_field field; struct timeval time.原创 2021-09-17 10:39:43 · 890 阅读 · 0 评论 -
结构体变量数组在framebuffer驱动应用:
struct fb_info *registered_fb[FB_MAX] __read_mostly;EXPORT_SYMBOL(registered_fb);增加数组元素:if (num_registered_fb == FB_MAX) return -ENXIO;num_registered_fb++;for (i = 0 ; i < FB_MAX; i++) if (!registered_fb[i]) break; registered_fb[i] = fb_info;原创 2021-08-01 10:18:44 · 112 阅读 · 0 评论 -
list_head在available_func使用
init:INIT_LIST_HEAD(&gi->available_func);add:list_add_tail(&fi->cfs_list, &gi->available_func);get: list_for_each_entry(fi, &gi->available_func, cfs_list) { if (fi != NULL && fi->f != NULL && fi->原创 2021-07-25 19:53:55 · 101 阅读 · 0 评论 -
v4l2_device和子设备的注册
struct v4l2_device{ struct device*dev; #if defined(CONFIG_MEDIA_CONTROLLER) struct media_device*mdev;#endif struct list_head subdevs; spinlock_t lock; char name[V4L2_DEVICE_NAME_SIZE]; void(*notify)(struct v4l2_subdev*sd,unsigned int notificatio原创 2021-07-25 19:29:14 · 218 阅读 · 0 评论 -
list_head在udc的应用
static LIST_HEAD(udc_list);add: list_add_tail(&udc->list, &udc_list);fix: list_for_each_entry(udc, &udc_list, list) { ret = strcmp(name, dev_name(&udc->dev)); if (!ret) break; } if (ret) { ret = -ENODEV; goto out;原创 2021-07-17 10:56:59 · 164 阅读 · 0 评论 -
jffs2_flash_direct_write实现
原创 2021-05-23 15:52:26 · 142 阅读 · 0 评论 -
jffs2_erase_block函数实现过程
jffs2_erase_block #include <linux/mtd/mtd.h> (1)mtd_erase (2)判断擦除的返回值...原创 2021-05-23 15:35:41 · 226 阅读 · 0 评论 -
struct mii_bus和__mdiobus_register
/* * The Bus class for PHYs. Devices which provide access to * PHYs should register using this structure */struct mii_bus { struct module *owner; const char *name; char id[MII_BUS_ID_SIZE]; void *priv; int (*read)(struct mii_bus *bus, int phy_id.原创 2021-04-19 00:03:05 · 979 阅读 · 0 评论 -
get_phy_device和phy_device_register
/** * get_phy_device - reads the specified PHY device and returns its @phy_device * struct * @bus: the target MII bus * @addr: PHY address on the MII bus * @is_c45: If true the PHY uses the 802.3 clause 45 protocol * * Description: Reads the I.原创 2021-04-18 23:28:22 · 1107 阅读 · 1 评论