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)

posted on 2010-08-20 19:09  zhtwe  阅读(139)  评论(0)    收藏  举报

导航