Linux device driver
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)
浙公网安备 33010602011771号