EasyManua.ls Logo

VIA Technologies VAB-820 - Real-Time Clock (RTC) Management

VIA Technologies VAB-820
39 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
VAB-820 Linux BSP v3.2.0 Quick Start Guide
33
$ echo "in" > /sys/class/gpio/gpio7/directio
n
To read the GPI input value, use the following command:
$ cat /sys/class/gpio/gpio203/value
5.10.3. Setting Up GPO Mode
To set a pin to “output” mode (GPO), use the following command (here is the example
for GPIO pin 1):
$ echo "out" > /sys/class/gpio/gpio7/direction
To output a “Low” value on the GPO pin, use the following command:
$ echo 0 > /sys/class/gpio/gpio7/value
To output a “High” value on the GPO pin, use the following command:
$ echo 1 > /sys/class/gpio/gpio7/value
5.11. Configuring RTC
As the first step, set the system time with the Linux date command, for example as:
$ date mmddHHMMYYYY
Time Value
mm 2-digit month
dd 2-digit day
HH 2-digit hours in 24h system
MM 2-digit minutes
YYYY 4-digit year
Time value table
For example, the value 061110072013 means June 11 2013 10:07. The date command
also accepts other time formats. For more information, use the following command:
$ date --help
To write the system time to the RTC, use the following command:
$ hwclock -w -f /dev/rtc0
To read the RTC time, use the following command:
$ hwclock -r

Table of Contents

Other manuals for VIA Technologies VAB-820

Related product manuals