Difference between revisions of "GINPUT"

From uGFX Wiki
Jump to: navigation, search
(API reference)
 
(39 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[File:Ginput architecture.png|right|frame|GINPUT architecture]]
 
[[File:Ginput architecture.png|right|frame|GINPUT architecture]]
 
GINPUT is a powerful module which provides an easy way to interface different hardware peripherals such as touchscreens to the rest of the library. It provides everything which these peripherals need in order to operate properly such as calibration routines for the touchscreens.
 
GINPUT is a powerful module which provides an easy way to interface different hardware peripherals such as touchscreens to the rest of the library. It provides everything which these peripherals need in order to operate properly such as calibration routines for the touchscreens.
 +
 +
== API reference ==
 +
The API reference of the GINPUT module can be found [http://api.ugfx.io/group___g_i_n_p_u_t.html here].
  
 
== Touchscreen ==
 
== Touchscreen ==
 
A touchscreen can be interfaced very easily through the GINPUT module. It doesn't matter if it is a [http://en.wikipedia.org/wiki/Touchscreen#Resistive resistive], [http://en.wikipedia.org/wiki/Touchscreen#Capacitive capacitive] or any other touchscreen technology.
 
A touchscreen can be interfaced very easily through the GINPUT module. It doesn't matter if it is a [http://en.wikipedia.org/wiki/Touchscreen#Resistive resistive], [http://en.wikipedia.org/wiki/Touchscreen#Capacitive capacitive] or any other touchscreen technology.
 +
 +
=== Board file ===
 +
The GINPUT module requires a [[Board File|board file]] for each driver instance. A board file template and corresponding examples can be found under ''/drivers/ginput/touch/xxx/''.
  
 
=== Calibration ===
 
=== Calibration ===
The GINPUT module provides a calibration routine which uses a three-point algorithm. Three calibration points will show up, one after another. You have to press each. At the end of this process, a 4rd one will appear in the center of the screen. This last one is only used to test if the calibration was successful. If the offset is too big, the calibration process will be restarted automatically.
+
See [[Touchscreen Calibration]].
 
+
==== Options ====
+
The following settings can alter the behaviour of the calibration routine:
+
 
+
{| class="wikitable"
+
! scope="col"|Option
+
! scope="col"|Description
+
|-
+
|GINPUT_MOUSE_CALIBRATE_EXTREMES
+
|If this is set to ''TRUE'' in your [[gfxconf.h]], the calibration points are display at the very corner of the display. This gives an overall more accurate result but they are less intuitive.
+
|-
+
|GINPUT_MOUSE_MAX_CALIBRATION_ERROR
+
|This macro is part of the config file of the driver in your board directory and takes a pixel value. It defines how big the pixel offset of the test point can be before the calibration process is repeated automatically.
+
|}
+
  
 
== Digital input ==
 
== Digital input ==
ToDo
+
Also known as the ''Toggle'' driver. This driver can be used to interface common digital inputs (GPIOs). Mostly this driver is used to attach hardware buttons to a [[GWIN]] [[Widgets|widget]].
  
 
== Analog input ==
 
== Analog input ==
ToDo
+
Also known as the ''Dial'' driver. This driver can be used to interface slow analog inputs. Mostly this driver is used to attach an analog peripheral such as a potentiometer or a sensor to a [[GWIN]] [[Widgets|widget]].
 +
It can also be used on digital inputs that emulate a graduated ratio output such as a digital "click" wheel (rotary encoder).
 +
 
 +
== Keyboard ==
 +
The keyboard driver allows to interface physical keyboards to a µGFX application.
 +
Note that there's also a virtual keyboard widget that provides an on-screen keyboard with customizable layouts. See [[keyboard]].
 +
 
 +
 
 +
 
 +
[[Category:Module]]

Latest revision as of 18:53, 3 August 2021

GINPUT architecture

GINPUT is a powerful module which provides an easy way to interface different hardware peripherals such as touchscreens to the rest of the library. It provides everything which these peripherals need in order to operate properly such as calibration routines for the touchscreens.

API reference

The API reference of the GINPUT module can be found here.

Touchscreen

A touchscreen can be interfaced very easily through the GINPUT module. It doesn't matter if it is a resistive, capacitive or any other touchscreen technology.

Board file

The GINPUT module requires a board file for each driver instance. A board file template and corresponding examples can be found under /drivers/ginput/touch/xxx/.

Calibration

See Touchscreen Calibration.

Digital input

Also known as the Toggle driver. This driver can be used to interface common digital inputs (GPIOs). Mostly this driver is used to attach hardware buttons to a GWIN widget.

Analog input

Also known as the Dial driver. This driver can be used to interface slow analog inputs. Mostly this driver is used to attach an analog peripheral such as a potentiometer or a sensor to a GWIN widget. It can also be used on digital inputs that emulate a graduated ratio output such as a digital "click" wheel (rotary encoder).

Keyboard

The keyboard driver allows to interface physical keyboards to a µGFX application. Note that there's also a virtual keyboard widget that provides an on-screen keyboard with customizable layouts. See keyboard.