dev_t
int MAJOR(dev_t dev) // macro
int MINOR(dev_t dev) // macro
dev_t MKDEV(int major, int minor) // macro
int register_chrdev_region(dev_t first, unsigned int count, char *name)
int alloc_chrdev_region(dev_t *dev, unsigned int firstminor, unsigned int count, char *name) // device number stored in '/proc/devices', it will be used by 'mknod' to make a node under '/dev'
void unregister_chrdev_region(dev_t first, unsigned int count)
Linux device driver
最新推荐文章于 2024-08-22 17:10:39 发布