Unit STMPE
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
procedure STMPEInit;
Note | Called internally by other functions |
---|
STMPE functions
function STMPE610GPIOCreate(I2C:PI2CDevice; SPI:PSPIDevice; Address,ChipSelect:Word; IRQ:PGPIOInfo):PGPIODevice;
I2C | The I2C device this STMPE610 is connected to (Optional) |
---|---|
SPI | The SPI device this STMPE610 is connected to (Optional) |
Address | The I2C address for this STMPE610 (or I2C_ADDRESS_INVALID if SPI connected) |
ChipSelect | The SPI chip select for this STMPE610 (or SPI_CS_NONE if I2C connected) |
IRQ | The GPIO information for the IRQ line (Optional) |
Return | Pointer to the new GPIO device or nil on failure |
Note | Either I2C or SPI must be specified but not both |
function STMPE801GPIOCreate(I2C:PI2CDevice; Address:Word; IRQ:PGPIOInfo):PGPIODevice;
I2C | The I2C device this STMPE801 is connected to |
---|---|
Address | The I2C address for this STMPE801 |
IRQ | The GPIO information for the IRQ line (Optional) |
Return | Pointer to the new GPIO device or nil on failure |
function STMPE811GPIOCreate(I2C:PI2CDevice; SPI:PSPIDevice; Address,ChipSelect:Word; IRQ:PGPIOInfo):PGPIODevice;
I2C | The I2C device this STMPE811 is connected to (Optional) |
---|---|
SPI | The SPI device this STMPE811 is connected to (Optional) |
Address | The I2C address for this STMPE811 (or I2C_ADDRESS_INVALID if SPI connected) |
ChipSelect | The SPI chip select for this STMPE811 (or SPI_CS_NONE if I2C connected) |
IRQ | The GPIO information for the IRQ line (Optional) |
Return | Pointer to the new GPIO device or nil on failure |
Note | Either I2C or SPI must be specified but not both |
function STMPE1601GPIOCreate(I2C:PI2CDevice; Address:Word; IRQ:PGPIOInfo):PGPIODevice;
I2C | The I2C device this STMPE1601 is connected to |
---|---|
Address | The I2C address for this STMPE1601 |
IRQ | The GPIO information for the IRQ line (Optional) |
Return | Pointer to the new GPIO device or nil on failure |
function STMPE1801GPIOCreate(I2C:PI2CDevice; Address:Word; IRQ:PGPIOInfo):PGPIODevice;
I2C | The I2C device this STMPE1801 is connected to |
---|---|
Address | The I2C address for this STMPE1801 |
IRQ | The GPIO information for the IRQ line (Optional) |
Return | Pointer to the new GPIO device or nil on failure |
function STMPE2401GPIOCreate(I2C:PI2CDevice; Address:Word; IRQ:PGPIOInfo):PGPIODevice;
I2C | The I2C device this STMPE2401 is connected to |
---|---|
Address | The I2C address for this STMPE2401 |
IRQ | The GPIO information for the IRQ line (Optional) |
Return | Pointer to the new GPIO device or nil on failure |
function STMPEGPIODestroy(GPIO:PGPIODevice):LongWord;
GPIO | The GPIO device to destroy |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
function STMPE610TouchCreate(I2C:PI2CDevice; SPI:PSPIDevice; Address,ChipSelect:Word; Width,Height:LongWord; IRQ:PGPIOInfo):PTouchDevice;
I2C | The I2C device this STMPE610 is connected to (Optional) |
---|---|
SPI | The SPI device this STMPE610 is connected to (Optional) |
Address | The I2C address for this STMPE610 (or I2C_ADDRESS_INVALID if SPI connected) |
ChipSelect | The SPI chip select for this STMPE610 (or SPI_CS_NONE if I2C connected) |
Width | The width of the screen in pixels |
Height | The height of the screen in pixels |
IRQ | The GPIO information for the IRQ line (Optional) |
Return | Pointer to the new Touch device or nil on failure |
Note | Either I2C or SPI must be specified but not both |
function STMPE811TouchCreate(I2C:PI2CDevice; SPI:PSPIDevice; Address,ChipSelect:Word; Width,Height:LongWord; IRQ:PGPIOInfo):PTouchDevice;
I2C | The I2C device this STMPE811 is connected to (Optional) |
---|---|
SPI | The SPI device this STMPE811 is connected to (Optional) |
Address | The I2C address for this STMPE811 (or I2C_ADDRESS_INVALID if SPI connected) |
ChipSelect | The SPI chip select for this STMPE811 (or SPI_CS_NONE if I2C connected) |
Width | The width of the screen in pixels |
Height | The height of the screen in pixels |
IRQ | The GPIO information for the IRQ line (Optional) |
Return | Pointer to the new Touch device or nil on failure |
Note | Either I2C or SPI must be specified but not both |
function STMPETouchDestroy(Touch:PTouchDevice):LongWord;
Touch | The Touch device to destroy |
---|---|
Return | ERROR_SUCCESS if completed or another error code on failure |
Return to Unit Reference