EmbLogic's Blog

Category Archives: Device Drivers

How to Replace a Switch-Statement with function pointer

float Plus (float a, float b) { return a+b; } float Minus (float a, float b) { return a-b; } float Multiply(float a, float b) { return a*b; } float Divide (float a, float b) { return a/b; } // … Continue reading

Posted in Character Driver | Leave a comment

char. driver

RCS file: create_scull.c,v Working file: create_scull.c head: 1.67 branch: locks: strict root: 1.67 access list: symbolic names: keyword substitution: kv total revisions: 67; selected revisions: 67 description: this is a scull creating file —————————- revision 1.67 locked by: root; date: … Continue reading

Posted in Character Driver | Leave a comment

Hello_kern_prog

This is insert the data into the ram and print it.

Posted in Character Driver | Leave a comment

Character-driver

Character driver —————————- revision 1.38 date: 2016/03/11 05:46:49; author: root; state: Exp; lines: +0 -1 *** empty log message *** —————————- revision 1.37 date: 2016/03/10 09:52:22; author: root; state: Exp; lines: +1 -1 *** empty log message *** —————————- revision … Continue reading

Posted in Character Driver | Leave a comment

Multi-Tasking Operating System

Multitasking OS is the one that can simultaneously interleave execution of more then one process. They are of two types : >>cooperative multitasking : in this process don’t stop running until it voluntary decide to do so . This is … Continue reading

Posted in Character Driver, Project 03: Client Server Communication using Linux and IPC | Leave a comment

character driver(Hello kernel)

RCS file: exit_p.c,v Working file: exit_p.c head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1;    selected revisions: 1 description: file contain init_exit module and function. —————————- revision 1.1    locked by: root; date: … Continue reading

Posted in Device Drivers | Leave a comment

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

Posted in Character Driver | Tagged , , , , | Leave a comment

Introduction to Block Driver

Overview :  Block Drivers are act as conduit between core memory and secondary storage. There is a virtual memory layer between core memory and secondary storage. Block Layer could be seen as a part of virtual memory subsystem. Block driver … Continue reading

Posted in Block Driver | Leave a comment

character driver

Hi! character driver steps of character driver writing – 1->create structure for device 2->Allocate memory 3->Initialise device 4->Insert device using modprobe /insmod command 5->Release device     3 .  

Posted in Character Driver | Tagged | Leave a comment

How to Write a Writer Routine.

In the char driver We write the Write Routine.  This write routine is mapped in struct file operations . We use copy_from_user macro. this macro has three arguments. first is void* to second is const  void* __user form and last … Continue reading

Posted in Character Driver | Leave a comment

Create the node, open it and open & release the devices

RCS file: header.h,v Working file: header.h head: 1.14 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 14; selected revisions: 14 description: this is basic header file —————————- revision 1.14 date: 2015/05/07 07:48:45; author: root; state: Exp; … Continue reading

Posted in Character Driver, Device Drivers | Leave a comment

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

Posted in Character Driver, Device Drivers | Tagged , | Leave a comment

Register a new device using register_chrdev_region, and intialize & add all devices

RCS file: header.h,v Working file: header.h head: 1.1 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 1; selected revisions: 1 description: this is basic header file —————————- revision 1.1 date: 2015/04/24 05:20:37; author: root; state: Exp; … Continue reading

Posted in Character Driver, Device Drivers | Leave a comment

Initialization, registeration of device driver by using cdev_add() and remove the connection successfully

RCS file: header.h,v Working file: header.h head: 1.5 branch: locks: strict access list: symbolic names: keyword substitution: kv total revisions: 5; selected revisions: 5 description: —————————- revision 1.5 date: 2015/04/26 15:51:54; author: root; state: Exp; lines: +1 -0 removed the … Continue reading

Posted in Character Driver, Device Drivers | Tagged , , , | Leave a comment

Insert the driver into the kernel and remove the driver from kernel

RCS file: init.c,v Working file: init.c head: 1.6 branch: locks: strict emblogic: 1.6 access list: symbolic names: keyword substitution: kv total revisions: 6; selected revisions: 6 description: Print a statement in the kernel Register in the kernel. —————————- revision 1.6 … Continue reading

Posted in Character Driver | Leave a comment