Changes

Jump to: navigation, search

Fitlet GPIO SDK for Windows

50 bytes removed, 08:52, 4 November 2015
== fitlet GPIO SDK for Windows ==
* [http://fit-pc.com/download/fitlet/sw/ fitlet GPIO SDK for Windows]
 
== Installation ==
Installation* Download the [http://www.fit-pc2.com/download/fitlet/Win7/drivers/fitlet_Win7_GPIO.zip GPIO driver ] to the fitlet.
*Run the fitlet_GPIO_Driver_1.0.exe in Administrator mode and follow the on-screen instructions.
*The GPIO.dll exposes the following functions:
=== GPIO_Config ===
Name: GPIO_Config
Definition: BOOL GPIO_Config(UINT8 gpioNum, UINT8 gpioDir, UINT8 gpioPullUp, UINT8 gpioPullDown)
Description: Confgure the GPIO pin
Arguments:
:gpioNum - GPIO number (1-9) :gpioDir - GPIO direction (0 – input, 1 – output) :gpioPullUp - GPIO pull-up (0 – disabled, 1 – enabled) :gpioPullDown - GPIO pull-down (0 – disabled, 1 – enabled) Return: GPIO pin configuration status FALSE - configuraqtion failed TRUE - configuration succeeded
Return: GPIO pin configuration status (FALSE - failure, TRUE - success)
=== GPIO_Set ===
Name: GPIO_Set
Definition: BOOL GPIO_Set(UINT8 gpioNum, UINT8 gpioValue)
Description: Set the value of GPIO output pin
Arguments:
:gpioNum - GPIO number (1-9) :gpioValue - GPIO output pin value (0 – low, 1 – high) Return: GPIO output pin configuration status FALSE - configuration failed TRUE - configuration succeeded
Return: GPIO output pin configuration status (FALSE - failure, TRUE - success)
=== GPIO_Get ===
Name: GPIO_Get
Arguments:
:gpioNum - GPIO number (1-9)
Return: GPIO input pin value (0 – low, 1 - high)
 
== Sample Application ==
The following [http://www.fit-pc2.com/download/fitlet/Win7/drivers/fitlet_Win7_GPIO.zip example ] demonstrates the simple control of a GPIO pins. The application writes to GPIO1 (Pin1) and reads from GPIO2 (Pin2) (before using this application connect GPIO1 (Pin1) to GPIO2 (Pin2)).
<syntaxhighlight lang="cpp">
#include "stdafx.h"
#include "windows.h"
return 0;
}</syntaxhighlight>
1,916
edits