EmbLogic's Blog

Category Archives: Uncategorized

Problem in registering and unregistering driver in kernel

There are some problems which we faced in un- registering the driver 1. there is no return type of unregister_chrdev_region , so you can check the result only by using vim /proc/devices after rmmod command 2. suppose if you are … Continue reading →

Posted in Uncategorized | Leave a comment

Registering a character device driver with Major and Minor number in kernel

RCS file: header.h,v Working file: header.h head: 1.3 branch: locks: strict raghav: 1.3 access list: symbolic names: keyword substitution: kv total revisions: 3;    selected revisions: 3 description: This is a seperate header file where i have included all the necessary … Continue reading →

Posted in Uncategorized | Leave a comment

GDB

What is gdb? “GNU Debugger” A debugger for several languages, including C and C++ It allows you to inspect what the program is doing at a certain point during execution. Errors like segmentation faults may be easier to find with … Continue reading →

Posted in Uncategorized | Leave a comment

SPI Protocol

SPI(Serial Peripheral Interface):- SPI (Serial Peripheral Interface) bus, which is commonly used for communication between integrated circuits or sensors .It is a serial master-slave Synchronous Protocol . It comes built in on many microcontrollers and SOC. The SPI serial bus … Continue reading →

Posted in Uncategorized | Leave a comment

/dev directory

The /dev directory contains the special device files for all the devices. The device files are created during installation, and later with the /dev/MAKEDEV script. The /dev/MAKEDEV.local is a script written by the system administrator that creates local-only device files … Continue reading →

Posted in Uncategorized | Leave a comment

Write a Program to calculate hcf and lcm of three numbers and also input number from user.

#include<stdio.h> int main() { int i,l,a,b,c; int lcm=1,hcf=1; int prime[26]={1,2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97}; printf(“enter the numbers”); scanf(“%d%d%d”,&a,&b,&c); for(i=1;i<26;i++) { l=prime[i]; if(a%l==0 && b%l==0 && c%l==0) { hcf*=l; } else { if(a%l==0) lcm*=l; if(b%l==0) lcm*=l; if(c%l==0) lcm*=l; } } } printf(“\nHcf of three number … Continue reading →

Posted in Uncategorized | Leave a comment

Inserting a file inside a Kernel file system

RCS file: entry.c,v Working file: entry.c head: 1.6 branch: locks: strict raghav: 1.6 access list: symbolic names: keyword substitution: kv total revisions: 6;    selected revisions: 6 description: program to insert a driver file inside our kernel —————————- revision 1.6    locked … Continue reading →

Posted in Uncategorized | Leave a comment

Introduction to Character Device Drivers and Kernel Symbol Table

Character Device Drivers:- Character special files or character devices relate to devices through which the system transmits data one character at a time by, for example, getchar. These device nodes often serve for stream communication with devices such as mice, … Continue reading →

Posted in Uncategorized | Leave a comment

Adding two numbers without using operators

we have provided many utilities in printf ,in which one of it is adding two positive number (only for positive numbers).here it goes like this, we all now that printf() On success,returns the total number of characters written. On failure, … Continue reading →

Posted in Uncategorized | Leave a comment

Using the /proc Filesystem

The /proc filesystem is a special, software-created filesystem that is used by the ker- nel to export information to the world. Each file under /proc is tied to a kernel func- tion that generates the file’s “contents” on the fly … Continue reading →

Posted in Uncategorized | Leave a comment

Code that takes a username and password from the user as an input,matches it with the master database file to find whether it is correct or not.

RCS file: username_password.c,v Working file: username_password.c head: 1.7 branch: locks: strict root: 1.7 access list: symbolic names: keyword substitution: kv total revisions: 7;    selected revisions: 7 description: Code that takes a specific username and password from a user.Matches it with … Continue reading →

Posted in Uncategorized | Leave a comment

Master array implementation project01

RCS file: mcdc.c,v Working file: mcdc.c head: 1.1 branch: locks: strict Emblinux: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1;    selected revisions: 1 description:

Posted in Uncategorized | Leave a comment

how to install applications using .tar file ??

Posted in Uncategorized | Leave a comment

Implementation of MASTER ARRAY

Implementation of Master array. A special type of array without repetition of elements. —————————- revision 1.2 locked by: akshat; date: 2014/01/29 04:22:44; author: akshat; state: Exp; lines: +3 -3 implementation of master array using concept of pointers. —————————- revision 1.1 … Continue reading →

Posted in Uncategorized | Leave a comment

Implementing Semaphore in a single process by setting its initial value to ZERO

RCS file: test1.c,v Working file: test1.c head: 1.6 branch: locks: strict raghav: 1.6 access list: symbolic names: keyword substitution: kv total revisions: 6;    selected revisions: 6 description: Implementing semaphore in a single process to check what if …we set the … Continue reading →

Posted in Uncategorized | Leave a comment