CON14 pin 3 and CON14 pin 4 were configured to be used as GPIO by default in
linux-2.6.26-at7 (linux-a400-1.00.bin.gz). In linux-2.6.26-at8 (linux-
a400-1.01.bin.gz) and later, this was changed so that they are configured to be used
as I2C2 by default. Please be aware of this change when using CON14 pin 3 and
CON14 pin 4.
10.2.1. Changing I/O Direction
The I/O direction can be changed by writing an appropriate value to the direction file under the GPIO class directory. For
values supported by the direction file, refer to Table 10.4, “direction Configuration”.
Table 10.4. direction Configuration
Configuration
Description
high
Set I/O direction to OUTPUT. The input level can be obtained and set in this state. The input level will be HIGH.
out
Set I/O direction to OUTPUT. The input level can be obtained and set in this state. The input level will be LOW.
low
This is the same as setting "out".
in
Set I/O direction to INPUT. The input level can be obtained but not set in this state.
10.2.2. Obtaining Input Level
The input level can be obtained by reading the value file under the GPIO class directory. 0 represents a LOW level and
1 a HIGH level. The input level can be obtained both when the I/O direction is set to INPUT and OUTPUT.
[armadillo ~]# cat /sys/devices/virtual/gpio/CON9_1/value
0
Figure 10.6. Obtaining CON9_1 Input Level
10.2.3. Configuring Input Level
The input level can be set by writing an appropriate value to the value file under the GPIO class directory. 0 represents
a LOW level and 1 a HIGH level. Input level configuration can only be carried out when the I/O direction is set to OUTPUT.
[armadillo ~]# echo 1 > /sys/devices/virtual/gpio/CON9_2/value
Figure 10.7. Configuring CON9_2 Input Level
10.3. RTC
As the Armadillo-440 LCD Model incorporates a calendar clock (Real Time Clock), the date and time will continue to
be displayed correctly even after turning the power off and on.
To set time information to the RTC, first set the system clock. After that, then set the hardware clock (RTC) to match the
system clock.
10.3.1. Setting System Clock with date
The time format used as an argument to the date command is: MMDDhhmmCCYY.ss. In the example below, the date
and time are set to 1/23/2000 4:56:00.
Armadillo-440 LCD Model Development Set Startup Guide
Other Devices
61