Difference between revisions of "GINPUT"

From uGFX Wiki
Jump to: navigation, search
(Attaching)
Line 32: Line 32:
  
 
ToDo
 
ToDo
 +
 +
== Keyboard ==
 +
See [[Keyboard]].
  
  
  
 
[[Category:Module]]
 
[[Category:Module]]

Revision as of 00:06, 20 June 2015

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 board file API for the GINPUT touchscreen module looks like the following:

static void     init_board(void);
static bool_t   getpin_pressed(void);
static void     aquire_bus(void);
static void     release_bus(void);
static uint16_t read_value(uint16_t port);

Examples and a template file 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.

ToDo

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).

ToDo

Keyboard

See Keyboard.