LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-28-2006, 12:50 AM   #1
vkmgeek
Member
 
Registered: Feb 2006
Location: Ahmedabad
Distribution: rhel5
Posts: 185
Blog Entries: 2

Rep: Reputation: 31
relate OS and processor


Hi,
Can anyone relate hardware and OS? How do they work?
Suppose I have one board containing any micro controller. I have external switches which gives external interrupt to that. I have any embedded OS on that board. I have a program in C to handle interrupt..

Now when I press a switch.....what are the consequence things that will happen if C code is to handle the interrupt. I mean I want to know how board will handle that inerrupt or What an OS will doand what that C code will do?
 
Old 03-01-2006, 12:19 PM   #2
Jaqui
Member
 
Registered: Jan 2006
Location: Vancouver BC
Distribution: LFS, SLak, Gentoo, Debian
Posts: 291

Rep: Reputation: 36
Quote:
Originally Posted by vkmgeek
Hi,
Can anyone relate hardware and OS? How do they work?
Suppose I have one board containing any micro controller. I have external switches which gives external interrupt to that. I have any embedded OS on that board. I have a program in C to handle interrupt..

Now when I press a switch.....what are the consequence things that will happen if C code is to handle the interrupt. I mean I want to know how board will handle that inerrupt or What an OS will doand what that C code will do?
To rephrase, just to make sure I understand exactly what you are asking.

You want to know how a c programm will react to a key press in an embedded device, like a cell phone?

The exact answer will depend on the os embedded on the cell phone, this controls the application and has a huge impact.

but basically, the "switches" are stdin, so getch will take the switch action, and put it into a variable for you to have the program do whatever is needed.
[ in the cell phone example, echo the key press to stdout to display the number, if it's a number.
if it's the call button, then it would hand the array of numbers in ram to the dialer function. ]
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Relate snort logs with Internal IPs logicalfuzz Linux - Software 0 01-17-2006 03:10 AM
Two questions relate to user management ICO SUSE / openSUSE 2 09-16-2005 08:21 AM
another iptables relate topic wrongman Linux - Security 2 06-16-2004 03:56 AM
How does GPG relate to PGP? davee Linux - Security 1 02-20-2004 07:52 AM
xinetd 100% utilization on one processor on a two processor system red hat 9 garnold Linux - General 0 02-02-2004 01:47 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration