Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: I need help using GPIO
PostPosted: Thu Jul 19, 2007 2:13 pm 
Offline

Joined: Mon Apr 09, 2007 7:46 pm
Posts: 27
Hi,

I wonder if there is a way of using the GPIO from userland, I mean, without writing a driver.
Can anyone help me with this?

In case you need to know the board i'm using: it's a AT91SAM9261 and the kernel i'm running is ver 2.6.21.

Regards,
Diego A. Fons.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 19, 2007 9:17 pm 
Offline

Joined: Thu Apr 19, 2007 10:15 pm
Posts: 204
Location: USA
Hi there

I prefer using a driver, since that layers/modularizes the code.

Anyway I did come across this site the other day:
http://www.simtec.co.uk/appnotes/AN0014/
that describes what you are asking.
If you're fuzzy on physical/virtual memory concepts, then this is required reading.

There's also a few threads on this forum on this topic you could search for.

Regards


Last edited by blue_z on Thu Jul 19, 2007 9:21 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 19, 2007 9:17 pm 
Offline

Joined: Wed Oct 12, 2005 6:17 pm
Posts: 51
Location: Montreal
this is not directly for ARM, but it can aplied.

http://www.avrfreaks.net/wiki/index.php ... 82.6.18%29

Jonathan

_________________
micro controller developer
Pcb Designer
www.cimeq.qc.ca


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 19, 2007 10:56 pm 
Offline

Joined: Wed Mar 21, 2007 4:40 pm
Posts: 38
Location: Omaha, Nebraska, USA
If you just want to toggle some gpio or poll the status of a pin, using mmap will get you there. However, if you want to do anything robust, interrupt-driven, etc, you should learn how to write a driver. I did not know how to write drivers two months ago and had to learn on the fly. GPIO is a great intro to doing that. Since the GPIO driver, I have written drivers for the ADC, SSC, TWI (buggy though), and an ALSA-compliant PCM driver. There are people who can help if you do your part and learn the stuff.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 31 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: