Accessing the UART for serial communication in linux
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Accessing the UART for serial communication in linux




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Accessing the UART for serial communication in linux  
Shri


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-20-04 07:34 AM

hi all,

I have to write a UART driver for serial communication in linux
for my acadamic project, can anybody tell me how can i access the uart
registers.

--shri





[ Post a follow-up to this message ]



    Re: Accessing the UART for serial communication in linux  
Jem Berkes


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-20-04 07:34 AM

>     I have to write a UART driver for serial communication in linux
> for my acadamic project, can anybody tell me how can i access the uart
> registers.

I've done limited assembly programming under Linux (only with parallel
port) but my understanding is that if your code is running as root, all you
have to do is use ioperm() to give yourself permission to the required x86
ports. Then use I/O opcodes inb and outb to do the actual I/O.

There's all kinds of info out there for programming the UART; classic
stuff, just look up some old DOS manuals ;)

But Linux also gives you more elegant ways to deal with the serial ports.
Hard to tell what you're really looking for, given your question is so
broad.

--
Jem Berkes
http://www.sysdesign.ca/





[ Post a follow-up to this message ]



    Re: Accessing the UART for serial communication in linux  
Floyd L. Davidson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-20-04 11:34 AM

shri_gajare@yahoo.com (Shri) wrote:
>hi all,
>
>    I have to write a UART driver for serial communication in linux
>for my acadamic project, can anybody tell me how can i access the uart
>registers.
>
>--shri

What do you mean by "UART driver"?  A kernel device driver?  Or
a user level program that diddles with the UART?

--
Floyd L. Davidson           <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)                         floyd@barrow.com





[ Post a follow-up to this message ]



    Re: Accessing the UART for serial communication in linux  
Shri


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-21-04 09:34 AM

> What do you mean by "UART driver"?  A kernel device driver?  Or
> a user level program that diddles with the UART?

yep its the KERNEL DEVICE DRIVER

--shri





[ Post a follow-up to this message ]



    Re: Accessing the UART for serial communication in linux  
Floyd L. Davidson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-21-04 11:34 AM

shri_gajare@yahoo.com (Shri) wrote: 
>
>yep its the KERNEL DEVICE DRIVER
>
>--shri

You'll need to get the data sheet for the particular UART.  Then the
best bet is to look over the existing device drivers supplied with
the Linux kernel, and go from there.

Another good source of information will be the O'reilly book,
"Linux Device Drivers", 2nd Edition.  It is available online
too, at

http://www.xml.com/ldd/chapter/book/

--
Floyd L. Davidson           <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)                         floyd@barrow.com





[ Post a follow-up to this message ]



    Re: Accessing the UART for serial communication in linux  
Shri


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-22-04 12:36 PM

> You'll need to get the data sheet for the particular UART.  Then the
> best bet is to look over the existing device drivers supplied with
> the Linux kernel, and go from there.
>
> Another good source of information will be the O'reilly book,
> "Linux Device Drivers", 2nd Edition.  It is available online
> too, at
>
>   http://www.xml.com/ldd/chapter/book/


Thanks Floyd 

Actually i am reading that book, and have a small prob, hope u will
help me this time also. I am not able to recompile my kernel without
the module support disabled and thats why i am not able to load my
module.

waiting for ur earliest reply

--shri





[ Post a follow-up to this message ]



    Re: Accessing the UART for serial communication in linux  
Floyd L. Davidson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-22-04 01:38 PM

shri_gajare@yahoo.com (Shri) wrote: 
>
>Thanks Floyd 
>
>  Actually i am reading that book, and have a small prob, hope u will
>help me this time also. I am not able to recompile my kernel without
>the module support disabled and thats why i am not able to load my
>module.
>
>waiting for ur earliest reply

Wellll...  I'm probably not the right person to help with that,
unless you just happen to run a Slackware 8.0 distribution and
use a 2.6 kernel. :-)

Likewise this is probably not the best newsgroup either.  Pick
one devoted to the particular distribution you use, or perhaps
comp.os.linux.development.system.  There are distribution
specific alt.os.linux.* groups for redhat, suse, slackware,
mandrake and probably others.

--
Floyd L. Davidson           <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)                         floyd@barrow.com





[ Post a follow-up to this message ]



    Re: Accessing the UART for serial communication in linux  
Shri


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-23-04 01:34 PM

> Wellll...  I'm probably not the right person to help with that,
> unless you just happen to run a Slackware 8.0 distribution and
> use a 2.6 kernel. :-)
>
> Likewise this is probably not the best newsgroup either.  Pick
> one devoted to the particular distribution you use, or perhaps
> comp.os.linux.development.system.  There are distribution
> specific alt.os.linux.* groups for redhat, suse, slackware,
> mandrake and probably others.

thanks again floyd for all ur help 

--shri





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 06:19 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register