EmbLogic's Blog

IEEE EIA/TIA – 232E specification and associated serial port device driver(Implementing NULL MODEM)

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
included linux/ioport.h header file
—————————-
revision 1.1 locked by: root;
date: 2014/11/17 04:02:27; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: declaration.h,v
Working file: declaration.h
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
—————————-
revision 1.1 locked by: root;
date: 2014/11/17 04:02:50; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: initilization.c,v
Working file: initilization.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
Implemented check_region(), release_region() and request_region()
—————————-
revision 1.2 locked by: root;
date: 2014/11/17 04:04:26; author: root; state: Exp; lines: +1 -1
Set the 7th bit(DLAB) of LCR register for baud setting.
sent 0x0c to THR register for 9600.
Now send 0×03 to LCR register for 8-bit data transfer.
—————————-
revision 1.1
date: 2014/11/17 04:03:33; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: cleanup.c,v
Working file: cleanup.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
Implemented release_region()
—————————-
revision 1.2 locked by: root;
date: 2014/11/17 04:13:19; author: root; state: Exp; lines: +1 -1
******
—————————-
revision 1.1
date: 2014/11/17 04:11:07; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: dev_open.c,v
Working file: dev_open.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
—————————-
revision 1.1 locked by: root;
date: 2014/11/17 04:11:28; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: dev_release.c,v
Working file: dev_release.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
—————————-
revision 1.1 locked by: root;
date: 2014/11/17 04:11:46; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: dev_write.c,v
Working file: dev_write.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
Write data serially using null modem
Sent single character through null modem
—————————-
revision 1.1 locked by: root;
date: 2014/11/17 04:12:07; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: dev_read.c,v
Working file: dev_read.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
Receive the serial data successfully
—————————-
revision 1.1 locked by: root;
date: 2014/11/17 04:12:21; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: file_op.h,v
Working file: file_op.h
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
—————————-
revision 1.1 locked by: root;
date: 2014/11/17 04:12:38; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Device Drivers, Serial Port Driver | Leave a comment

Command to know CPU Architecture & Endianness

lscpu: lscpu gathers CPU architecture information like number of CPUs, threads, cores, sockets, NUMA nodes, information about CPU caches, CPU family, model, bogoMIPS, byte order and stepping from sysfs and /proc/cpuinfo, and prints it in a human-read?able format.
Cmd to know system endianness:
1. file a.out
2. lscpu | grep -i byte
3.readelf -h libname //command to check particular library info
Screenshot-1

Posted in Uncategorized | Leave a comment

IEEE EIA/TIA-232-E specification and associated serial port device driver

Summary :
The project uses RS 232 protocol to transfer a single byte of data between two host systems over a serial communication channel.
Following are the rcs files :
1. Intialization module :
RCS file: ./initialization.c,v
Working file: initialization.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
Following operations have been performed successfully.
–Driver successfully registered and removed.
– Range of addresses from 0x3f8 to 0x3ff, acquired and release successfully.
– Baud rate set by manipulating the Line control register.
– Number of message bits set, by setting the bits 0 and 1 of the LCR resigter.
– Driver successfully added to the kernel table.
—————————-
revision 1.2 locked by: root;
date: 2014/11/13 15:41:05; author: root; state: Exp; lines: +1 -6
*** empty log message ***
—————————-
revision 1.1
date: 2014/11/13 15:35:18; author: root; state: Exp;
Initial revision
========================================================
2. write module :
RCS file: dev_write.c,v
Working file: dev_write.c
head:
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 0
description:
write module :
– write data to the serial port.
– data read successfully from the user application.
– data successfully written to the 0x3f8 or the THR ( Transmitter holding Register )
==========================================================
3. read module :
RCS file: dev_read.c,v
Working file: dev_read.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
read module :
– read the data from the serial port at address 0x03f8 ( Receiver Buffer Register ).
—————————-
revision 1.2 locked by: root;
date: 2014/11/13 15:55:54; author: root; state: Exp; lines: +2 -0
Data read successfully from the port and sent to user application.
Single byte of data received successfully.
—————————-
revision 1.1
date: 2014/11/13 15:55:20; author: root; state: Exp;
Initial revision
==========================================================

Posted in Serial Port Driver | Leave a comment

ipc using message queue and semaphores

rcs: warning: No options were given; this usage is obsolescent.
rcs: RCS/server.c,v: No such file or directory
[root@(none) ipc_project]# rcs -i server.c
RCS file: server.c,v
enter description, terminated with single ‘.’ or end of file:
NOTE: This is NOT the log message!
>> included all the header files that will be used in the code
>> defined struct data and struct sembuf
>> .
done
[root@(none) ipc_project]# ci ./server.c
./server.c,v ./server.c
revision 1.1 (locked)
done
[root@(none) ipc_project]# ci ./server.c
./server.c,v > got the kernel key using msgget()
>> checked the accessibility of the file
>> using access(0
>> .
done
[root@(none) ipc_project]# co -l ./server.c
./server.c,v –> ./server.c
revision 1.2 (locked)
done
[root@(none) ipc_project]# ci ./server.c
./server.c,v > created a fifo between client,server and server,process
>> opened the file in write only mode in the requesting client
>> .
done
[root@(none) ipc_project]# co -l ./server.c
./server.c,v –> ./server.c
revision 1.3 (locked)
done
[root@(none) ipc_project]# ci ./server.c
./server.c,v ./server.c
revision 1.3 (locked)
done
co: RCS/co,v: No such file or directory
co: -l option is ignored after filenames
co: -r1.3 option is ignored after filenames
./server.c,v –> ./server.c
revision 1.3 (locked)
writable ./server.c exists; remove it? [ny](n): y
done
[root@(none) ipc_project]# ci ./server.c
./server.c,v ./server.c
revision 1.3 (locked)
done
[root@(none) ipc_project]# ci ./server.c
./server.c,v > now,using semop(),decremented the u.value,making the other processes wait while request client is writing
>> in the server side,reading the data and again incrementing the u.value
>> .
done
[root@(none) ipc_project]# co -l ./server.c
./server.c,v –> ./server.c
revision 1.4 (locked)
done
[root@(none) ipc_project]# ci ./server.c
./server.c,v > closed the fifo
>> gave the gave the m.type
>> .
done
[root@(none) ipc_project]# co -l ./server.c
./server.c,v –> ./server.c
revision 1.5 (locked)
done
[root@(none) ipc_project]# ci ./server.c
./server.c,v > opened the fifo in write onlu mode
>> decremented the u.value
>> wrote data from server to process
>> .
done
[root@(none) ipc_project]# co -l ./server.c
./server.c,v –> ./server.c
revision 1.6 (locked)
done
[root@(none) ipc_project]# ci ./server.c
./server.c,v > read the data in the process side
>> incremented the u.value
>> processed the data
>> .
done
[root@(none) ipc_project]# co -l ./server.c
./server.c,v –> ./server.c
revision 1.7 (locked)
done
[root@(none) ipc_project]# ci ./server.c
./server.c,v > closed the fifo
>> decremented the u.val
>> wrote data to server
>> .
done
[root@(none) ipc_project]# co -l ./server.c
./server.c,v –> ./server.c
revision 1.8 (locked)
done
[root@(none) ipc_project]# ci ./server.c
./server.c,v > read the data in server
>> incremented the u.val
>> closed the fifo
>> .
done
[root@(none) ipc_project]# co -l ./server.c
./server.c,v –> ./server.c
revision 1.9 (locked)
done
[root@(none) ipc_project]# ci ./server.c
./server.c,v > stored the result in r.result
>> opened the client server fifo
>> send the data using msgsnd()
>> .
done
[root@(none) ipc_project]# co -l ./server.c
./server.c,v –> ./server.c
revision 1.10 (locked)
done
[root@(none) ipc_project]# ci ./server.c
./server.c,v > receieved the data in client side using msgrcv()
>> displayed the data
>> closed the fifo
>> .
done
[root@(none) ipc_project]# co -l ./server.c
./server.c,v –> ./server.c
revision 1.11 (locked)
done
[root@(none) ipc_project]# rlog ./server.c

RCS file: ./server.c,v
Working file: ./server.c
head: 1.11
branch:
locks: strict
root: 1.11
access list:
symbolic names:
keyword substitution: kv
total revisions: 11; selected revisions: 11
description:
included all the header files that will be used in the code
defined struct data and struct sembuf
—————————-
revision 1.11 locked by: root;
date: 2014/11/14 09:06:43; author: root; state: Exp; lines: +1 -1
receieved the data in client side using msgrcv()
displayed the data
closed the fifo
—————————-
revision 1.10
date: 2014/11/14 09:05:04; author: root; state: Exp; lines: +1 -1
stored the result in r.result
opened the client server fifo
send the data using msgsnd()
—————————-
revision 1.9
date: 2014/11/14 09:03:39; author: root; state: Exp; lines: +1 -1
read the data in server
incremented the u.val
closed the fifo
—————————-
revision 1.8
date: 2014/11/14 09:02:39; author: root; state: Exp; lines: +1 -1
closed the fifo
decremented the u.val
wrote data to server
—————————-
revision 1.7
date: 2014/11/14 09:00:14; author: root; state: Exp; lines: +1 -1
read the data in the process side
incremented the u.value
processed the data
—————————-
revision 1.6
date: 2014/11/14 08:54:46; author: root; state: Exp; lines: +1 -1
opened the fifo in write onlu mode
decremented the u.value
wrote data from server to process
—————————-
revision 1.5
date: 2014/11/14 08:50:12; author: root; state: Exp; lines: +1 -1
closed the fifo
gave the gave the m.type
—————————-
revision 1.4
date: 2014/11/14 08:45:36; author: root; state: Exp; lines: +1 -1
now,using semop(),decremented the u.value,making the other processes wait while request client is writing
in the server side,reading the data and again incrementing the u.value
—————————-
revision 1.3
date: 2014/11/14 08:40:12; author: root; state: Exp; lines: +1 -1
created a fifo between client,server and server,process
opened the file in write only mode in the requesting client
—————————-
revision 1.2
date: 2014/11/14 08:32:00; author: root; state: Exp; lines: +1 -1
got the kernel key using msgget()
checked the accessibility of the file
using access(0
—————————-
revision 1.1
date: 2014/11/14 08:29:23; author: root; state: Exp;
Initial revision

Posted in Uncategorized | Leave a comment

Character Device Driver : RCS [init, open, write, read, seek ,clean]

RCS FOR INITILIZATION

RCS file: ./initialization.c,v
Working file: ./initialization.c
head: 1.8
branch:
locks: strict
root: 1.8
access list:
symbolic names:
keyword substitution: kv
total revisions: 8;    selected revisions: 8
description:
initialization function registering char driver.
—————————-
revision 1.8    locked by: root;
date: 2014/09/17 17:36:43;  author: root;  state: Exp;  lines: +1 -0
initialize the semapahore .
—————————-
revision 1.7
date: 2014/09/17 16:16:42;  author: root;  state: Exp;  lines: +10 -1
declared quantum_size,qset-size and device_size of sculldev.
—————————-
revision 1.6
date: 2014/09/04 08:12:28;  author: root;  state: Exp;  lines: +3 -3
replaced the priority in printk.
—————————-
revision 1.5
date: 2014/09/04 07:58:12;  author: root;  state: Exp;  lines: +6 -3
fixed some errors.
—————————-
revision 1.4
date: 2014/09/03 15:52:43;  author: root;  state: Exp;  lines: +21 -4
initialized the device with cdev_init.
added device using cdev_add.
only one device is mapped by scull.
—————————-
revision 1.3
date: 2014/09/03 05:23:55;  author: root;  state: Exp;  lines: +1 -0
gave moduleparam for nod.
—————————-
revision 1.2
date: 2014/09/03 05:14:50;  author: root;  state: Exp;  lines: +1 -0
gave decalartrions.h header
—————————-
revision 1.1
date: 2014/09/03 05:14:06;  author: root;  state: Exp;
Initial revision
=============================================================================
RCS FOR DEV_OPEN

RCS file: ./dev_open.c,v
Working file: ./dev_open.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;    selected revisions: 2
description:
device open open call routine written.
—————————-
revision 1.2    locked by: root;
date: 2014/09/04 08:03:16;  author: root;  state: Exp;  lines: +1 -1
fixed some errors .
—————————-
revision 1.1
date: 2014/09/03 16:13:34;  author: root;  state: Exp;
Initial revision
=============================================================================
RCS FOR DEV_WRITE

RCS file: ./dev_write.c,v
Working file: ./dev_write.c
head: 1.14
branch:
locks: strict
root: 1.14
access list:
symbolic names:
keyword substitution: kv
total revisions: 14;    selected revisions: 14
description:
device wurite operation .
memory allocated to sculldev->scullqset.
noqsets depend on the sizeof block.
64 bytes block created.
—————————-
revision 1.14    locked by: root;
date: 2014/09/22 15:39:51;  author: root;  state: Exp;  lines: +9 -5
test for the dev trim condition .
—————————-
revision 1.13
date: 2014/09/22 12:09:54;  author: root;  state: Exp;  lines: +50 -38
included down semaphore.
—————————-
revision 1.12
date: 2014/09/18 18:25:12;  author: root;  state: Exp;  lines: +38 -35
modified code for dev_trim call.
—————————-
revision 1.11
date: 2014/09/17 17:37:47;  author: root;  state: Exp;  lines: +2 -1
applied semaphore as down interruptoble and up
—————————-
revision 1.10
date: 2014/09/17 16:17:59;  author: root;  state: Exp;  lines: +46 -47
removed the initialiaztion of variables qset_size,device_size and quantum_size
—————————-
revision 1.9
date: 2014/09/10 18:57:45;  author: root;  state: Exp;  lines: +1 -1
gave return corrected value
—————————-
revision 1.8
date: 2014/09/10 16:22:44;  author: root;  state: Exp;  lines: +2 -1
gave device_size.
—————————-
revision 1.7
date: 2014/09/10 11:24:56;  author: root;  state: Exp;  lines: +1 -1
declared device_size variable.
—————————-
revision 1.6
date: 2014/09/09 18:28:14;  author: root;  state: Exp;  lines: +4 -3
returned value of filep->f_pos .
—————————-
revision 1.5
date: 2014/09/09 18:21:50;  author: root;  state: Exp;  lines: +32 -15
copy from user with no of bytes less than quantum to increase accuracy of device.
—————————-
revision 1.4
date: 2014/09/09 17:42:03;  author: root;  state: Exp;  lines: +135 -6
changed quantum bytes allocation for last quantum .
—————————-
revision 1.3
date: 2014/09/04 08:03:48;  author: root;  state: Exp;  lines: +9 -7
fixed errors alot.
—————————-
revision 1.2
date: 2014/09/03 17:43:04;  author: root;  state: Exp;  lines: +1 -1
commented line to find user buff length.
—————————-
revision 1.1
date: 2014/09/03 17:34:23;  author: root;  state: Exp;
Initial revision
=============================================================================
RCS FOR DEV_SEEK

RCS file: ./dev_seek.c,v
Working file: ./dev_seek.c
head: 1.6
branch:
locks: strict
root: 1.6
access list:
symbolic names:
keyword substitution: kv
total revisions: 6;    selected revisions: 6
description:
lseek routine.
—————————-
revision 1.6    locked by: root;
date: 2014/09/22 12:10:25;  author: root;  state: Exp;  lines: +12 -5
modified according to new device_size.
—————————-
revision 1.5
date: 2014/09/17 16:18:44;  author: root;  state: Exp;  lines: +38 -20
implemneted seek end properly with right notations
now the offset in the app will be positive for seek_end case.
—————————-
revision 1.4
date: 2014/09/12 16:04:23;  author: root;  state: Exp;  lines: +8 -2
modified cases for SEEK_CUR.
modified case for SEEK_END.
—————————-
revision 1.3
date: 2014/09/12 15:21:31;  author: root;  state: Exp;  lines: +9 -1
include case for seek end/.
—————————-
revision 1.2
date: 2014/09/12 08:48:53;  author: root;  state: Exp;  lines: +4 -1
gave  case for seek current.
—————————-
revision 1.1
date: 2014/09/10 11:26:10;  author: root;  state: Exp;
Initial revision
=============================================================================
RCS FOR DEV_READ

RCS file: ./dev_read.c,v
Working file: ./dev_read.c
head: 1.13
branch:
locks: strict
root: 1.13
access list:
symbolic names:
keyword substitution: kv
total revisions: 13;    selected revisions: 13
description:
dev_read operartion.
—————————-
revision 1.13    locked by: root;
date: 2014/09/22 12:10:13;  author: root;  state: Exp;  lines: +19 -4
included down and up semaphore .
—————————-
revision 1.12
date: 2014/09/18 18:25:26;  author: root;  state: Exp;  lines: +5 -3
detected and corrected a loophole.
—————————-
revision 1.11
date: 2014/09/17 17:38:12;  author: root;  state: Exp;  lines: +2 -0
applied semaphore as down interruptible and up/
—————————-
revision 1.10
date: 2014/09/17 16:18:32;  author: root;  state: Exp;  lines: +34 -21
*** empty log message ***
—————————-
revision 1.9
date: 2014/09/12 15:48:16;  author: root;  state: Exp;  lines: +2 -3
removed increment arrqset from one condition.
redundant code removed.
—————————-
revision 1.8
date: 2014/09/12 15:24:18;  author: root;  state: Exp;  lines: +0 -1
*** empty log message ***
—————————-
revision 1.7
date: 2014/09/12 15:20:23;  author: root;  state: Exp;  lines: +27 -11
include case for noctr < quatnum_size.
BUT greater than temp..
—————————-
revision 1.6
date: 2014/09/12 10:21:00;  author: root;  state: Exp;  lines: +4 -4
changed the file_>f_pos values for different clauses.
—————————-
revision 1.5
date: 2014/09/12 10:15:43;  author: root;  state: Exp;  lines: +30 -26
modified the code for complete seek_set process.
—————————-
revision 1.4
date: 2014/09/12 08:47:33;  author: root;  state: Exp;  lines: +78 -67
modified code for reading pupose.
modified if the offset is zero.
if start == offset case completely correct.
—————————-
revision 1.3
date: 2014/09/11 16:04:24;  author: root;  state: Exp;  lines: +6 -3
passed the file pointer to function copy to user to update the f_pos value.
—————————-
revision 1.2
date: 2014/09/10 18:58:21;  author: root;  state: Exp;  lines: +48 -34
completed function copy to user
copy to user can now read from a given offset and can read any no of charcacters from the any position even no of charcters to be read can be 1 byte

—————————-
revision 1.1
date: 2014/09/10 16:24:31;  author: root;  state: Exp;
Initial revision
=============================================================================
RCS FOR CLEANUP

RCS file: ./cleanup.c,v
Working file: ./cleanup.c
head: 1.4
branch:
locks: strict
root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;    selected revisions: 4
description:
unregistering the character driver.
—————————-
revision 1.4    locked by: root;
date: 2014/09/04 07:59:01;  author: root;  state: Exp;  lines: +2 -6
removed return from unregistering character device
—————————-
revision 1.3
date: 2014/09/03 18:08:55;  author: root;  state: Exp;  lines: +2 -1
gave prototypes for different functions.
—————————-
revision 1.2
date: 2014/09/03 15:56:52;  author: root;  state: Exp;  lines: +2 -1
deleted device using cdev_del.
—————————-
revision 1.1
date: 2014/09/03 05:24:18;  author: root;  state: Exp;
Initial revision
=============================================================================

Posted in Character Driver | Leave a comment

IEEE std. 1284-1994 std. Signaling method for 74LS244 – NIBBLE MODE

RCS file: header.h,v
Working file: header.h
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 1
description:
This is header file, which contains all the header file used in driver
—————————-
revision 1.2 locked by: root;
date: 2014/11/12 12:26:12; author: root; state: Exp; lines: +1 -0
Add linux/ioport.h
add asm/io.h
add linux/delay.h
=============================================================================

RCS file: declaration.h,v
Working file: declaration.h
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
This file contains all the functions declaration
—————————-
revision 1.1 locked by: root;
date: 2014/11/12 12:08:53; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: file_operation.h,v
Working file: file_operation.h
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
This file contains operation mapping.
—————————-
revision 1.1 locked by: root;
date: 2014/11/12 12:08:53; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: driver.c,v
Working file: driver.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 1
description:
This file contains allocation of region in memory
Add device with major and minor
—————————-
revision 1.2 locked by: root;
date: 2014/11/12 12:11:23; author: root; state: Exp; lines: +1 -0
Check for parallel port region
if occupied, release region
then, request for region
=============================================================================

RCS file: devopen.c,v
Working file: devopen.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
use container of
—————————-
revision 1.1 locked by: root;
date: 2014/11/12 12:08:53; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: devwrite.c,v
Working file: devwrite.c
head: 1.3
branch:
locks: strict
root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
This file allocates memory for quantum & qset in scull
data sent from write application is stored in quantum
—————————-
revision 1.3 locked by: root;
date: 2014/11/12 12:43:56; author: root; state: Exp; lines: +1 -1
For second nibble shift the character by 4
same steps are followed for second nibble
—————————-
revision 1.2
date: 2014/11/12 12:38:50; author: root; state: Exp; lines: +1 -1
set 0×00 at control register
& character from quantum with 0x0f, for first nibble
sent first nibble
checking status of reader, if free or not
if received strobe from reader, that the reader is free now
sent the strobe that data is valid
—————————-
revision 1.1
date: 2014/11/12 12:38:06; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: devread.c,v
Working file: devread.c
head: 1.3
branch:
locks: strict
root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
This file read the character from port, and copy to the user application
—————————-
revision 1.3 locked by: root;
date: 2014/11/12 13:12:17; author: root; state: Exp; lines: +1 -1
Shift the second nibble received by 3
Shift the received charcter by 4 to make it msb
|(or) with previous stored chracter in first nibble.
—————————-
revision 1.2
date: 2014/11/12 13:02:10; author: root; state: Exp; lines: +1 -1
First make the reader busy, then after 5 sec free the reader
sent the strobe signal that the reader is free
wait for acknowlegement the data going to be received is valid or not
when receives the strobe, from writer that the data is valid
set the control register 32 for bidirectional
receives the first nibble and & with 0×78
shift the receive nibble by 3, & with 0x0f
store the character in other variable
—————————-
revision 1.1
date: 2014/11/12 13:00:27; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: devrelease.c,v
Working file: devrelease.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
This file free the allocated memory for device
—————————-
revision 1.1 locked by: root;
date: 2014/11/12 12:08:53; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: removedriver.c,v
Working file: removedriver.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
unregister allocated region
—————————-
revision 1.2 locked by: root;
date: 2014/11/12 12:12:56; author: root; state: Exp; lines: +1 -0
File contains release region when driver is removed
—————————-
revision 1.1
date: 2014/11/12 12:08:53; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Device Drivers, Parallel Port Driver | Leave a comment

communication using message queue

RCS file: receiever.c,v
enter description, terminated with single ‘.’ or end of file:
NOTE: This is NOT the log message!
>> included all the header files that will be used in the code
>> .
done
[root@(none) msgq]# ci ./receiever.c
./receiever.c,v ./receiever.c
revision 1.1 (locked)
done
[root@(none) msgq]# ci ./receiever.c
./receiever.c,v > defined the message buffer structure
>> got the kernel id using msgget()
>> .
done
[root@(none) msgq]# co -l ./receiever.c
./receiever.c,v –> ./receiever.c
revision 1.2 (locked)
done
[root@(none) msgq]# man msgctl
[root@(none) msgq]# ci ./receiever.c
./receiever.c,v > gave IPC_STAT command and address of buffer to the msgctl()
>> .
done
[root@(none) msgq]# co -l ./receiever.c
./receiever.c,v –> ./receiever.c
revision 1.3 (locked)
done
[root@(none) msgq]# ci ./receiever.c
./receiever.c,v > gave the message type to the message buffer
>> gave the string using gets()
>> .
done
[root@(none) msgq]# co -l ./receiever.c
./receiever.c,v –> ./receiever.c
revision 1.4 (locked)
done
[root@(none) msgq]# ci ./receiever.c
./receiever.c,v > using msgsnd() sending the message from sender to the receiever
>> on the receiever side using msgecv() receieved the message
>> printed the message receieved
>> .
done
[root@(none) msgq]# co -l ./receiever.c
./receiever.c,v –> ./receiever.c
revision 1.5 (locked)
done
[root@(none) msgq]# rlog ./receiever.c

RCS file: ./receiever.c,v
Working file: ./receiever.c
head: 1.5
branch:
locks: strict
root: 1.5
access list:
symbolic names:
keyword substitution: kv
total revisions: 5; selected revisions: 5
description:
included all the header files that will be used in the code
—————————-
revision 1.5 locked by: root;
date: 2014/11/13 07:55:19; author: root; state: Exp; lines: +1 -1
using msgsnd() sending the message from sender to the receiever
on the receiever side using msgecv() receieved the message
printed the message receieved
—————————-
revision 1.4
date: 2014/11/13 07:53:55; author: root; state: Exp; lines: +1 -1
gave the message type to the message buffer
gave the string using gets()
—————————-
revision 1.3
date: 2014/11/13 07:52:43; author: root; state: Exp; lines: +1 -1
gave IPC_STAT command and address of buffer to the msgctl()
—————————-
revision 1.2
date: 2014/11/13 07:49:23; author: root; state: Exp; lines: +1 -1
defined the message buffer structure
got the kernel id using msgget()
—————————-
revision 1.1
date: 2014/11/13 07:48:36; author: root; state: Exp;
Initial revision

Posted in Uncategorized | Comments Off

complete mdc project

RCS file: mdc.c,v
Working file: mdc.c
head: 1.8
branch:
locks: strict
root: 1.8
access list:
symbolic names:
keyword substitution: kv
total revisions: 8; selected revisions: 8
description:
included all the header files
entered the string using gets()
—————————-
revision 1.8 locked by: root;
date: 2014/11/13 07:14:16; author: root; state: Exp; lines: +2 -2
in decompressing first right shifted the first byte by four and matched those four bytes with the index of master array and printed the value at that index
for the last four bytes,printed the value for that index from the master array
doing this for other bytes
printed the final array
—————————-
revision 1.7
date: 2014/11/13 07:02:05; author: root; state: Exp; lines: +1 -1
ORING the first byte with secong one
and doing this for other bytes
—————————-
revision 1.6
date: 2014/11/13 06:59:05; author: root; state: Exp; lines: +1 -1
now for secong index moving the index to the byte and first left shift it by four and then right shift it by four
—————————-
revision 1.5
date: 2014/11/13 06:57:04; author: root; state: Exp; lines: +1 -1
in compression X-ORING the bytes with themselves
moving the index of the first character in the bits
and left shifting them by four
—————————-
revision 1.4
date: 2014/11/13 06:56:09; author: root; state: Exp; lines: +1 -1
using lseek function again moving the cursor to the very first location
—————————-
revision 1.3
date: 2014/11/13 06:53:45; author: root; state: Exp; lines: +1 -1
using for loop matching the every element of the entered array with that of master array
if matched then skip the character
if not matched then include the character in the master array
—————————-
revision 1.2
date: 2014/11/13 06:52:57; author: root; state: Exp; lines: +1 -1
assigned the first character in the master arrayy
—————————-
revision 1.1
date: 2014/11/13 06:52:06; author: root; state: Exp;
Initial revision

Posted in Uncategorized | Leave a comment

IPC based server-client project using message queue

Header file RCS for IPC project using message queue:

RCS file: ./header.h,v
Working file: ./header.h
head: 1.4
branch:
locks: strict
root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4; selected revisions: 4
description:
header file for client server program using message queue
—————————-
revision 1.4 locked by: root;
date: 2014/11/12 12:09:26; author: root; state: Exp; lines: +6 -0
define a struct named result to store the calculated result and send back this result to tha client with a type 2
—————————-
revision 1.3
date: 2014/11/12 11:54:09; author: root; state: Exp; lines: +8 -1
define structure struct message
this structure has a format of message to be sent in message queue
—————————-
revision 1.2
date: 2014/11/12 10:04:38; author: root; state: Exp; lines: +5 -0
define structure msgbuf to specify the message format
—————————-
revision 1.1
date: 2014/11/12 09:38:23; author: root; state: Exp;
Initial revision
=============================================================================

Server file RCS for IPC project using message queue:

RCS file: ./server.c,v
Working file: ./server.c
head: 1.9
branch:
locks: strict
root: 1.9
access list:
symbolic names:
keyword substitution: kv
total revisions: 9; selected revisions: 9
description:
server for client server project using message queue
—————————-
revision 1.9 locked by: root;
date: 2014/11/12 12:17:41; author: root; state: Exp; lines: +24 -21
insert process of receiving message from client, procesing it and sending output back to the client in a while loop so that
more than one client can request.
—————————-
revision 1.8
date: 2014/11/12 12:12:18; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.7
date: 2014/11/12 12:10:15; author: root; state: Exp; lines: +22 -1
define variable re of type struct result tto store calculated result
send this calculated result back to the client with a type 2
—————————-
revision 1.6
date: 2014/11/12 11:55:11; author: root; state: Exp; lines: +4 -2
change the message format from character to struct message i.e., 2 int values and one char
—————————-
revision 1.5
date: 2014/11/12 10:11:36; author: root; state: Exp; lines: +2 -1
*** empty log message ***
—————————-
revision 1.4
date: 2014/11/12 10:05:18; author: root; state: Exp; lines: +10 -0
receive messege from message queue using msgrcv()
—————————-
revision 1.3
date: 2014/11/12 09:52:05; author: root; state: Exp; lines: +9 -1
perform control operation on message queue
—————————-
revision 1.2
date: 2014/11/12 09:43:40; author: root; state: Exp; lines: +15 -0
create messeage queue
—————————-
revision 1.1
date: 2014/11/12 09:38:23; author: root; state: Exp;
Initial revision
=============================================================================

Header file RCS for IPC project using message queue:
RCS file: ./client1.c,v
Working file: ./client1.c
head: 1.7
branch:
locks: strict
root: 1.7
access list:
symbolic names:
keyword substitution: kv
total revisions: 7; selected revisions: 7
description:
client file for client serverr project using messege queue
—————————-
revision 1.7 locked by: root;
date: 2014/11/12 12:11:02; author: root; state: Exp; lines: +4 -0
define variable res to store the received result from the server
the variable res has a type struct result
—————————-
revision 1.6
date: 2014/11/12 11:55:58; author: root; state: Exp; lines: +11 -4
change the message format from character to struct message i.e., 2 int values and 1 char
—————————-
revision 1.5
date: 2014/11/12 10:11:37; author: root; state: Exp; lines: +2 -1
*** empty log message ***
—————————-
revision 1.4
date: 2014/11/12 10:09:35; author: root; state: Exp; lines: +13 -1
send message to message queue using msgsnd()
—————————-
revision 1.3
date: 2014/11/12 09:52:29; author: root; state: Exp; lines: +9 -1
perform control operation on message queue
—————————-
revision 1.2
date: 2014/11/12 09:43:53; author: root; state: Exp; lines: +12 -0
create message queue
—————————-
revision 1.1
date: 2014/11/12 09:38:23; author: root; state: Exp;
Initial revision
=============================================================================

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

compatibility mode communication– IEEE standard 1284-1994, parallel port device driver

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
emblogic: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
included header files
—————————-
revision 1.1    locked by: emblogic;
date: 2014/11/11 05:29:43;  author: emblogic;  state: Exp;
Initial revision
=============================================================================

RCS file: dec.h,v
Working file: dec.h
head: 1.1
branch:
locks: strict
emblogic: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
—————————-
revision 1.1    locked by: emblogic;
date: 2014/11/11 05:30:45;  author: emblogic;  state: Exp;
Initial revision
=============================================================================

RCS file: initialization.c,v
Working file: initialization.c
head: 1.2
branch:
locks: strict
emblogic: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;    selected revisions: 1
description:
implemented the check_region(), release_region() for checking the availability of region
—————————-
revision 1.2    locked by: emblogic;
date: 2014/11/11 05:33:43;  author: emblogic;  state: Exp;  lines: +2 -2
implemented the  request_region()
=============================================================================

RCS file: fileop.h,v
Working file: fileop.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 0
description:
=============================================================================

RCS file: dev_open.c,v
Working file: dev_open.c
head: 1.1
branch:
locks: strict
emblogic: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
—————————-
revision 1.1    locked by: emblogic;
date: 2014/11/11 05:32:50;  author: emblogic;  state: Exp;
Initial revision
=============================================================================

RCS file: dev_write.c,v
Working file: dev_write.c
head: 1.3
branch:
locks: strict
emblogic: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;    selected revisions: 1
description:
—————————-
revision 1.3    locked by: emblogic;
date: 2014/11/11 05:40:03;  author: emblogic;  state: Exp;  lines: +1 -0
followed the protocols : send the strobe.
to allow the reader to read the data,before send the strobe to reader,this verified  the busy status.. ============================================================================

RCS file: cleanup.c,v
Working file: cleanup.c
head: 1.2
branch:
locks: strict
emblogic: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;    selected revisions: 1
description:
—————————-
revision 1.2    locked by: emblogic;
date: 2014/11/11 05:35:23;  author: emblogic;  state: Exp;  lines: +2 -0
implemented release_region foe releasing the region ,
=============================================================================

RCS file: dev_read.c,v
Working file: dev_read.c
head: 1.2
branch:
locks: strict
emblogic: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2;    selected revisions: 1
description:
following the protocols first send the busy to writer.and wait for strobe signal from writer.
—————————-
revision 1.2    locked by: emblogic;
date: 2014/11/11 05:57:34;  author: emblogic;  state: Exp;  lines: +2 -2
after receiving the strobe from the writter received the data sucessfully.
=============================================================================

Posted in Parallel Port Driver | Leave a comment

IEEE standard 1284-1994 –compatibility mode communication(parallel port device driver)

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
emblogic: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
included header files
—————————-
revision 1.1 locked by: emblogic;
date: 2014/11/11 05:29:43; author: emblogic; state: Exp;
Initial revision
=============================================================================

RCS file: dec.h,v
Working file: dec.h
head: 1.1
branch:
locks: strict
emblogic: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
—————————-
revision 1.1 locked by: emblogic;
date: 2014/11/11 05:30:45; author: emblogic; state: Exp;
Initial revision
=============================================================================

RCS file: initialization.c,v
Working file: initialization.c
head: 1.2
branch:
locks: strict
emblogic: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 1
description:
implemented check_region(), release_region()
—————————-
revision 1.2 locked by: emblogic;
date: 2014/11/11 05:33:43; author: emblogic; state: Exp; lines: +2 -2
implemented request_region()
=============================================================================

RCS file: fileop.h,v
Working file: fileop.h
head: 1.1
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 0
description:
=============================================================================

RCS file: dev_open.c,v
Working file: dev_open.c
head: 1.1
branch:
locks: strict
emblogic: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
—————————-
revision 1.1 locked by: emblogic;
date: 2014/11/11 05:32:50; author: emblogic; state: Exp;
Initial revision
=============================================================================

RCS file: dev_write.c,v
Working file: dev_write.c
head: 1.3
branch:
locks: strict
emblogic: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 1
description:
—————————-
revision 1.3 locked by: emblogic;
date: 2014/11/11 05:40:03; author: emblogic; state: Exp; lines: +1 -0
first waited for the busy status then send the strobe.
to allow the reader to read the data.
=============================================================================

RCS file: cleanup.c,v
Working file: cleanup.c
head: 1.2
branch:
locks: strict
emblogic: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 1
description:
—————————-
revision 1.2 locked by: emblogic;
date: 2014/11/11 05:35:23; author: emblogic; state: Exp; lines: +2 -0
implemented release_region,
=============================================================================

RCS file: dev_read.c,v
Working file: dev_read.c
head: 1.2
branch:
locks: strict
emblogic: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 1
description:
following the protocols first send the busy to writer
—————————-
revision 1.2 locked by: emblogic;
date: 2014/11/11 05:57:34; author: emblogic; state: Exp; lines: +2 -2
after receiving the strobe from the writter, accepted the data.
=============================================================================

Posted in Project 9: Embedded Linux on ARM, Uncategorized | Leave a comment

complete ipc project using semaphores

RCS file: server.c,v
Working file: server.c
head: 1.13
branch:
locks: strict
root: 1.13
access list:
symbolic names:
keyword substitution: kv
total revisions: 13; selected revisions: 13
description:
included all the header files that will be used in the code
—————————-
revision 1.13 locked by: root;
date: 2014/11/11 09:16:36; author: root; state: Exp; lines: +1 -1
did the same for all the other cases
—————————-
revision 1.12
date: 2014/11/11 09:14:47; author: root; state: Exp; lines: +1 -1
again set the operation (–) in the sembuff and forward the data to the client
client receieved the data and closed the fifo
displayed the result
—————————-
revision 1.11
date: 2014/11/11 09:13:00; author: root; state: Exp; lines: +1 -1
server now set the operation (++) and reads the data
—————————-
revision 1.10
date: 2014/11/11 09:10:58; author: root; state: Exp; lines: +1 -1
after processing the data opened the file in write only mode
set the operation (–) in sembuff
wrote data to the server
—————————-
revision 1.9
date: 2014/11/11 09:08:27; author: root; state: Exp; lines: +1 -1
wrote data to the respective process
in the process side, read the data
set the operation (++)in the operation so that now the other process may execute waiting in the waiting list
—————————-
revision 1.8
date: 2014/11/11 09:05:48; author: root; state: Exp; lines: +1 -1
now in parent opened the file in srite only mode
setting the operation (–) using semop call to make the other processes wait until the current process execution is done
—————————-
revision 1.7
date: 2014/11/11 09:04:33; author: root; state: Exp; lines: +1 -1
created the parent and child processes uding fork
—————————-
revision 1.6
date: 2014/11/11 09:01:22; author: root; state: Exp; lines: +1 -1
now using the semop call setting the sembuff operation (++) to release the wait
closed the filr descriptor
—————————-
revision 1.5
date: 2014/11/11 09:00:13; author: root; state: Exp; lines: +1 -1
now the client writes the data and the server reads it
—————————-
revision 1.4
date: 2014/11/11 08:57:13; author: root; state: Exp; lines: +1 -1
in the client side,after opening the file,using the sem buff structure,set the operation (–)
—————————-
revision 1.3
date: 2014/11/11 08:55:39; author: root; state: Exp; lines: +1 -1
created the fifo between the client server and the server process
—————————-
revision 1.2
date: 2014/11/11 08:52:49; author: root; state: Exp; lines: +1 -1
initialised the union value as 1
got the unique kernel key using the semget call
—————————-
revision 1.1
date: 2014/11/11 08:51:02; author: root; state: Exp;
Initial revision

Posted in Uncategorized | Leave a comment

CREATING STATIC LIBRARY

Static libraries are collection of ordinary object files. For a static library, the actual code is extracted from the library by the linker and used to build the final executable at the point you compile/build your application.
Steps:
1.Creates .c file, that contains functions in your library and application.
2.Create object file.eg
gcc -c add.c -o add.o
//-c means to create an intermediary object file, rather than an executable.
3.Create static library.This step is to bundle multiple object files in one static library.
ar rcs libststlib.a add.o sub.o
//r means to insert with replacement, c means to create a new archive,
and s means to write an index.
NOTE: A static library must start with ‘lib’ and have the suffix ‘.a’.
4.Making Executable and linking with library.
gcc -o operation operation.o -L. -lststlib
Note: -L. is used to tell that the static library is in current folder or you can provide the path too.
-l searches for the library named library at the time of linking. Linker searches and processes libraries and object files in the order they are specified.
5. Run the program.

Note:
1.You can see the list of object files in your library using
ar -t libststlib.a
2.ar is archive is single file holding a collection of other files.
Screenshot from 2014-11-11 04_20_32

Posted in Linux Internals and System Programming, Uncategorized | Leave a comment

IEEE 1284 device driver for 74LS244 parallel port- Compatibility mode

Implementing read and write operations for Compatibility mode.In compatibility mode , the data is sent character by character on a hardware which consists of 8 led. It is tested by sending data on LEDs connected on a hardware.

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
add linux/ioport.h
add asm/io.h
—————————-
revision 1.1 locked by: root;
date: 2014/11/06 12:47:01; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: declaration.h,v
Working file: declaration.h
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
This is DECLATAION file
all the function prototypes,declared in this file
—————————-
revision 1.1 locked by: root;
date: 2014/11/06 12:47:01; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: file_operation.h,v
Working file: file_operation.h
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
this file contains the mapping of devwrite file to write called from application
—————————-
revision 1.1 locked by: root;
date: 2014/11/06 12:47:01; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: devopen.c,v
Working file: devopen.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
—————————-
revision 1.1 locked by: root;
date: 2014/11/06 12:47:01; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: driver.c,v
Working file: driver.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
this file contains the initialization of module
—————————-
revision 1.2 locked by: root;
date: 2014/11/06 12:50:22; author: root; state: Exp; lines: +1 -0
check if region is free i.e. at address 0×378
if not free, request for region
—————————-
revision 1.1
date: 2014/11/06 12:47:01; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: devwrite.c,v
Working file: devwrite.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
allocate region for scull in memory, and store data write from application in quantum of scull
—————————-
revision 1.2 locked by: root;
date: 2014/11/06 12:55:39; author: root; state: Exp; lines: +2 -2
Initially reset data lines by outb(0×00)
character sent in loop at interval of 5 sec
character are write in quantum from application, and in each loop one character is outb
—————————-
revision 1.1
date: 2014/11/06 12:47:01; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: removedriver.c,v
Working file: removedriver.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
this file contains exit module when driver is removed
—————————-
revision 1.2 locked by: root;
date: 2014/11/06 12:52:36; author: root; state: Exp; lines: +1 -0
region is released when driver is removed
—————————-
revision 1.1
date: 2014/11/06 12:47:01; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

Compatibility Mode Communication using IEEE Standard 1284-1994(Standard Signalling Method)

RCS file: header.h,v
Working file: header.h
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
—————————-
revision 1.1 locked by: root;
date: 2014/11/10 04:15:07; author: root; state: Exp;
Initial revision

RCS file: declaration.h,v
Working file: declaration.h
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
—————————-
revision 1.1 locked by: root;
date: 2014/11/10 04:16:20; author: root; state: Exp;
Initial revision

RCS file: initilization.c,v
Working file: initilization.c
head: 1.2
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
—————————-
revision 1.2
date: 2014/11/10 04:19:20; author: root; state: Exp; lines: +2 -1
Implemented check_region(), request_region() and release_region()
—————————-
revision 1.1
date: 2014/11/10 04:16:41; author: root; state: Exp;
Initial revision

RCS file: cleanup.c,v
Working file: cleanup.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
—————————-
revision 1.1 locked by: root;
date: 2014/11/10 04:16:59; author: root; state: Exp;
Initial revision

RCS file: dev_open.c,v
Working file: dev_open.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
—————————-
revision 1.1 locked by: root;
date: 2014/11/10 04:17:21; author: root; state: Exp;
Initial revision

RCS file: dev_release.c,v
Working file: dev_release.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
Implemented release_region().
—————————-
revision 1.1 locked by: root;
date: 2014/11/10 04:20:45; author: root; state: Exp;
Initial revision

RCS file: dev_write.c,v
Working file: dev_write.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
Ckeck busy signal by sending the strobe. After that sent data on data lines.
—————————-
revision 1.1 locked by: root;
date: 2014/11/10 04:21:02; author: root; state: Exp;
Initial revision

RCS file: dev_read.c,v
Working file: dev_read.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
Read data from data lines.
—————————-
revision 1.1 locked by: root;
date: 2014/11/10 04:21:19; author: root; state: Exp;
Initial revision

RCS file: file_op.h,v
Working file: file_op.h
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
—————————-
revision 1.1 locked by: root;
date: 2014/11/10 04:21:33; author: root; state: Exp;
Initial revision

Write synopsis:
outb(ch,0×378);
while(busy_status !=0×80)
busy_status = inb(0×379);

Read synopsis:
while(strobe != 0×00)
strobe = inb(0×379);
data = inb(0×378);

Posted in Device Drivers, Parallel Port Driver | Leave a comment