Tag Archives: char driver
What is Character Driver?
A character device driver is one that transfers data directly to and from a user process. This is the most common type of device driver and there are plenty of simple examples in the source tree. Character device drivers may … Continue reading
Add the 20 devices and initialise the user defined structure dev in b/w cdev_init and cdev_add
RCS file: header.h,v Working file: header.h head: 1.6 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 6; selected revisions: 6 description: —————————- revision 1.6 date: 2015/04/28 15:54:10; author: root; state: Exp; lines: +16 -0 define the … Continue reading
Initializing a driver using alloc_chrdev_region()
RCS file: header.h,v Working file: header.h head: 1.10 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 10; selected revisions: 10 description: this is header file here various header files are included such as module param.h init.h … Continue reading
ioctl..
In the ioctl function at driver level…….., the switch(cmd) statement have ‘cmd’ as the argument but we can see cmd is of ‘unsigned int’ type… i want to ask how the switch function perform case matching…. switch(cmd) { case IOSQSET: … Continue reading