Difference between revisions of "Fitlet GPIO SDK for Linux"

From fit-PC wiki
Jump to: navigation, search
(Created page with "== fitlet GPIO SDK for Linux == * [http://fit-pc.com/download/fitlet/sw/fitlet-gpio-sdk-for-linux.zip fitlet GPIO SDK for Linux] == Installation == 1. Download the custom ker...")   (change visibility)
 
Line 3: Line 3:
  
 
== Installation ==
 
== Installation ==
1. Download the custom kernel image and headers <LINK_TO_DEB_FILES_HERE> to the fitlet.
+
1. Download the custom kernel image and headers ''<LINK_TO_DEB_FILES_HERE>'' to the fitlet.
  
 
2. Open the terminal and install the new linux-*.deb packages:
 
2. Open the terminal and install the new linux-*.deb packages:
Line 14: Line 14:
 
(based on http://droid/mirror/mediawiki/index.php/CM-iGT:_Linux:_Mint#GPIO)
 
(based on http://droid/mirror/mediawiki/index.php/CM-iGT:_Linux:_Mint#GPIO)
  
1. GPIO interface on fitlet consists of 9 I/Os provided by AMD FCH (Fusion Controller Hub)
+
1. GPIO interface on fitlet consists of 9 I/Os provided by AMD FCH (Fusion Controller Hub) <br>
2. The responsible kernel module is gpio_fch
+
2. The responsible kernel module is '''gpio_fch'''  <br>
3. The kernel modules uses the following pin naming convention:  
+
3. The kernel modules uses the following pin naming convention: <br>
  
 
  P-1,  GPIO89
 
  P-1,  GPIO89
Line 28: Line 28:
 
  P-11, GPIO12
 
  P-11, GPIO12
  
4. The GPIO sysfs interface allows users to manipulate any GPIO from userspace dynamically.
+
4. The GPIO sysfs interface allows users to manipulate any GPIO from userspace dynamically. <br>
5. A basic example of GPIO usage (as root user):  
+
5. A basic example of GPIO usage (as root user): <br>
  
 
  $ modprobe fch_gpio
 
  $ modprobe fch_gpio
Line 40: Line 40:
 
  $ echo 89 > /sys/class/gpio/unexport
 
  $ echo 89 > /sys/class/gpio/unexport
  
6. The source code of gpio_fch driver <LINK_TO_DIFF_FILE_HERE>
+
6. The source code of '''gpio_fch''' driver ''<LINK_TO_DIFF_FILE_HERE>''  <br>
7. The GPIO framework and GPIO sysfs interface are documented in Linux Kernel Documentation
+
7. The GPIO framework and GPIO sysfs interface are documented in Linux Kernel Documentation <br>

Revision as of 08:54, 26 October 2015

fitlet GPIO SDK for Linux

Installation

1. Download the custom kernel image and headers <LINK_TO_DEB_FILES_HERE> to the fitlet.

2. Open the terminal and install the new linux-*.deb packages:

$ sudo dpkg -i /path/to/linux-*.deb

3. Reboot the system:

$ sudo reboot -f

fitlet GPIO

(based on http://droid/mirror/mediawiki/index.php/CM-iGT:_Linux:_Mint#GPIO)

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

P-1,  GPIO89
P-2,  GPIO132
P-3,  GPIO65
P-4,  GPIO66
P-5,  GPIO29	Vout 1.5V
P-8,  GPIO73
P-9,  GPIO27	Vout 1.5V
P-10, GPIO28	Vout 1.5V
P-11, GPIO12

4. The GPIO sysfs interface allows users to manipulate any GPIO from userspace dynamically.
5. 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

6. The source code of gpio_fch driver <LINK_TO_DIFF_FILE_HERE>
7. The GPIO framework and GPIO sysfs interface are documented in Linux Kernel Documentation