Unit STMPE

From Ultibo.org
Revision as of 01:40, 14 October 2016 by Ultibo (Talk | contribs)

Jump to: navigation, search

Return to Unit Reference


Description


The ST Microelectronics STMPE devices are a range of multi function chips that include GPIO, ADC, 4 wire touchscreen controller and PWM outputs in varying combinations. Many of the functions overlap so a pin can be used for example as a GPIO or a PWM but not both at once. The Touchscreen controller also consumes many of the GPIO pins in the models that support it. This driver supports the GPIO and Touchscreen functions of the following chips:

STMPE610 - 6 GPIO / 4-wire Touch / I2C / SPI

STMPE801 - 8 GPIO / I2C

STMPE811 - 8 GPIO / 4-wire Touch / I2C / SPI

STMPE1601 - 16 GPIO / 4 PWM / I2C

STMPE1801 - 18 GPIO / I2C

STMPE2401 - 24 GPIO / 3 PWM / I2C

STMPE2403 - 24 GPIO / 3 PWM / I2C

Note: A number of variations also support Keypad, Temperature and other features which are not currently handled by this driver.

Constants


To be documented

Type definitions


To be documented

Public variables


To be documented

Function declarations



Initialization functions

[Expand]
procedure STMPEInit;
Description: Initialize the STMPE unit and parameters


STMPE functions

[Expand]
function STMPE610GPIOCreate(I2C:PI2CDevice; SPI:PSPIDevice; Address,ChipSelect:Word; IRQ:PGPIOInfo):PGPIODevice;
Description: Create, register and start a new STMPE610 GPIO device connected to the specified I2C or SPI device


[Expand]
function STMPE801GPIOCreate(I2C:PI2CDevice; Address:Word; IRQ:PGPIOInfo):PGPIODevice;
Description: Create, register and start a new STMPE801 GPIO device connected to the specified I2C device


[Expand]
function STMPE811GPIOCreate(I2C:PI2CDevice; SPI:PSPIDevice; Address,ChipSelect:Word; IRQ:PGPIOInfo):PGPIODevice;
Description: Create, register and start a new STMPE811 GPIO device connected to the specified I2C or SPI device


[Expand]
function STMPE1601GPIOCreate(I2C:PI2CDevice; Address:Word; IRQ:PGPIOInfo):PGPIODevice;
Description: Create, register and start a new STMPE1601 GPIO device connected to the specified I2C device


[Expand]
function STMPE1801GPIOCreate(I2C:PI2CDevice; Address:Word; IRQ:PGPIOInfo):PGPIODevice;
Description: Create, register and start a new STMPE1801 GPIO device connected to the specified I2C device


[Expand]
function STMPE2401GPIOCreate(I2C:PI2CDevice; Address:Word; IRQ:PGPIOInfo):PGPIODevice;
Description: Create, register and start a new STMPE2401 GPIO device connected to the specified I2C device


[Expand]
function STMPEGPIODestroy(GPIO:PGPIODevice):LongWord;
Description: Stop, deregister and destroy an STMPE GPIO device created by this driver


[Expand]
function STMPE610TouchCreate(I2C:PI2CDevice; SPI:PSPIDevice; Address,ChipSelect:Word; Width,Height:LongWord; IRQ:PGPIOInfo):PTouchDevice;
Description: Create, register and start a new STMPE610 Touch device connected to the specified I2C or SPI device


[Expand]
function STMPE811TouchCreate(I2C:PI2CDevice; SPI:PSPIDevice; Address,ChipSelect:Word; Width,Height:LongWord; IRQ:PGPIOInfo):PTouchDevice;
Description: Create, register and start a new STMPE811 Touch device connected to the specified I2C or SPI device


[Expand]
function STMPETouchDestroy(Touch:PTouchDevice):LongWord;
Description: Stop, deregister and destroy an STMPE Touch device created by this driver


STMPE GPIO functions

[Expand]
function STMPEGPIOStart(GPIO:PGPIODevice):LongWord;
Description: Implementation of GPIODeviceStart API for STMPE


[Expand]
function STMPEGPIOStop(GPIO:PGPIODevice):LongWord;
Description: Implementation of GPIODeviceStop API for STMPE


[Expand]
function STMPEGPIORead(GPIO:PGPIODevice; Reg:LongWord):LongWord;
Description: Implementation of GPIODeviceRead API for STMPE


[Expand]
procedure STMPEGPIOWrite(GPIO:PGPIODevice; Reg,Value:LongWord);
Description: Implementation of GPIODeviceWrite API for STMPE


[Expand]
function STMPEGPIOInputGet(GPIO:PGPIODevice; Pin:LongWord):LongWord;
Description: Implementation of GPIODeviceInputGet API for STMPE


[Expand]
function STMPEGPIOOutputSet(GPIO:PGPIODevice; Pin,Level:LongWord):LongWord;
Description: Implementation of GPIODeviceOutputSet API for STMPE


[Expand]
function STMPEGPIOPullGet(GPIO:PGPIODevice; Pin:LongWord):LongWord;
Description: Implementation of GPIODevicePullGet API for STMPE


[Expand]
function STMPEGPIOPullSelect(GPIO:PGPIODevice; Pin,Mode:LongWord):LongWord;
Description: Implementation of GPIODevicePullSelect API for STMPE


[Expand]
function STMPEGPIOFunctionGet(GPIO:PGPIODevice; Pin:LongWord):LongWord;
Description: Implementation of GPIODeviceFunctionGet API for STMPE


[Expand]
function STMPEGPIOFunctionSelect(GPIO:PGPIODevice; Pin,Mode:LongWord):LongWord;
Description: Implementation of GPIODeviceFunctionSelect API for STMPE


Return to Unit Reference