Fitlet GPIO SDK for Linux

From fit-PC wiki
Revision as of 16:31, 26 October 2015 by Irads (Talk | contribs)

Jump to: navigation, search

Installation

  • Open the terminal and install the new linux-*.deb packages:
$ sudo dpkg -i /path/to/linux-*.deb
  • Reboot the system:
$ sudo reboot -f

fitlet GPIO

  • GPIO interface on fitlet consists of 9 I/Os provided by AMD FCH (Fusion Controller Hub)
  • The responsible kernel module is gpio_fch
  • The kernel modules uses the following pin naming convention:


GPIO pin naming convention on fitlet
GPIO name HW source Pin on GPIO Connector Notes
GPIO89 FCH P-1
GPIO132 FCH P-2
GPIO65 FCH P-3
GPIO66 FCH P-4
GPIO29 FCH P-5 Vout 1.5V
GPIO73 FCH P-8
GPIO27 FCH P-9 Vout 1.5V
GPIO28 FCH P-10 Vout 1.5V
GPIO12 FCH P-11
  • The GPIO sysfs interface allows users to manipulate any GPIO from userspace dynamically.
  • A basic example of GPIO usage (as root user):
$ modprobe fch_gpio
$ echo 89 > /sys/class/gpio/export
$ echo out > /sys/class/gpio/gpio89/direction
$ echo 1 > /sys/class/gpio/gpio89/value
## at this point voltage measuring on P-1 should give 3.3V
$ echo 0 > /sys/class/gpio/gpio89/value
## at this point voltage measuring on P-1 should give 0.0V
$ echo 89 > /sys/class/gpio/unexport