EmbLogic's Blog

Author Archives: pankaj.e1

cd driver

In init() it call cdrom_sysctl_register() which initialied different parameter like autoclose, autoeject, debug, lockdoor, check_media_change.

Posted in Uncategorized | Leave a comment

Spi communication

In spi communication , master controls  the clock for transmission. whenever master has data to be sent , it load the data in SDO and then high the clock status. slave check for high clock and then reads data from … Continue reading →

Posted in Uncategorized | Leave a comment

SPI Protocol

The Serial Peripheral Interface Bus is a synchronous serial data link standard  that operates in full duplex mode. Devices communicate in master/slave mode where the master device initiates the data frame. Multiple slave devices are allowed with individual slave select … Continue reading →

Posted in Uncategorized | Leave a comment

end request function

prototype of end request function is void end_request(struct request *, int ) here if we pass 0 as second argument if  request is not complete and 1 if it’s complete

Posted in Uncategorized | Leave a comment

Basic request queue function

Queue creation and deletion request_queue_t *blk_init_queue(request_fn_proc *request, spinlock_t *lock);   The arguments are, of course, the request function for this queue and a spinlock that controls access to the queue. This function allocates memory (quite a bit of memory, actually) … Continue reading →

Posted in Uncategorized | Leave a comment

Basic block request flow

In block driver request function check whether request is valid or not as per filesystem request. void request(request_queue_t *queue); After validation ,it calls transfer function to perform the write or read operation. sbull_transfer(dev, req->sector, req->current_nr_sectors, req->buffer, rq_data_dir(req));

Posted in Uncategorized | Leave a comment

Block driver main structure

struct sbull_dev { int size; /* Device size in sectors */ u8 *data; /* The data array */ short users; /* How many users */ short media_change; /* Flag a media change? */ spinlock_t lock; /* For mutual exclusion */ … Continue reading →

Posted in Uncategorized | Leave a comment

Block Driver

After character devices and network devices, block devices are another important device type of any system ?Block Devices are used for the storage of application code and data, and user data, they are often critical to the overall performance of … Continue reading →

Posted in Uncategorized | Leave a comment

Modules vs Programs Modules vs Programs

A program usually begins with a main() function, executes a bunch of instructions and terminates upon completion of those instructions. Kernel modules work a bit differently. A module always begin with either the init_module or the function you specify with … Continue reading →

Posted in Uncategorized | Leave a comment

How Do Modules Get Into The Kernel

When the kernel needs a feature that is not resident in the kernel, the kernel module daemon kmod ‘execs’ modprobe to load the module in. modprobe is passed a string in one of two forms: * A module name like … Continue reading →

Posted in Uncategorized | Leave a comment

8051 programming in c

If we need to refer to single bit of controller then syntax is sbit led p1^1; then change in led variable reflect on 1 pin of p1 port

Posted in Uncategorized | Leave a comment

3d globe

In 3d globe ,u need to calculate time slot using rpm of the machine.with this u can calculate which leds needs to be lighted up at that particular instant

Posted in Uncategorized | Leave a comment

DTMF decoder circiut

In DTMF we use 8770 ic which decode the dual-tone, multi-frequency send through u’r phone. After this u can program u’r IC to do specified works

Posted in Uncategorized | Leave a comment

Tone Generator

with the help of UM3561 we can create 3 different tone. pin 1 and pin 6 are selecting pins to create different tones

Posted in Uncategorized | Leave a comment

Smoke sensor

in smoke sensor we need mq2 sensor and lm324 ic . with the help of variable register we can vary the resistivity of the sensor

Posted in Uncategorized | Leave a comment