diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-22 20:52:35 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-22 20:52:35 +0000 |
| commit | 46439007cf417cbd9ac8049bb4122c890097a0fa (patch) | |
| tree | 6fdb25e5f3a2b6d5657eb23b35774b631d4d97e4 /man/3/gpio | |
| parent | 37da2899f40661e3e9631e497da8dc59b971cbd0 (diff) | |
20060303-partial
Diffstat (limited to 'man/3/gpio')
| -rw-r--r-- | man/3/gpio | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/man/3/gpio b/man/3/gpio new file mode 100644 index 00000000..73b26a48 --- /dev/null +++ b/man/3/gpio @@ -0,0 +1,94 @@ +.TH GPIO 3 SA1100 +.SH NAME +gpio \- access to GPIO registers +.SH SYNOPSIS +.B bind -a +.B #G +.B /dev +.PP +.nf +.B /dev/gpioclear +.B /dev/gpioctl +.B /dev/gpioedge +.B /dev/gpioset +.B /dev/gpiostatus +.fi +.SH DESCRIPTION +.PP +The GPIO interface +serves a one-level directory with five files +that give access to the GPIO registers in the SA1100. +See the SA1100 handbook for details of the function +of the various registers. +.PP +The control file +.B gpioctl +accepts commands to set individual bits in the edge detect +registers. +Each control message has three space-separated fields: +.IP +.EX +.I "reg pin value" +.EE +.LP +where +.I reg +is a single character +denoting a register, +.I pin +a bit within it, and +.I val +the value (0 or 1) for that bit. +Valid choices for +.I reg +are: +.B d +(GPDR), +.B r +(GRER), +.B f +(GFER), +and +.B a +(GAFR). +For example, the control message +.IP +.EX +d 10 1 +.EE +.LP +sets bit 10 (following the handbook's bit-numbering conventions) in the GPIO pin +direction register GPDR. +.PP +The read-only file +.B gpiostatus +shows the names and values (in hexadecimal) of all GPIO registers. +.PP +The remaining data files +allow bits to be read by +.B Sys->read +requests +and set by +.B Sys->write +requests. +When read, each file returns the value of a given +register as a single 8 digit hexadecimal number: +.B gpioset +and +.B gpioclear +both give the value of the level register, GPLR; +and +.B gpioedge +gives the value of the edge dectect register, GEDR. +Each write request +should present a single number in textual form, which +is assumed to be hexadecimal by default. +The value is written to a GPIO register: +.B gpioset +corresponds to GPSR, +.B gpioclear +corresponds to GPCR, and +.B gpioedge +corresponds to GEDR. +.SH SOURCE +.B /os/sa1100/devgpio.c |
