-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.txt
36 lines (29 loc) · 1.39 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
```
============================================================
HARDWARE
The gpio4 card gives direct access to each of the four pins
in a Baseboard slot. Each GPIO pin can be an input or an
output, and changes at an input pin can trigger the sending
of the pin status up to the host. The highest numbered pin on
the connector is controlled by the LSB in the control and data
registers.
RESOURCES
pins : The value on the GPIO pins. A write to this resource
sets an output pin, and a read from it returns the current
value on the pins. A read requires a round trip over the
USB-serial link and may take a few milliseconds. Data is
given as a hexadecimal number. You can monitor the pins
using a pccat command. Using pccat only makes sense if one
or more of the pins are configured as input and as a source
of interrupts.
direction : The direction of the four pins as hexadecimal
digit. A set bit makes the pin an output and a cleared bit
makes it an input. The power up default is for all pins to
be inputs. This resource works with pcget and pcset.
interrupt : An 'interrupt' enable mask. When a pin is an
input and the interrupt bit is set for that pin, then when
the logic level of the pin changes, the FPGA builds and
sends a packet with the new value of the pins. This ability
is called 'interrupt' since it is asynchronous and not polled.
The interrupt resource works with pcget and pcset.
```