•
Block name
–
RPI
•
module
–
RPiDrv
•
classname
–
RPiDrv
The inputs and outputs of the
RPiDrv
driver can be accessed as shown in Fig.
2.2
.
Figure 2.2: Example of input and output flags of the
RPiDrv
driver
One block of the
From
type allowing the user to read one input has the
Goto tag
set to
RPI__GPIO21U
, while the other has this tag set to
RPI__GPIO22U
. The number in
the flag corresponds with the GPIO pin number and the
U
letter activates the pull-up
resistor. The block of
Goto
type allowing the user to set (write) one output has the
Goto
tag
) set to
RPI__GPIO23
, the other output is accessed via the
RPI__GPIO24
flag. The
blocks always have the
RPI
prefix right at the beginning of the tag followed by two
_
characters (underscore).
Similarly for other pins we can use e.g. the flags:
•
Goto
,
RPI__GPIO22
– digital output 22
•
Goto
,
RPI__GPIO23H
– digital output 23, which is set to logical
1
(HIGH, ON)
immediately upon initialization
•
Goto
,
RPI__PWM18
– PWM output on pin 18
6