[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: GPIO works but how do we configure other pins like the ones o n ser3 for GP-use?



There is one device driver that may be of interest. I added a small educational driver called "pardata" that can be used for writing to the databits of parallel port 0. This should really be done in the gpio-driver instead, I think, but you can take a look at it as a simple example of how to write to parallel port 0 in manual mode, before you add code to the gpio driver. It is in elinux/drivers/char/pardata.c in devboard software release 1.0.2. Activate it in the Character devices menu in the kernel configuration (you have to disble the parallel ports first in the same menu).

brgds
/Jonas

-----Original Message-----
From: Mikael Starvik
To: 'Johan Magnusson (QIC)'
Cc: dev-etrax
Sent: 2000-12-15 10:02
Subject: RE: GPIO works but how do we configure other pins like the ones o n ser3 for GP-use?

Hi again!

There are two types of GPIOs. The PA and PB is always available
as GPIO pins. A lot of other pins like the pins on the parallell
ports and serial ports are available as GPIO when the interface is
not used. Currently there is no device driver to write to these
pins but it would be quite easy to implement.

All these pins are available through a register called R_PORT_G_DATA.
The following pins are assigned for serial port 3

Etrax pin name  Serial port assignment   Port G bit   Direction
s1bsy_          cts                      31           in 
s1sel_          rxd                      30           in
s1en_           rts                      31           out
s1sel           txd                      30           out 
 
This means that if you read from pin 30 and 31 in R_PORT_G_DATA
you will get cts and rxd and if you write you will write to
rts and txd. 

Regards,
/Mikael

-----Original Message-----
From: owner-dev-etrax@xxxxxxx.com]On">mailto:owner-dev-etrax@xxxxxxx.com]On
Behalf Of Johan Magnusson (QIC)
Sent: Thursday, December 14, 2000 4:55 PM
To: dev-etrax
Subject: GPIO works but how do we configure other pins like the ones on
ser3 for GP-use?


Thank you for your help with the GP-I/Os, now it works!

If we want to configure other pins, like for example ser3, we can not
use
/dev/gpioa or can we? How do we do to configure the ser3 ports as
GP-ports?
Do we have to disable
serial port 3 in "kernel config"?? Hiilfeeeeee!!

/Johan K Magnusson & Alexander Gordon