Difference between revisions of "Unit STMPE"
(13 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
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: | 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 | + | STMPE610 - 6 GPIO/4-wire Touch/I2C/SPI |
− | STMPE801 - 8 GPIO / I2C | + | STMPE801 - 8 GPIO/I2C |
− | STMPE811 - 8 GPIO / 4-wire Touch / I2C / SPI | + | STMPE811 - 8 GPIO/4-wire Touch/I2C/SPI |
− | STMPE1601 - 16 GPIO / 4 PWM / I2C | + | STMPE1601 - 16 GPIO/4 PWM/I2C |
− | STMPE1801 - 18 GPIO / I2C | + | STMPE1801 - 18 GPIO/I2C |
− | STMPE2401 - 24 GPIO / 3 PWM / I2C | + | STMPE2401 - 24 GPIO/3 PWM/I2C |
− | STMPE2403 - 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. | Note: A number of variations also support Keypad, Temperature and other features which are not currently handled by this driver. | ||
Line 178: | Line 178: | ||
|- | |- | ||
| <code>STMPE1601_GPIO_MAX_FUNCTION = GPIO_FUNCTION_ALT1;</code> | | <code>STMPE1601_GPIO_MAX_FUNCTION = GPIO_FUNCTION_ALT1;</code> | ||
− | | Alternate function 0 = Keypad / Alternate function 1 = PWM | + | | Alternate function 0 = Keypad/Alternate function 1 = PWM |
|- | |- | ||
| <code>STMPE1601_GPIO_FUNCTION_COUNT = 4;</code> | | <code>STMPE1601_GPIO_FUNCTION_COUNT = 4;</code> | ||
Line 237: | Line 237: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''STMPE chip | + | <div style="font-size: 14px; padding-left: 12px;">'''STMPE chip''' <code> STMPE_CHIP_* </code></div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
Line 243: | Line 243: | ||
| <code>STMPE_CHIP_STMPE610 = 1;</code> | | <code>STMPE_CHIP_STMPE610 = 1;</code> | ||
| style="width: 50%;"| | | style="width: 50%;"| | ||
− | |||
− | |||
− | |||
|- | |- | ||
| <code>STMPE_CHIP_STMPE801 = 2;</code> | | <code>STMPE_CHIP_STMPE801 = 2;</code> | ||
Line 269: | Line 266: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''STMPE direction | + | <div style="font-size: 14px; padding-left: 12px;">'''STMPE direction''' <code> STMPE_DIR_* </code></div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
Line 283: | Line 280: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''STMPE I2C | + | <div style="font-size: 14px; padding-left: 12px;">'''STMPE I2C''' <code> STMPE_I2C_* </code></div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
Line 294: | Line 291: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''STMPE SPI | + | <div style="font-size: 14px; padding-left: 12px;">'''STMPE SPI''' <code> STMPE_SPI_* </code></div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
Line 310: | Line 307: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''STMPE register | + | <div style="font-size: 14px; padding-left: 12px;">'''STMPE register''' <code> STMPE*_REG_* </code></div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | |colspan="2"|''STMPE610 / STMPE811'' | + | |colspan="2"|''STMPE610/STMPE811'' |
|- | |- | ||
| <code>STMPE811_REG_CHIP_ID = $00;</code> | | <code>STMPE811_REG_CHIP_ID = $00;</code> | ||
Line 320: | Line 317: | ||
|- | |- | ||
| <code>STMPE811_REG_ID_VER = $02;</code> | | <code>STMPE811_REG_ID_VER = $02;</code> | ||
− | | Revision number (0x01 for engineering sample / 0x03 for final silicon) | + | | Revision number (0x01 for engineering sample/0x03 for final silicon) |
|- | |- | ||
| <code>STMPE811_REG_SYS_CTRL1 = $03;</code> | | <code>STMPE811_REG_SYS_CTRL1 = $03;</code> | ||
Line 495: | Line 492: | ||
|- | |- | ||
| <code>STMPE801_REG_ID_VER = $02;</code> | | <code>STMPE801_REG_ID_VER = $02;</code> | ||
− | | Revision number (0x01 for engineering sample / 0x02 for final silicon) | + | | Revision number (0x01 for engineering sample/0x02 for final silicon) |
|- | |- | ||
| <code>STMPE801_REG_SYS_CTRL = $04;</code> | | <code>STMPE801_REG_SYS_CTRL = $04;</code> | ||
Line 828: | Line 825: | ||
|colspan="2"| | |colspan="2"| | ||
|- | |- | ||
− | |colspan="2"|''STMPE2401 / STMPE2403'' | + | |colspan="2"|''STMPE2401/STMPE2403'' |
|- | |- | ||
| <code>STMPE240X_REG_CHIP_ID = $80;</code> | | <code>STMPE240X_REG_CHIP_ID = $80;</code> | ||
Line 1,035: | Line 1,032: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''STMPE | + | <div style="font-size: 14px; padding-left: 12px;">'''STMPE Id''' <code> STMPE*_CHIP_ID </code></div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | |colspan="2"|''STMPE610 / STMPE811'' | + | |colspan="2"|''STMPE610/STMPE811'' |
|- | |- | ||
| <code>STMPE811_CHIP_ID = $0811;</code> | | <code>STMPE811_CHIP_ID = $0811;</code> | ||
Line 1,067: | Line 1,064: | ||
|colspan="2"| | |colspan="2"| | ||
|- | |- | ||
− | |colspan="2"|''STMPE2401 / STMPE2403'' | + | |colspan="2"|''STMPE2401/STMPE2403'' |
|- | |- | ||
| <code>STMPE240X_CHIP_ID = $01;</code> | | <code>STMPE240X_CHIP_ID = $01;</code> | ||
Line 1,076: | Line 1,073: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''STMPE system control | + | <div style="font-size: 14px; padding-left: 12px;">'''STMPE system control''' <code> STMPE*_SYS_CTRL*_* </code></div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | |colspan="2"|''STMPE610 / STMPE811'' | + | |colspan="2"|''STMPE610/STMPE811'' |
|- | |- | ||
| <code>STMPE811_SYS_CTRL2_TS_OFF = (1 shl 3);</code> | | <code>STMPE811_SYS_CTRL2_TS_OFF = (1 shl 3);</code> | ||
Line 1,153: | Line 1,150: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''STMPE touchscreen control | + | <div style="font-size: 14px; padding-left: 12px;">'''STMPE touchscreen control''' <code> STMPE*_TSC_CTRL_* </code></div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | |colspan="2"|''STMPE610 / STMPE811'' | + | |colspan="2"|''STMPE610/STMPE811'' |
|- | |- | ||
| <code>STMPE811_TSC_CTRL_TSC_STA = (1 shl 7);</code> | | <code>STMPE811_TSC_CTRL_TSC_STA = (1 shl 7);</code> | ||
− | | TSC status (Reads '1' when touch is detected / Reads '0' when touch is not detected) | + | | TSC status (Reads '1' when touch is detected/Reads '0' when touch is not detected) |
|- | |- | ||
| <code>STMPE811_TSC_CTRL_TRACK_MASK = (7 shl 4);</code> | | <code>STMPE811_TSC_CTRL_TRACK_MASK = (7 shl 4);</code> | ||
Line 1,187: | Line 1,184: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''STMPE touchscreen | + | <div style="font-size: 14px; padding-left: 12px;">'''STMPE touchscreen configuration''' <code> STMPE*_TSC_CFG_* </code></div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | |colspan="2"|''STMPE610 / STMPE811'' | + | |colspan="2"|''STMPE610/STMPE811'' |
|- | |- | ||
| <code>STMPE811_TSC_CFG_AVE_CTRL_1 = (0 shl 6);</code> | | <code>STMPE811_TSC_CFG_AVE_CTRL_1 = (0 shl 6);</code> | ||
Line 1,215: | Line 1,212: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''STMPE ADC control 1 | + | <div style="font-size: 14px; padding-left: 12px;">'''STMPE ADC control 1''' <code> STMPE*_ADC_CTRL1_* </code></div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | |colspan="2"|''STMPE610 / STMPE811'' | + | |colspan="2"|''STMPE610/STMPE811'' |
|- | |- | ||
| <code>STMPE811_ADC_CTRL1_SAMPLE_TIME_MASK = (7 shl 4);</code> | | <code>STMPE811_ADC_CTRL1_SAMPLE_TIME_MASK = (7 shl 4);</code> | ||
Line 1,225: | Line 1,222: | ||
|- | |- | ||
| <code>STMPE811_ADC_CTRL1_MOD_12B = (1 shl 3);</code> | | <code>STMPE811_ADC_CTRL1_MOD_12B = (1 shl 3);</code> | ||
− | | MOD_12B: Selects 10 or 12-bit ADC operation (1: 12 bit ADC / 0: 10 bit ADC) | + | | MOD_12B: Selects 10 or 12-bit ADC operation (1: 12 bit ADC/0: 10 bit ADC) |
|- | |- | ||
| <code>STMPE811_ADC_CTRL1_REF_SEL = (1 shl 1);</code> | | <code>STMPE811_ADC_CTRL1_REF_SEL = (1 shl 1);</code> | ||
− | | REF_SEL: Selects between internal or external reference for the ADC (1: External reference / 0: Internal reference) | + | | REF_SEL: Selects between internal or external reference for the ADC (1: External reference/0: Internal reference) |
|- | |- | ||
|} | |} | ||
Line 1,234: | Line 1,231: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''STMPE ADC control 2 | + | <div style="font-size: 14px; padding-left: 12px;">'''STMPE ADC control 2''' <code> STMPE*_ADC_CTRL2_* </code></div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | |colspan="2"|''STMPE610 / STMPE811'' | + | |colspan="2"|''STMPE610/STMPE811'' |
|- | |- | ||
| <code>STMPE811_ADC_CTRL2_ADC_FREQ_MASK = (3 shl 0);</code> | | <code>STMPE811_ADC_CTRL2_ADC_FREQ_MASK = (3 shl 0);</code> | ||
Line 1,247: | Line 1,244: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''STMPE FIFO control and status | + | <div style="font-size: 14px; padding-left: 12px;">'''STMPE FIFO control and status''' <code> STMPE*_FIFO_STA_* </code></div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | |colspan="2"|''STMPE610 / STMPE811'' | + | |colspan="2"|''STMPE610/STMPE811'' |
|- | |- | ||
| <code>STMPE811_FIFO_STA_RESET = (1 shl 0);</code> | | <code>STMPE811_FIFO_STA_RESET = (1 shl 0);</code> | ||
− | | FIFO Reset (Write 0 : FIFO put out of reset mode | + | | FIFO Reset (Write 0 : FIFO put out of reset mode/Write 1 : Resets FIFO. All data in FIFO will be cleared) |
|- | |- | ||
|} | |} | ||
Line 1,260: | Line 1,257: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''STMPE interrupt control | + | <div style="font-size: 14px; padding-left: 12px;">'''STMPE interrupt control''' <code> STMPE*_INT_CTRL_* </code></div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | |colspan="2"|''STMPE610 / STMPE811'' | + | |colspan="2"|''STMPE610/STMPE811'' |
|- | |- | ||
| <code>STMPE811_INT_CTRL_POLARITY = (1 shl 2);</code> | | <code>STMPE811_INT_CTRL_POLARITY = (1 shl 2);</code> | ||
− | | This bit sets the INT pin polarity (1: Active high/rising edge / 0: Active low/falling edge) | + | | This bit sets the INT pin polarity (1: Active high/rising edge/0: Active low/falling edge) |
|- | |- | ||
| <code>STMPE811_INT_CTRL_TYPE = (1 shl 1);</code> | | <code>STMPE811_INT_CTRL_TYPE = (1 shl 1);</code> | ||
− | | This bit sets the type of interrupt signal required by the host (1: Edge interrupt / 0: Level interrupt) | + | | This bit sets the type of interrupt signal required by the host (1: Edge interrupt/0: Level interrupt) |
|- | |- | ||
| <code>STMPE811_INT_CTRL_GLOBAL = (1 shl 0);</code> | | <code>STMPE811_INT_CTRL_GLOBAL = (1 shl 0);</code> | ||
− | | This is master enable for the interrupt system (1: Global interrupt / 0: Stops all interrupts) | + | | This is master enable for the interrupt system (1: Global interrupt/0: Stops all interrupts) |
|- | |- | ||
|} | |} | ||
Line 1,279: | Line 1,276: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''STMPE interrupt enable | + | <div style="font-size: 14px; padding-left: 12px;">'''STMPE interrupt enable''' <code> STMPE*_INT_EN_* </code></div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | |colspan="2"|''STMPE610 / STMPE811'' | + | |colspan="2"|''STMPE610/STMPE811'' |
|- | |- | ||
| <code>STMPE811_INT_EN_GPIO = (1 shl 7);</code> | | <code>STMPE811_INT_EN_GPIO = (1 shl 7);</code> | ||
Line 1,313: | Line 1,310: | ||
<br /> | <br /> | ||
<div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
− | <div style="font-size: 14px; padding-left: 12px;">'''STMPE interrupt status | + | <div style="font-size: 14px; padding-left: 12px;">'''STMPE interrupt status''' <code> STMPE*_INT_STA_* </code></div> |
<div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | |colspan="2"|''STMPE610 / STMPE811'' | + | |colspan="2"|''STMPE610/STMPE811'' |
|- | |- | ||
| <code>STMPE811_INT_STA_GPIO = (1 shl 7);</code> | | <code>STMPE811_INT_STA_GPIO = (1 shl 7);</code> | ||
Line 1,346: | Line 1,343: | ||
|- | |- | ||
|colspan="2"|<code>STMPE811_INT_STA_TOUCH_MASK = STMPE811_INT_STA_FIFO_EMPTY or STMPE811_INT_STA_FIFO_FULL or STMPE811_INT_STA_FIFO_OFLOW or STMPE811_INT_STA_FIFO_TH or STMPE811_INT_STA_TOUCH_DET;</code> | |colspan="2"|<code>STMPE811_INT_STA_TOUCH_MASK = STMPE811_INT_STA_FIFO_EMPTY or STMPE811_INT_STA_FIFO_FULL or STMPE811_INT_STA_FIFO_OFLOW or STMPE811_INT_STA_FIFO_TH or STMPE811_INT_STA_TOUCH_DET;</code> | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''STMPE offset''' <code> STMPE*Offsets* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''STMPE610/STMPE811 Offsets'' | ||
+ | |- | ||
+ | |colspan="2"|<code>STMPE811Offsets:TSTMPEOffsets = (</code> | ||
+ | |- | ||
+ | |colspan="2"|''Control Register offsets'' | ||
+ | |- | ||
+ | | <code>SysCtrl:STMPE811_REG_SYS_CTRL2;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>IntCtrl:STMPE811_REG_INT_CTRL;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntEnable:STMPE811_REG_INT_EN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntStatus:STMPE811_REG_INT_STA;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''GPIO Registers offsets'' | ||
+ | |- | ||
+ | | <code>GPIOIntEnable:STMPE811_REG_GPIO_INT_EN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOIntStatus:STMPE811_REG_GPIO_INT_STA;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinGet:STMPE811_REG_GPIO_MP_STA;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinSet:STMPE811_REG_GPIO_SET_PIN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinClr:STMPE811_REG_GPIO_CLR_PIN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIODirSet:STMPE811_REG_GPIO_SET_DIR;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOFuncSet:STMPE811_REG_GPIO_AF;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPullUp:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPullDown:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOEdgeDetect:STMPE811_REG_GPIO_ED;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIORisingEdge:STMPE811_REG_GPIO_RE;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOFallingEdge:STMPE811_REG_GPIO_FE;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Touchscreen Register offsets (610 and 811 Only)'' | ||
+ | |- | ||
+ | | <code>ADCCtrl1:STMPE811_REG_ADC_CTRL1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ADCCtrl2:STMPE811_REG_ADC_CTRL2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCCtrl:STMPE811_REG_TSC_CTRL;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCCfg:STMPE811_REG_TSC_CFG;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FIFOThreshold:STMPE811_REG_FIFO_TH;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FIFOStatus:STMPE811_REG_FIFO_STA;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCDataXYZ:STMPE811_REG_TSC_DATA_XYZ;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCFractionZ:STMPE811_REG_TSC_FRACTION_Z;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCIDrive:STMPE811_REG_TSC_I_DRIVE );</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE801 Offsets'' | ||
+ | |- | ||
+ | |colspan="2"|<code>STMPE801Offsets:TSTMPEOffsets = (</code> | ||
+ | |- | ||
+ | |colspan="2"|''Control Register offsets'' | ||
+ | |- | ||
+ | | <code>SysCtrl:STMPE801_REG_SYS_CTRL;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntCtrl:STMPE801_REG_SYS_CTRL;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntEnable:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntStatus:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''GPIO Registers offsets'' | ||
+ | |- | ||
+ | | <code>GPIOIntEnable:STMPE801_REG_GPIO_INT_EN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOIntStatus:STMPE801_REG_GPIO_INT_STA;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinGet:STMPE801_REG_GPIO_MP_STA;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinSet:STMPE801_REG_GPIO_SET_PIN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinClr:STMPE801_REG_GPIO_SET_PIN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIODirSet:STMPE801_REG_GPIO_SET_DIR;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOFuncSet:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPullUp:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPullDown:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOEdgeDetect:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIORisingEdge:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOFallingEdge:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Touchscreen Register offsets (610 and 811 Only)'' | ||
+ | |- | ||
+ | | <code>ADCCtrl1:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ADCCtrl2:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCCtrl:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCCfg:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FIFOThreshold:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FIFOStatus:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCDataXYZ:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCFractionZ:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCIDrive:STMPE_REG_UNKNOWN );</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE1601 Offsets'' | ||
+ | |- | ||
+ | |colspan="2"|<code>STMPE1601Offsets:TSTMPEOffsets = (</code> | ||
+ | |- | ||
+ | |colspan="2"|''Control Register offsets'' | ||
+ | |- | ||
+ | | <code>SysCtrl:STMPE1601_REG_SYS_CTRL;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntCtrl:STMPE1601_REG_INT_CTRL_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntEnable:STMPE1601_REG_INT_EN_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntStatus:STMPE1601_REG_INT_STA_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''GPIO Registers offsets'' | ||
+ | |- | ||
+ | | <code>GPIOIntEnable:STMPE1601_REG_GPIO_INT_EN_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOIntStatus:STMPE1601_REG_GPIO_INT_STA_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinGet:STMPE1601_REG_GPIO_MP_STA_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinSet:STMPE1601_REG_GPIO_SET_PIN_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinClr:STMPE1601_REG_GPIO_CLR_PIN_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIODirSet:STMPE1601_REG_GPIO_SET_DIR_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOFuncSet:STMPE1601_REG_GPIO_AF_L_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPullUp:STMPE1601_REG_GPIO_PU_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPullDown:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOEdgeDetect:STMPE1601_REG_GPIO_ED_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIORisingEdge:STMPE1601_REG_GPIO_RE_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOFallingEdge:STMPE1601_REG_GPIO_FE_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Touchscreen Register offsets (610 and 811 Only)'' | ||
+ | |- | ||
+ | | <code>ADCCtrl1:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ADCCtrl2:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCCtrl:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCCfg:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FIFOThreshold:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FIFOStatus:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCDataXYZ:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCFractionZ:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCIDrive:STMPE_REG_UNKNOWN );</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE1801 Offsets'' | ||
+ | |- | ||
+ | |colspan="2"|<code>STMPE1801Offsets:TSTMPEOffsets = (</code> | ||
+ | |- | ||
+ | |colspan="2"|''Control Register offsets'' | ||
+ | |- | ||
+ | | <code>SysCtrl:STMPE1801_REG_SYS_CTRL;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntCtrl:STMPE1801_REG_INT_CTRL_LOW;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntEnable:STMPE1801_REG_INT_EN_LOW;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntStatus:STMPE1801_REG_INT_STA_LOW;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''GPIO Registers offsets'' | ||
+ | |- | ||
+ | | <code>GPIOIntEnable:STMPE1801_REG_GPIO_INT_EN_LOW;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOIntStatus:STMPE1801_REG_GPIO_INT_STA_LOW;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinGet:STMPE1801_REG_GPIO_MP_STA_LOW;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinSet:STMPE1801_REG_GPIO_SET_PIN_LOW;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinClr:STMPE1801_REG_GPIO_CLR_PIN_LOW;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIODirSet:STMPE1801_REG_GPIO_SET_DIR_LOW;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOFuncSet:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPullUp:STMPE1801_REG_GPIO_PULL_UP_LOW;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPullDown:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOEdgeDetect:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIORisingEdge:STMPE1801_REG_GPIO_RE_LOW;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOFallingEdge:STMPE1801_REG_GPIO_FE_LOW;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Touchscreen Register offsets (610 and 811 Only)'' | ||
+ | |- | ||
+ | | <code>ADCCtrl1:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ADCCtrl2:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCCtrl:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCCfg:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FIFOThreshold:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FIFOStatus:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCDataXYZ:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCFractionZ:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCIDrive:STMPE_REG_UNKNOWN );</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE2401/STMPE2403 Offsets'' | ||
+ | |- | ||
+ | |colspan="2"|<code>STMPE240XOffsets:TSTMPEOffsets = (</code> | ||
+ | |- | ||
+ | |colspan="2"|''Control Register offsets'' | ||
+ | |- | ||
+ | | <code>SysCtrl:STMPE240X_REG_SYS_CTRL;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntCtrl:STMPE240X_REG_INT_CTRL_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntEnable:STMPE240X_REG_INT_EN_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntStatus:STMPE240X_REG_INT_STA_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''GPIO Registers offsets'' | ||
+ | |- | ||
+ | | <code>GPIOIntEnable:STMPE240X_REG_GPIO_INT_EN_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOIntStatus:STMPE240X_REG_GPIO_INT_STA_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinGet:STMPE240X_REG_GPIO_MP_STA_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinSet:STMPE240X_REG_GPIO_SET_PIN_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinClr:STMPE240X_REG_GPIO_CLR_PIN_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIODirSet:STMPE240X_REG_GPIO_SET_DIR_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOFuncSet:STMPE240X_REG_GPIO_AF_L_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPullUp:STMPE240X_REG_GPIO_PULL_UP_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPullDown:STMPE240X_REG_GPIO_PULL_DN_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOEdgeDetect:STMPE240X_REG_GPIO_ED_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIORisingEdge:STMPE240X_REG_GPIO_RE_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOFallingEdge:STMPE240X_REG_GPIO_FE_LSB;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''Touchscreen Register offsets (610 and 811 Only)'' | ||
+ | |- | ||
+ | | <code>ADCCtrl1:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ADCCtrl2:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCCtrl:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCCfg:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FIFOThreshold:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FIFOStatus:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCDataXYZ:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCFractionZ:STMPE_REG_UNKNOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCIDrive:STMPE_REG_UNKNOWN );</code> | ||
+ | | | ||
|- | |- | ||
|} | |} | ||
Line 1,354: | Line 1,814: | ||
---- | ---- | ||
− | '' | + | |
+ | '''STMPE control''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PSTMPEControl = ^TSTMPEControl;</code> | ||
+ | |||
+ | <code>TSTMPEControl = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''General Properties'' | ||
+ | |- | ||
+ | | <code>Chip:LongWord;</code> | ||
+ | | The chip type (eg STMPE_CHIP_STMPE610) | ||
+ | |- | ||
+ | | <code>IRQ:TGPIOInfo;</code> | ||
+ | | The GPIO information for the IRQ line (Optional) | ||
+ | |- | ||
+ | |colspan="2"|''I2C Properties'' | ||
+ | |- | ||
+ | | <code>I2C:PI2CDevice;</code> | ||
+ | | The I2C device this device is connected to (Optional) | ||
+ | |- | ||
+ | | <code>Address:Word;</code> | ||
+ | | The I2C address of the device | ||
+ | |- | ||
+ | |colspan="2"|''SPI Properties'' | ||
+ | |- | ||
+ | | <code>SPI:PSPIDevice;</code> | ||
+ | | The SPI device this device is connected to (Optional) | ||
+ | |- | ||
+ | | <code>ChipSelect:Word;</code> | ||
+ | | The SPI chip select of the device | ||
+ | |- | ||
+ | |colspan="2"|''Register Properties'' | ||
+ | |- | ||
+ | | <code>RegMax:LongWord;</code> | ||
+ | | The maximum register address for read or write | ||
+ | |- | ||
+ | | <code>RegDir:LongWord;</code> | ||
+ | | The register address direction (Ascending/Descending) | ||
+ | |- | ||
+ | | <code>RegSize:LongWord;</code> | ||
+ | | The standard size of a register read or write | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''STMPE offsets''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PSTMPEOffsets = ^TSTMPEOffsets;</code> | ||
+ | |||
+ | <code>TSTMPEOffsets = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Control Register offsets'' | ||
+ | |- | ||
+ | | <code>SysCtrl:Byte;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>IntCtrl:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntEnable:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>IntStatus:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''GPIO Registers offsets'' | ||
+ | |- | ||
+ | | <code>GPIOIntEnable:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOIntStatus:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinGet:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinSet:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPinClr:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIODirSet:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOFuncSet:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPullUp:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOPullDown:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOEdgeDetect:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIORisingEdge:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>GPIOFallingEdge:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''Touchscreen Register offsets (610 and 811 Only)'' | ||
+ | |- | ||
+ | | <code>ADCCtrl1:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>ADCCtrl2:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCCtrl:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCCfg:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FIFOThreshold:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>FIFOStatus:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCDataXYZ:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCFractionZ:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TSCIDrive:Byte;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''STMPE GPIO''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PSTMPEGPIO = ^TSTMPEGPIO;</code> | ||
+ | |||
+ | <code>TSTMPEGPIO = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''GPIO Properties'' | ||
+ | |- | ||
+ | | <code>GPIO:TGPIODevice;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''STMPE Properties'' | ||
+ | |- | ||
+ | | <code>Control:TSTMPEControl;</code> | ||
+ | | The control information (Chip, I2C, SPI etc) for this device | ||
+ | |- | ||
+ | | <code>Offsets:TSTMPEOffsets;</code> | ||
+ | | The register offsets for this device | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''STMPE touch''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PSTMPETouch = ^TSTMPETouch;</code> | ||
+ | |||
+ | <code>TSTMPETouch = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Touch Properties'' | ||
+ | |- | ||
+ | | <code>Touch:TTouchDevice;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''General Properties'' | ||
+ | |- | ||
+ | | <code>MaxX:Word;</code> | ||
+ | | Maximum X value for this device | ||
+ | |- | ||
+ | | <code>MaxY:Word;</code> | ||
+ | | Maximum Y value for this device | ||
+ | |- | ||
+ | | <code>MaxZ:Word;</code> | ||
+ | | Maximum Z value for this device | ||
+ | |- | ||
+ | | <code>Width:Word;</code> | ||
+ | | Screen width for this device | ||
+ | |- | ||
+ | | <code>Height:Word;</code> | ||
+ | | Screen height for this device | ||
+ | |- | ||
+ | | <code>MaxPoints:LongWord;</code> | ||
+ | | Maximum touch points for this device | ||
+ | |- | ||
+ | |colspan="2"|''STMPE Properties'' | ||
+ | |- | ||
+ | | <code>Control:TSTMPEControl;</code> | ||
+ | | The control information (Chip, I2C, SPI etc) for this device | ||
+ | |- | ||
+ | | <code>Offsets:TSTMPEOffsets;</code> | ||
+ | | The register offsets for this device | ||
+ | |- | ||
+ | | <code>Timer:TTimerHandle;</code> | ||
+ | | Handle for touch release timer | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Public variables === | === Public variables === | ||
---- | ---- | ||
− | '' | + | |
+ | '''STMPE specific variables''' | ||
+ | |||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>STMPE_SAMPLE_TIME:Byte = 4;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>STMPE_MOD_12B:Byte = 1;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>STMPE_REF_SEL:Byte = 0;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>STMPE_ADC_FREQ:Byte = 2;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>STMPE_AVE_CTRL:Byte = 3;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>STMPE_TOUCH_DET_DELAY:Byte = 4;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>STMPE_SETTLING:Byte = 2;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>STMPE_FRACTION_Z:Byte = 7;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
+ | |- | ||
+ | | <code>STMPE_I_DRIVE:Byte = 0;</code> | ||
+ | | style="width: 40%;"| | ||
+ | |- | ||
+ | |} | ||
+ | <br /> | ||
=== Function declarations === | === Function declarations === | ||
Line 1,373: | Line 2,103: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Called internally by other functions | | Called internally by other functions | ||
|- | |- | ||
Line 1,388: | Line 2,118: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! I2C |
| The I2C device this STMPE610 is connected to (Optional) | | The I2C device this STMPE610 is connected to (Optional) | ||
|- | |- | ||
− | ! | + | ! SPI |
| The SPI device this STMPE610 is connected to (Optional) | | The SPI device this STMPE610 is connected to (Optional) | ||
|- | |- | ||
− | ! | + | ! Address |
| The I2C address for this STMPE610 (or I2C_ADDRESS_INVALID if SPI connected) | | 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) | | The SPI chip select for this STMPE610 (or SPI_CS_NONE if I2C connected) | ||
|- | |- | ||
− | ! | + | ! IRQ |
| The GPIO information for the IRQ line (Optional) | | The GPIO information for the IRQ line (Optional) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to the new GPIO device or nil on failure | | Pointer to the new GPIO device or nil on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| Either I2C or SPI must be specified but not both | | Either I2C or SPI must be specified but not both | ||
|- | |- | ||
Line 1,418: | Line 2,148: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! I2C |
| The I2C device this STMPE801 is connected to | | The I2C device this STMPE801 is connected to | ||
|- | |- | ||
− | ! | + | ! Address |
| The I2C address for this STMPE801 | | The I2C address for this STMPE801 | ||
|- | |- | ||
− | ! | + | ! IRQ |
| The GPIO information for the IRQ line (Optional) | | The GPIO information for the IRQ line (Optional) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to the new GPIO device or nil on failure | | Pointer to the new GPIO device or nil on failure | ||
|- | |- | ||
Line 1,439: | Line 2,169: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! I2C |
| The I2C device this STMPE811 is connected to (Optional) | | The I2C device this STMPE811 is connected to (Optional) | ||
|- | |- | ||
− | ! | + | ! SPI |
| The SPI device this STMPE811 is connected to (Optional) | | The SPI device this STMPE811 is connected to (Optional) | ||
|- | |- | ||
− | ! | + | ! Address |
| The I2C address for this STMPE811 (or I2C_ADDRESS_INVALID if SPI connected) | | 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) | | The SPI chip select for this STMPE811 (or SPI_CS_NONE if I2C connected) | ||
|- | |- | ||
− | ! | + | ! IRQ |
| The GPIO information for the IRQ line (Optional) | | The GPIO information for the IRQ line (Optional) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to the new GPIO device or nil on failure | | Pointer to the new GPIO device or nil on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| Either I2C or SPI must be specified but not both | | Either I2C or SPI must be specified but not both | ||
|- | |- | ||
Line 1,469: | Line 2,199: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! 2C |
| The I2C device this STMPE1601 is connected to | | The I2C device this STMPE1601 is connected to | ||
|- | |- | ||
− | ! | + | ! Address |
| The I2C address for this STMPE1601 | | The I2C address for this STMPE1601 | ||
|- | |- | ||
− | ! | + | ! IRQ |
| The GPIO information for the IRQ line (Optional) | | The GPIO information for the IRQ line (Optional) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to the new GPIO device or nil on failure | | Pointer to the new GPIO device or nil on failure | ||
|- | |- | ||
Line 1,490: | Line 2,220: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! I2C |
| The I2C device this STMPE1801 is connected to | | The I2C device this STMPE1801 is connected to | ||
|- | |- | ||
− | ! | + | ! Address |
| The I2C address for this STMPE1801 | | The I2C address for this STMPE1801 | ||
|- | |- | ||
− | ! | + | ! IRQ |
| The GPIO information for the IRQ line (Optional) | | The GPIO information for the IRQ line (Optional) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to the new GPIO device or nil on failure | | Pointer to the new GPIO device or nil on failure | ||
|- | |- | ||
Line 1,511: | Line 2,241: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! I2C |
| The I2C device this STMPE2401 is connected to | | The I2C device this STMPE2401 is connected to | ||
|- | |- | ||
− | ! | + | ! Address |
| The I2C address for this STMPE2401 | | The I2C address for this STMPE2401 | ||
|- | |- | ||
− | ! | + | ! IRQ |
| The GPIO information for the IRQ line (Optional) | | The GPIO information for the IRQ line (Optional) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to the new GPIO device or nil on failure | | Pointer to the new GPIO device or nil on failure | ||
|- | |- | ||
Line 1,532: | Line 2,262: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! GPIO |
| The GPIO device to destroy | | The GPIO device to destroy | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 1,547: | Line 2,277: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! I2C |
| The I2C device this STMPE610 is connected to (Optional) | | The I2C device this STMPE610 is connected to (Optional) | ||
|- | |- | ||
− | ! | + | ! SPI |
| The SPI device this STMPE610 is connected to (Optional) | | The SPI device this STMPE610 is connected to (Optional) | ||
|- | |- | ||
− | ! | + | ! Address |
| The I2C address for this STMPE610 (or I2C_ADDRESS_INVALID if SPI connected) | | 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) | | The SPI chip select for this STMPE610 (or SPI_CS_NONE if I2C connected) | ||
|- | |- | ||
− | ! | + | ! Width |
| The width of the screen in pixels | | The width of the screen in pixels | ||
|- | |- | ||
− | ! | + | ! Height |
| The height of the screen in pixels | | The height of the screen in pixels | ||
|- | |- | ||
− | ! | + | ! IRQ |
| The GPIO information for the IRQ line (Optional) | | The GPIO information for the IRQ line (Optional) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to the new Touch device or nil on failure | | Pointer to the new Touch device or nil on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| Either I2C or SPI must be specified but not both | | Either I2C or SPI must be specified but not both | ||
|- | |- | ||
Line 1,583: | Line 2,313: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! I2C |
| The I2C device this STMPE811 is connected to (Optional) | | The I2C device this STMPE811 is connected to (Optional) | ||
|- | |- | ||
− | ! | + | ! SPI |
| The SPI device this STMPE811 is connected to (Optional) | | The SPI device this STMPE811 is connected to (Optional) | ||
|- | |- | ||
− | ! | + | ! Address |
| The I2C address for this STMPE811 (or I2C_ADDRESS_INVALID if SPI connected) | | 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) | | The SPI chip select for this STMPE811 (or SPI_CS_NONE if I2C connected) | ||
|- | |- | ||
− | ! | + | ! Width |
| The width of the screen in pixels | | The width of the screen in pixels | ||
|- | |- | ||
− | ! | + | ! Height |
| The height of the screen in pixels | | The height of the screen in pixels | ||
|- | |- | ||
− | ! | + | ! IRQ |
| The GPIO information for the IRQ line (Optional) | | The GPIO information for the IRQ line (Optional) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to the new Touch device or nil on failure | | Pointer to the new Touch device or nil on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| Either I2C or SPI must be specified but not both | | Either I2C or SPI must be specified but not both | ||
|- | |- | ||
Line 1,619: | Line 2,349: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Touch |
| The Touch device to destroy | | The Touch device to destroy | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 1,637: | Line 2,367: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use GPIODeviceStart instead | + | | Not intended to be called directly by applications, use GPIODeviceStart instead. |
|- | |- | ||
|} | |} | ||
Line 1,649: | Line 2,379: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use GPIODeviceStop instead | + | | Not intended to be called directly by applications, use GPIODeviceStop instead. |
|- | |- | ||
|} | |} | ||
Line 1,661: | Line 2,391: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use GPIODeviceRead instead | + | | Not intended to be called directly by applications, use GPIODeviceRead instead. |
|- | |- | ||
|} | |} | ||
Line 1,673: | Line 2,403: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use GPIODeviceWrite instead | + | | Not intended to be called directly by applications, use GPIODeviceWrite instead. |
|- | |- | ||
|} | |} | ||
Line 1,685: | Line 2,415: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use GPIODeviceInputGet instead | + | | Not intended to be called directly by applications, use GPIODeviceInputGet instead. |
|- | |- | ||
|} | |} | ||
Line 1,697: | Line 2,427: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use GPIODeviceOutputSet instead | + | | Not intended to be called directly by applications, use GPIODeviceOutputSet instead. |
|- | |- | ||
|} | |} | ||
Line 1,709: | Line 2,439: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use GPIODevicePullGet instead | + | | Not intended to be called directly by applications, use GPIODevicePullGet instead. |
|- | |- | ||
|} | |} | ||
Line 1,721: | Line 2,451: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use GPIODevicePullSelect instead | + | | Not intended to be called directly by applications, use GPIODevicePullSelect instead. |
|- | |- | ||
|} | |} | ||
Line 1,733: | Line 2,463: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use GPIODeviceFunctionGet instead | + | | Not intended to be called directly by applications, use GPIODeviceFunctionGet instead. |
|- | |- | ||
|} | |} | ||
Line 1,745: | Line 2,475: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use GPIODeviceFunctionSelect instead | + | | Not intended to be called directly by applications, use GPIODeviceFunctionSelect instead. |
|- | |- | ||
|} | |} | ||
Line 1,760: | Line 2,490: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use TouchDeviceStart instead | + | | Not intended to be called directly by applications, use TouchDeviceStart instead. |
|- | |- | ||
|} | |} | ||
Line 1,772: | Line 2,502: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! ''' | + | ! Note |
− | | Not intended to be called directly by applications, use | + | | Not intended to be called directly by applications, use TouchDeviceStop instead. |
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function STMPETouchUpdate(Touch:PTouchDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of TouchDeviceUpdate API for STMPE</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, use TouchDeviceUpdate instead. | ||
|- | |- | ||
|} | |} | ||
Line 1,784: | Line 2,526: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Not intended to be called directly by applications | | Not intended to be called directly by applications | ||
|- | |- | ||
Line 1,796: | Line 2,538: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Not intended to be called directly by applications | | Not intended to be called directly by applications | ||
|- | |- | ||
Line 1,811: | Line 2,553: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,823: | Line 2,565: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,835: | Line 2,577: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,847: | Line 2,589: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,859: | Line 2,601: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,871: | Line 2,613: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,883: | Line 2,625: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,895: | Line 2,637: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- |
Latest revision as of 05:39, 13 September 2022
Return to Unit Reference
Contents
[hide]Description
ST Microelectronics STMPE Driver unit
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
STMPE*_*
STMPE_CHIP_*
STMPE_DIR_*
STMPE_I2C_*
STMPE_SPI_*
STMPE*_REG_*
STMPE*_CHIP_ID
STMPE*_SYS_CTRL*_*
STMPE*_TSC_CTRL_*
STMPE*_TSC_CFG_*
STMPE*_ADC_CTRL1_*
STMPE*_ADC_CTRL2_*
STMPE*_FIFO_STA_*
STMPE*_INT_CTRL_*
STMPE*_INT_EN_*
STMPE*_INT_STA_*
STMPE*Offsets*
Type definitions
STMPE control
STMPE offsets
STMPE GPIO
STMPE touch
Public variables
STMPE specific variables
STMPE_SAMPLE_TIME:Byte = 4;
|
STMPE_MOD_12B:Byte = 1;
|
STMPE_REF_SEL:Byte = 0;
|
STMPE_ADC_FREQ:Byte = 2;
|
STMPE_AVE_CTRL:Byte = 3;
|
STMPE_TOUCH_DET_DELAY:Byte = 4;
|
STMPE_SETTLING:Byte = 2;
|
STMPE_FRACTION_Z:Byte = 7;
|
STMPE_I_DRIVE:Byte = 0;
|
Function declarations
Initialization functions
STMPE functions
function STMPE610GPIOCreate(I2C:PI2CDevice; SPI:PSPIDevice; Address,ChipSelect:Word; IRQ:PGPIOInfo):PGPIODevice;
function STMPE801GPIOCreate(I2C:PI2CDevice; Address:Word; IRQ:PGPIOInfo):PGPIODevice;
function STMPE811GPIOCreate(I2C:PI2CDevice; SPI:PSPIDevice; Address,ChipSelect:Word; IRQ:PGPIOInfo):PGPIODevice;
function STMPE1601GPIOCreate(I2C:PI2CDevice; Address:Word; IRQ:PGPIOInfo):PGPIODevice;
function STMPE1801GPIOCreate(I2C:PI2CDevice; Address:Word; IRQ:PGPIOInfo):PGPIODevice;
function STMPE2401GPIOCreate(I2C:PI2CDevice; Address:Word; IRQ:PGPIOInfo):PGPIODevice;
function STMPEGPIODestroy(GPIO:PGPIODevice):LongWord;
function STMPE610TouchCreate(I2C:PI2CDevice; SPI:PSPIDevice; Address,ChipSelect:Word; Width,Height:LongWord; IRQ:PGPIOInfo):PTouchDevice;
function STMPE811TouchCreate(I2C:PI2CDevice; SPI:PSPIDevice; Address,ChipSelect:Word; Width,Height:LongWord; IRQ:PGPIOInfo):PTouchDevice;
function STMPETouchDestroy(Touch:PTouchDevice):LongWord;
STMPE GPIO functions
function STMPEGPIOStart(GPIO:PGPIODevice):LongWord;
function STMPEGPIOStop(GPIO:PGPIODevice):LongWord;
function STMPEGPIORead(GPIO:PGPIODevice; Reg:LongWord):LongWord;
procedure STMPEGPIOWrite(GPIO:PGPIODevice; Reg,Value:LongWord);
function STMPEGPIOInputGet(GPIO:PGPIODevice; Pin:LongWord):LongWord;
function STMPEGPIOOutputSet(GPIO:PGPIODevice; Pin,Level:LongWord):LongWord;
function STMPEGPIOPullGet(GPIO:PGPIODevice; Pin:LongWord):LongWord;
function STMPEGPIOPullSelect(GPIO:PGPIODevice; Pin,Mode:LongWord):LongWord;
function STMPEGPIOFunctionGet(GPIO:PGPIODevice; Pin:LongWord):LongWord;
function STMPEGPIOFunctionSelect(GPIO:PGPIODevice; Pin,Mode:LongWord):LongWord;
STMPE touch functions
function STMPETouchStart(Touch:PTouchDevice):LongWord;
function STMPETouchStop(Touch:PTouchDevice):LongWord;
function STMPETouchUpdate(Touch:PTouchDevice):LongWord;
procedure STMPETouchTimer(Touch:PSTMPETouch);
procedure STMPETouchCallback(Touch:PSTMPETouch; Pin,Trigger:LongWord);
STMPE helper functions
function STMPEReadByte(Control:PSTMPEControl; Reg:Byte; Value:PByte):LongWord;
function STMPEWriteByte(Control:PSTMPEControl; Reg,Value:Byte):LongWord;
function STMPEReadWord(Control:PSTMPEControl; Reg:Byte; Value:PWord):LongWord;
function STMPEWriteWord(Control:PSTMPEControl; Reg:Byte; Value:Word):LongWord;
function STMPEReadBytes(Control:PSTMPEControl; Reg,Len:Byte; Values:PByte):LongWord;
function STMPEWriteBytes(Control:PSTMPEControl; Reg,Len:Byte; Values:PByte):LongWord;
function STMPESetBits(Control:PSTMPEControl; Reg,Mask,Value:Byte):LongWord;
function STMPEResetFIFO(Control:PSTMPEControl; Reg:Byte):LongWord;
Return to Unit Reference