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-10-05 15:08:02 发布