Difference between revisions of "Unit STMPE"
(19 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
=== Description === | === 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: | 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 26: | Line 28: | ||
---- | ---- | ||
− | ''To be | + | |
+ | <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 specific constants''' <code> STMPE*_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>STMPE610_GPIO_DESCRIPTION = 'STMicroelectronics STMPE610 I/O Expander';</code> | ||
+ | | Description of STMPE610 GPIO device | ||
+ | |- | ||
+ | | <code>STMPE801_GPIO_DESCRIPTION = 'STMicroelectronics STMPE801 I/O Expander';</code> | ||
+ | | Description of STMPE801 GPIO device | ||
+ | |- | ||
+ | | <code>STMPE811_GPIO_DESCRIPTION = 'STMicroelectronics STMPE811 I/O Expander';</code> | ||
+ | | Description of STMPE811 GPIO device | ||
+ | |- | ||
+ | | <code>STMPE1601_GPIO_DESCRIPTION = 'STMicroelectronics STMPE1601 I/O Expander';</code> | ||
+ | | Description of STMPE1601 GPIO device | ||
+ | |- | ||
+ | | <code>STMPE1801_GPIO_DESCRIPTION = 'STMicroelectronics STMPE1801 I/O Expander';</code> | ||
+ | | Description of STMPE1801 GPIO device | ||
+ | |- | ||
+ | | <code>STMPE2401_GPIO_DESCRIPTION = 'STMicroelectronics STMPE2401 I/O Expander';</code> | ||
+ | | Description of STMPE2401 GPIO device | ||
+ | |- | ||
+ | | <code>STMPE2403_GPIO_DESCRIPTION = 'STMicroelectronics STMPE2403 I/O Expander';</code> | ||
+ | | Description of STMPE2403 GPIO device | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE610_TOUCH_DESCRIPTION = 'STMicroelectronics STMPE610 Touch Controller';</code> | ||
+ | | Description of STMPE610 Touch device | ||
+ | |- | ||
+ | | <code>STMPE811_TOUCH_DESCRIPTION = 'STMicroelectronics STMPE811 Touch Controller';</code> | ||
+ | | Description of STMPE811 Touch device | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE610_GPIO_MIN_PIN = GPIO_PIN_2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE610_GPIO_MAX_PIN = GPIO_PIN_7;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE610_GPIO_PIN_COUNT = 6;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE801_GPIO_MIN_PIN = GPIO_PIN_0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE801_GPIO_MAX_PIN = GPIO_PIN_7;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE801_GPIO_PIN_COUNT = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE811_GPIO_MIN_PIN = GPIO_PIN_0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE811_GPIO_MAX_PIN = GPIO_PIN_7;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE811_GPIO_PIN_COUNT = 8;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE1601_GPIO_MIN_PIN = GPIO_PIN_0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1601_GPIO_MAX_PIN = GPIO_PIN_15;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1601_GPIO_PIN_COUNT = 16;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE1801_GPIO_MIN_PIN = GPIO_PIN_0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_GPIO_MAX_PIN = GPIO_PIN_17;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_GPIO_PIN_COUNT = 18;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE240X_GPIO_MIN_PIN = GPIO_PIN_0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_GPIO_MAX_PIN = GPIO_PIN_23;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_GPIO_PIN_COUNT = 24;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE_GPIO_MAX_LEVEL = GPIO_LEVEL_HIGH;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE_GPIO_MAX_PULL = GPIO_PULL_DOWN;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE610_GPIO_MIN_FUNCTION = GPIO_FUNCTION_IN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE610_GPIO_MAX_FUNCTION = GPIO_FUNCTION_ALT0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE610_GPIO_FUNCTION_COUNT = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE801_GPIO_MIN_FUNCTION = GPIO_FUNCTION_IN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE801_GPIO_MAX_FUNCTION = GPIO_FUNCTION_OUT;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE801_GPIO_FUNCTION_COUNT = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE811_GPIO_MIN_FUNCTION = GPIO_FUNCTION_IN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE811_GPIO_MAX_FUNCTION = GPIO_FUNCTION_ALT0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE811_GPIO_FUNCTION_COUNT = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE1601_GPIO_MIN_FUNCTION = GPIO_FUNCTION_IN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1601_GPIO_MAX_FUNCTION = GPIO_FUNCTION_ALT1;</code> | ||
+ | | Alternate function 0 = Keypad/Alternate function 1 = PWM | ||
+ | |- | ||
+ | | <code>STMPE1601_GPIO_FUNCTION_COUNT = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE1801_GPIO_MIN_FUNCTION = GPIO_FUNCTION_IN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_GPIO_MAX_FUNCTION = GPIO_FUNCTION_ALT0;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_GPIO_FUNCTION_COUNT = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE240X_GPIO_MIN_FUNCTION = GPIO_FUNCTION_IN;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_GPIO_MAX_FUNCTION = GPIO_FUNCTION_ALT2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_GPIO_FUNCTION_COUNT = 5;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE610_MAX_POINTS = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE610_MAX_X = $FFF;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE610_MAX_Y = $FFF;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE610_MAX_Z = $FF;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE811_MAX_POINTS = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE811_MAX_X = $FFF;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE811_MAX_Y = $FFF;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE811_MAX_Z = $FF;</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 chip''' <code> STMPE_CHIP_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>STMPE_CHIP_STMPE610 = 1;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>STMPE_CHIP_STMPE801 = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE_CHIP_STMPE811 = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE_CHIP_STMPE1601 = 4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE_CHIP_STMPE1801 = 5;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE_CHIP_STMPE2401 = 6;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE_CHIP_STMPE2403 = 7;</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 direction''' <code> STMPE_DIR_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>STMPE_DIR_ASCENDING = 0;</code> | ||
+ | | Register addresses in ascending order (Bits go from LSB to MSB) | ||
+ | |- | ||
+ | | <code>STMPE_DIR_DESCENDING = 1;</code> | ||
+ | | Register addresses in descending order (Bits go from MSB to LSB) | ||
+ | |- | ||
+ | |} | ||
+ | </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 I2C''' <code> STMPE_I2C_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>STMPE_I2C_RATE = 400000;</code> | ||
+ | | Default I2C clock rate (Device supports 100KHz and 400KHz) | ||
+ | |- | ||
+ | |} | ||
+ | </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 SPI''' <code> STMPE_SPI_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>STMPE_SPI_RATE = 500000;</code> | ||
+ | | Default SPI clock rate (Device supports up to 1MHz) | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE_SPI_READ_CMD = (1 shl 7);</code> | ||
+ | | First bit of address must be set for a read | ||
+ | |- | ||
+ | |} | ||
+ | </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 register''' <code> STMPE*_REG_* </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'' | ||
+ | |- | ||
+ | | <code>STMPE811_REG_CHIP_ID = $00;</code> | ||
+ | | Device identification | ||
+ | |- | ||
+ | | <code>STMPE811_REG_ID_VER = $02;</code> | ||
+ | | Revision number (0x01 for engineering sample/0x03 for final silicon) | ||
+ | |- | ||
+ | | <code>STMPE811_REG_SYS_CTRL1 = $03;</code> | ||
+ | | Reset control | ||
+ | |- | ||
+ | | <code>STMPE811_REG_SYS_CTRL2 = $04;</code> | ||
+ | | Clock control | ||
+ | |- | ||
+ | | <code>STMPE811_REG_SPI_CFG = $08;</code> | ||
+ | | SPI interface configuration | ||
+ | |- | ||
+ | | <code>STMPE811_REG_INT_CTRL = $09;</code> | ||
+ | | Interrupt control register | ||
+ | |- | ||
+ | | <code>STMPE811_REG_INT_EN = $0A;</code> | ||
+ | | Interrupt enable register | ||
+ | |- | ||
+ | | <code>STMPE811_REG_INT_STA = $0B;</code> | ||
+ | | Interrupt status register | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE811_REG_GPIO_INT_EN = $0C;</code> | ||
+ | | GPIO interrupt enable register | ||
+ | |- | ||
+ | | <code>STMPE811_REG_GPIO_INT_STA = $0D;</code> | ||
+ | | GPIO interrupt status register | ||
+ | |- | ||
+ | | <code>STMPE811_REG_ADC_INT_EN = $0E;</code> | ||
+ | | ADC interrupt enable register | ||
+ | |- | ||
+ | | <code>STMPE811_REG_ADC_INT_STA = $0F;</code> | ||
+ | | ADC interrupt status register | ||
+ | |- | ||
+ | | <code>STMPE811_REG_GPIO_SET_PIN = $10;</code> | ||
+ | | GPIO set pin register | ||
+ | |- | ||
+ | | <code>STMPE811_REG_GPIO_CLR_PIN = $11;</code> | ||
+ | | GPIO clear pin register | ||
+ | |- | ||
+ | | <code>STMPE811_REG_GPIO_MP_STA = $12;</code> | ||
+ | | GPIO monitor pin state register | ||
+ | |- | ||
+ | | <code>STMPE811_REG_GPIO_SET_DIR = $13;</code> | ||
+ | | GPIO direction register | ||
+ | |- | ||
+ | | <code>STMPE811_REG_GPIO_ED = $14;</code> | ||
+ | | GPIO edge detect register | ||
+ | |- | ||
+ | | <code>STMPE811_REG_GPIO_RE = $15;</code> | ||
+ | | GPIO rising edge register | ||
+ | |- | ||
+ | | <code>STMPE811_REG_GPIO_FE = $16;</code> | ||
+ | | GPIO falling edge register | ||
+ | |- | ||
+ | | <code>STMPE811_REG_GPIO_AF = $17;</code> | ||
+ | | Alternate function register | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE811_REG_ADC_CTRL1 = $20;</code> | ||
+ | | ADC control | ||
+ | |- | ||
+ | | <code>STMPE811_REG_ADC_CTRL2 = $21;</code> | ||
+ | | ADC control | ||
+ | |- | ||
+ | | <code>STMPE811_REG_ADC_CAPT = $22;</code> | ||
+ | | To initiate ADC data acquisition | ||
+ | |- | ||
+ | | <code>STMPE811_REG_ADC_DATA_CH0 = $30;</code> | ||
+ | | ADC channel 0 | ||
+ | |- | ||
+ | | <code>STMPE811_REG_ADC_DATA_CH1 = $32;</code> | ||
+ | | ADC channel 1 | ||
+ | |- | ||
+ | | <code>STMPE811_REG_ADC_DATA_CH2 = $34;</code> | ||
+ | | ADC channel 2 | ||
+ | |- | ||
+ | | <code>STMPE811_REG_ADC_DATA_CH3 = $36;</code> | ||
+ | | ADC channel 3 | ||
+ | |- | ||
+ | | <code>STMPE811_REG_ADC_DATA_CH4 = $38;</code> | ||
+ | | ADC channel 4 | ||
+ | |- | ||
+ | | <code>STMPE811_REG_ADC_DATA_CH5 = $3A;</code> | ||
+ | | ADC channel 5 | ||
+ | |- | ||
+ | | <code>STMPE811_REG_ADC_DATA_CH6 = $3C;</code> | ||
+ | | ADC channel 6 | ||
+ | |- | ||
+ | | <code>STMPE811_REG_ADC_DATA_CH7 = $3E;</code> | ||
+ | | ADC channel 7 | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE811_REG_TSC_CTRL = $40;</code> | ||
+ | | 4-wire touchscreen controller setup | ||
+ | |- | ||
+ | | <code>STMPE811_REG_TSC_CFG = $41;</code> | ||
+ | | Touchscreen controller configuration | ||
+ | |- | ||
+ | | <code>STMPE811_REG_WDW_TR_X = $42;</code> | ||
+ | | Window setup for top right X | ||
+ | |- | ||
+ | | <code>STMPE811_REG_WDW_TR_Y = $44;</code> | ||
+ | | Window setup for top right Y | ||
+ | |- | ||
+ | | <code>STMPE811_REG_WDW_BL_X = $46;</code> | ||
+ | | Window setup for bottom left X | ||
+ | |- | ||
+ | | <code>STMPE811_REG_WDW_BL_Y = $48;</code> | ||
+ | | Window setup for bottom left Y | ||
+ | |- | ||
+ | | <code>STMPE811_REG_FIFO_TH = $4A;</code> | ||
+ | | FIFO level to generate interrupt | ||
+ | |- | ||
+ | | <code>STMPE811_REG_FIFO_STA = $4B;</code> | ||
+ | | Current status of FIFO | ||
+ | |- | ||
+ | | <code>STMPE811_REG_FIFO_SIZE = $4C;</code> | ||
+ | | Current filled level of FIFO | ||
+ | |- | ||
+ | | <code>STMPE811_REG_TSC_DATA_X = $4D;</code> | ||
+ | | Data port for touchscreen controller data access | ||
+ | |- | ||
+ | | <code>STMPE811_REG_TSC_DATA_Y = $4F;</code> | ||
+ | | Data port for touchscreen controller data access | ||
+ | |- | ||
+ | | <code>STMPE811_REG_TSC_DATA_Z = $51;</code> | ||
+ | | Data port for touchscreen controller data access | ||
+ | |- | ||
+ | | <code>STMPE811_REG_TSC_DATA_XYZ = $52;</code> | ||
+ | | Data port for touchscreen controller data access | ||
+ | |- | ||
+ | | <code>STMPE811_REG_TSC_FRACTION_Z = $56;</code> | ||
+ | | Touchscreen controller FRACTION_Z | ||
+ | |- | ||
+ | | <code>STMPE811_REG_TSC_DATA = $57;</code> | ||
+ | | Data port for touchscreen controller data access | ||
+ | |- | ||
+ | | <code>STMPE811_REG_TSC_I_DRIVE = $58;</code> | ||
+ | | Touchscreen controller drive I | ||
+ | |- | ||
+ | | <code>STMPE811_REG_TSC_SHIELD = $59;</code> | ||
+ | | Touchscreen controller shield | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE811'' | ||
+ | |- | ||
+ | | <code>STMPE811_REG_TEMP_CTRL= $60;</code> | ||
+ | | Temperature sensor setup | ||
+ | |- | ||
+ | | <code>STMPE811_REG_TEMP_DATA = $61;</code> | ||
+ | | Temperature data access port | ||
+ | |- | ||
+ | | <code>STMPE811_REG_TEMP_TH = $62;</code> | ||
+ | | Threshold for temperature controlled interrupt | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE811_REG_MAX = $62;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE811_REG_SIZE = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE801'' | ||
+ | |- | ||
+ | | <code>STMPE801_REG_CHIP_ID = $00;</code> | ||
+ | | Device identification | ||
+ | |- | ||
+ | | <code>STMPE801_REG_ID_VER = $02;</code> | ||
+ | | Revision number (0x01 for engineering sample/0x02 for final silicon) | ||
+ | |- | ||
+ | | <code>STMPE801_REG_SYS_CTRL = $04;</code> | ||
+ | | Reset and interrupt control | ||
+ | |- | ||
+ | | <code>STMPE801_REG_GPIO_INT_EN = $08;</code> | ||
+ | | GPIO interrupt enable register | ||
+ | |- | ||
+ | | <code>STMPE801_REG_GPIO_INT_STA = $09;</code> | ||
+ | | GPIO interrupt status register | ||
+ | |- | ||
+ | | <code>STMPE801_REG_GPIO_MP_STA = $10;</code> | ||
+ | | GPIO monitor pin state register | ||
+ | |- | ||
+ | | <code>STMPE801_REG_GPIO_SET_PIN = $11;</code> | ||
+ | | GPIO set pin state register | ||
+ | |- | ||
+ | | <code>STMPE801_REG_GPIO_SET_DIR = $12;</code> | ||
+ | | GPIO set pin direction register | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE801_REG_MAX = $12;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE801_REG_SIZE = 1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE1601'' | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_CHIP_ID = $80;</code> | ||
+ | | Device identification | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_ID_VER = $81;</code> | ||
+ | | Revision number | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_SYS_CTRL = $02;</code> | ||
+ | | System control register | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_SYS_CTRL2 = $03;</code> | ||
+ | | System control register 2 | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_INT_CTRL_MSB = $10;</code> | ||
+ | | Interrupt control register | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_INT_CTRL_LSB = $11;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_INT_EN_MSB = $12;</code> | ||
+ | | Interrupt enable mask register | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_INT_EN_LSB = $13;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_INT_STA_MSB = $14;</code> | ||
+ | | Interrupt status register | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_INT_STA_LSB = $15;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_INT_EN_MSB = $16;</code> | ||
+ | | Interrupt enable GPIO mask register | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_INT_EN_LSB = $17;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_INT_STA_MSB = $18;</code> | ||
+ | | Interrupt status GPIO register | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_INT_STA_LSB = $19;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_SET_PIN_MSB = $82;</code> | ||
+ | | GPIO set pin state register | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_SET_PIN_LSB = $83;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_CLR_PIN_MSB = $84;</code> | ||
+ | | GPIO clear pin state register | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_CLR_PIN_LSB = $85; </code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_MP_STA_MSB = $86;</code> | ||
+ | | GPIO monitor pin state register | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_MP_STA_LSB = $87;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_SET_DIR_MSB = $88;</code> | ||
+ | | GPIO set pin direction register | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_SET_DIR_LSB = $89;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_ED_MSB = $8A;</code> | ||
+ | | GPIO edge detect status register | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_ED_LSB = $8B;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_RE_MSB = $8C;</code> | ||
+ | | GPIO rising edge register | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_RE_LSB = $8D;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_FE_MSB = $8E;</code> | ||
+ | | GPIO falling edge register | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_FE_LSB = $8F;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_PU_MSB = $90;</code> | ||
+ | | GPIO pull up register | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_PU_LSB = $91;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_AF_U_MSB = $92;</code> | ||
+ | | GPIO alternate function register (upper word) | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_AF_U_LSB = $93;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_AF_L_MSB = $94;</code> | ||
+ | | GPIO alternate function register (lower word) | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_AF_L_LSB = $95;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_LT_EN = $96;</code> | ||
+ | | GPIO level translator enable | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_GPIO_LT_DIR = $97;</code> | ||
+ | | GPIO level translator direction | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_MAX = $BF;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1601_REG_SIZE = 2;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE1801'' | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_CHIP_ID = $00;</code> | ||
+ | | Device identification | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_ID_VER = $01;</code> | ||
+ | | Revision number | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_SYS_CTRL = $02;</code> | ||
+ | | System control | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_INT_CTRL_LOW = $04;</code> | ||
+ | | Interrupt control | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_INT_CTRL_HIGH = $05;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_INT_EN_LOW = $06;</code> | ||
+ | | Interrupt enable mask | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_INT_EN_HIGH = $07;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_INT_STA_LOW = $08;</code> | ||
+ | | Interrupt status | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_INT_STA_HIGH = $09;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_INT_EN_LOW = $0A;</code> | ||
+ | | Interrupt enable GPIO mask | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_INT_EN_MID = $0B;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_INT_EN_HIGH = $0C;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_INT_STA_LOW = $0D;</code> | ||
+ | | Interrupt status GPIO | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_INT_STA_MID = $0E;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_INT_STA_HIGH = $0F;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_SET_PIN_LOW = $10;</code> | ||
+ | | GPIO set pin state | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_SET_PIN_MID = $11;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_SET_PIN_HIGH = $12 </code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_CLR_PIN_LOW = $13;</code> | ||
+ | | GPIO clear pin state | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_CLR_PIN_MID = $14;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_CLR_PIN_HIGH = $15;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_MP_STA_LOW = $16;</code> | ||
+ | | GPIO monitor pin state | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_MP_STA_MID = $17;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_MP_STA_HIGH = $18;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_SET_DIR_LOW = $19;</code> | ||
+ | | GPIO set pin direction register | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_SET_DIR_MID = $1A;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_SET_DIR_HIGH = $1B;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_RE_LOW = $1C;</code> | ||
+ | | GPIO rising edge | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_RE_MID = $1D;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_RE_HIGH = $1E;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_FE_LOW = $1F;</code> | ||
+ | | GPIO falling edge | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_FE_MID = $20;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_FE_HIGH = $21;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_PULL_UP_LOW = $22;</code> | ||
+ | | GPIO pull up | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_PULL_UP_MID = $23;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_GPIO_PULL_UP_HIGH = $24;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_KPC_ROW = $30;</code> | ||
+ | | Keypad row scanning | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_KPC_COL_LOW = $31;</code> | ||
+ | | Keypad column scanning | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_KPC_COL_HIGH = $32;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_KPC_CTRL_LOW = $33;</code> | ||
+ | | Key config: Scan count and dedicated key | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_KPC_CTRL_MID = $34;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_KPC_CTRL_HIGH = $35;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_KPC_CMD = $36;</code> | ||
+ | | Keypad command | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_KPC_COMB_KEY_0 = $37;</code> | ||
+ | | Keypad combination key mask | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_KPC_COMB_KEY_1 = $38;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_KPC_COMB_KEY_2 = $39;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_KPC_DATA_BYTE0 = $3A;</code> | ||
+ | | Keypad data | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_KPC_DATA_BYTE1 = $3B;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_KPC_DATA_BYTE2 = $3C;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_KPC_DATA_BYTE3 = $3D;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_KPC_DATA_BYTE4 = $3E;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_MAX = $3E;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE1801_REG_SIZE = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE2401/STMPE2403'' | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_CHIP_ID = $80;</code> | ||
+ | | Device identification | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_ID_VER = $81;</code> | ||
+ | | Revision number | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_SYS_CTRL = $02;</code> | ||
+ | | System control register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_INT_CTRL_MSB = $10;</code> | ||
+ | | Interrupt Control Register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_INT_CTRL_LSB = $11;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_INT_EN_MSB = $12;</code> | ||
+ | | Interrupt Enable Mask Register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_INT_EN_LSB = $13;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_INT_STA_MSB = $14;</code> | ||
+ | | Interrupt Status Register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_INT_STA_LSB = $15;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_INT_EN_MSB = $16;</code> | ||
+ | | Interrupt Enable GPIO Mask Register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_INT_EN_MID = $17;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_INT_EN_LSB = $18;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_INT_STA_MSB = $19;</code> | ||
+ | | Interrupt Status GPIO Register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_INT_STA_MID = $1A;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_INT_STA_LSB = $1B;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_MP_STA_MSB = $A2;</code> | ||
+ | | GPIO Monitor Pin State Register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_MP_STA_MID = $A3;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_MP_STA_LSB = $A4;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_SET_PIN_MSB = $83;</code> | ||
+ | | GPIO Set Pin State Register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_SET_PIN_MID = $84;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_SET_PIN_LSB = $85;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_CLR_PIN_MSB = $86;</code> | ||
+ | | GPIO Clear Pin State Register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_CLR_PIN_MID = $87;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_CLR_PIN_LSB = $88;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_SET_DIR_MSB = $89;</code> | ||
+ | | GPIO Set Pin Direction Register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_SET_DIR_MID = $8A;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_SET_DIR_LSB = $8B;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_ED_MSB = $8C;</code> | ||
+ | | GPIO Edge Detect Status Register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_ED_MID = $8D;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_ED_LSB = $8E;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_RE_MSB = $8F;</code> | ||
+ | | GPIO Rising Edge Register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_RE_MID = $90;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_RE_LSB = $91;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_FE_MSB = $92;</code> | ||
+ | | GPIO Falling Edge Register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_FE_MID = $93;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_FE_LSB = $94;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_PULL_UP_MSB = $95;</code> | ||
+ | | GPIO Pull Up Register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_PULL_UP_MID = $96;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_PULL_UP_LSB = $97;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_PULL_DN_MSB = $98;</code> | ||
+ | | GPIO Pull Down Register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_PULL_DN_MID = $99;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_PULL_DN_LSB = $9A;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_AF_U_MSB = $9B;</code> | ||
+ | | GPIO Alternate Function Register (Upper Bit) | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_AF_U_MID = $9C;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_AF_U_LSB = $9D;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_AF_L_MSB = $9E;</code> | ||
+ | | GPIO Alternate Function Register(Lower Bit) | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_AF_L_MID = $9F;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_GPIO_AF_L_LSB = $A0;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_PWMCS = $30;</code> | ||
+ | | PWM Control and Status register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_PWMIC0 = $38;</code> | ||
+ | | PWM instructions are initialized through this data port | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_PWMIC1 = $39;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_PWMIC2 = $3A;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_KPC_COL = $60;</code> | ||
+ | | Keypad column scanning register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_KPC_ROW_MSB = $61;</code> | ||
+ | | Keypad row scanning register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_KPC_ROW_LSB = $62;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_KPC_CTRL_MSB = $63;</code> | ||
+ | | Keypad control register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_KPC_CTRL_LSB = $64;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_KPC_DATA_BYTE0 = $68;</code> | ||
+ | | Keypad data register | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_KPC_DATA_BYTE1 = $69;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_KPC_DATA_BYTE2 = $6A;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_MAX = $BF;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>STMPE240X_REG_SIZE = 3;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>STMPE_REG_UNKNOWN = $FF;</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 Id''' <code> STMPE*_CHIP_ID </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'' | ||
+ | |- | ||
+ | | <code>STMPE811_CHIP_ID = $0811;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE801'' | ||
+ | |- | ||
+ | | <code>STMPE801_CHIP_ID = $0801;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE1601'' | ||
+ | |- | ||
+ | | <code>STMPE1601_CHIP_ID = $02;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE1801'' | ||
+ | |- | ||
+ | | <code>STMPE1801_CHIP_ID = $C1;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE2401/STMPE2403'' | ||
+ | |- | ||
+ | | <code>STMPE240X_CHIP_ID = $01;</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 system control''' <code> STMPE*_SYS_CTRL*_* </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'' | ||
+ | |- | ||
+ | | <code>STMPE811_SYS_CTRL2_TS_OFF = (1 shl 3);</code> | ||
+ | | 1: Switches off the clock supply to the temperature sensor | ||
+ | |- | ||
+ | | <code>STMPE811_SYS_CTRL2_GPIO_OFF (1 shl 2);</code> | ||
+ | | 1: Switches off the clock supply to the GPIO | ||
+ | |- | ||
+ | | <code>STMPE811_SYS_CTRL2_TSC_OFF = (1 shl 1);</code> | ||
+ | | 1: Switches off the clock supply to the touchscreen controller | ||
+ | |- | ||
+ | | <code>STMPE811_SYS_CTRL2_ADC_OFF = (1 shl 0);</code> | ||
+ | | 1: Switches off the clock supply to the ADC | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE801'' | ||
+ | |- | ||
+ | | <code>STMPE801_SYS_CTRL_RESET = (1 shl 7);</code> | ||
+ | | Writing 1 to this bit causes a soft reset. | ||
+ | |- | ||
+ | | <code>STMPE801_SYS_CTRL_INT_EN = (1 shl 2);</code> | ||
+ | | INT Enable 1 to enable, 0 to disable INT output. | ||
+ | |- | ||
+ | | <code>STMPE801_SYS_CTRL_INT_HI = (1 shl 0);</code> | ||
+ | | INT Polarity 1 for active HI, 0 for active LOW. | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE1601'' | ||
+ | |- | ||
+ | | <code>STMPE1601_SYS_CTRL_RESET = (1 shl 7);</code> | ||
+ | | Writing a 1 to this bit will do a soft reset of the device. Once the reset is done, this bit will be cleared to 0 by the HW. | ||
+ | |- | ||
+ | | <code>STMPE1601_SYS_CTRL_ENABLE_GPIO = (1 shl 3);</code> | ||
+ | | Writing a 0 to this bit will gate off the clock to the GPIO module, thus stopping its operation. | ||
+ | |- | ||
+ | | <code>STMPE1601_SYS_CTRL_ENABLE_KPC = (1 shl 1);</code> | ||
+ | | Writing a 0 to this bit will gate off the clock to the keypad controller module, thus stopping its operation. | ||
+ | |- | ||
+ | | <code>STMPE1601_SYS_CTRL_ENABLE_SPWM = (1 shl 0);</code> | ||
+ | | Writing a 0 to this bit will gate off the clock to the simple PWM controller module, thus stopping its operation. | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE1801'' | ||
+ | |- | ||
+ | | <code>STMPE1801_SYS_CTRL_RESET = (1 shl 7);</code> | ||
+ | | Writing a 1 to this bit will do a soft reset of the device. Once the reset is done, this bit will be cleared to 0 by the HW. | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|''STMPE240X'' | ||
+ | |- | ||
+ | | <code>STMPE240X_SYS_CTRL_RESET = (1 shl 7);</code> | ||
+ | | Writing a 1 to this bit will do a soft reset of the device. Once the reset is done, this bit will be cleared to 0 by the HW. | ||
+ | |- | ||
+ | | <code>STMPE240X_SYS_CTRL_ENABLE_GPIO = (1 shl 3);</code> | ||
+ | | Writing a 0 to this bit will gate off the clock to the GPIO module, thus stopping its operation. | ||
+ | |- | ||
+ | | <code>STMPE240X_SYS_CTRL_ENABLE_PWM = (1 shl 2);</code> | ||
+ | | Writing a 0 to this bit will gate off the clock to the PWM module, thus stopping its operation. | ||
+ | |- | ||
+ | | <code>STMPE240X_SYS_CTRL_ENABLE_KPC = (1 shl 1);</code> | ||
+ | | Writing a 0 to this bit will gate off the clock to the Keypad Controller module, thus stopping its operation. | ||
+ | |- | ||
+ | | <code>STMPE240X_SYS_CTRL_ENABLE_ROT = (1 shl 0);</code> | ||
+ | | Writing a 0 to this bit will gate off the clock to the Rotator module, thus stopping its operation. | ||
+ | |- | ||
+ | |} | ||
+ | </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 touchscreen control''' <code> STMPE*_TSC_CTRL_* </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'' | ||
+ | |- | ||
+ | | <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) | ||
+ | |- | ||
+ | | <code>STMPE811_TSC_CTRL_TRACK_MASK = (7 shl 4);</code> | ||
+ | | TRACK: Tracking index | ||
+ | |- | ||
+ | | <code>STMPE811_TSC_CTRL_OPMODE_XYZ = (0 shl 1);</code> | ||
+ | | OP_MOD: TSC operating mode: X, Y, Z acquisition | ||
+ | |- | ||
+ | | <code>STMPE811_TSC_CTRL_OPMODE_XY = (1 shl 1);</code> | ||
+ | | OP_MOD: TSC operating mode: X, Y only | ||
+ | |- | ||
+ | | <code>STMPE811_TSC_CTRL_OPMODE_X = (2 shl 1);</code> | ||
+ | | OP_MOD: TSC operating mode: X only | ||
+ | |- | ||
+ | | <code>STMPE811_TSC_CTRL_OPMODE_Y = (3 shl 1);</code> | ||
+ | | OP_MOD: TSC operating mode: Y only | ||
+ | |- | ||
+ | | <code>STMPE811_TSC_CTRL_OPMODE_Z = (4 shl 1);</code> | ||
+ | | OP_MOD: TSC operating mode: Z only | ||
+ | |- | ||
+ | | <code>STMPE811_TSC_CTRL_TSC_EN = (1 shl 0);</code> | ||
+ | | Enable TSC | ||
+ | |- | ||
+ | |} | ||
+ | </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 touchscreen configuration''' <code> STMPE*_TSC_CFG_* </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'' | ||
+ | |- | ||
+ | | <code>STMPE811_TSC_CFG_AVE_CTRL_1 = (0 shl 6);</code> | ||
+ | | AVE_CTRL: Average control: 1 sample | ||
+ | |- | ||
+ | | <code>STMPE811_TSC_CFG_AVE_CTRL_2 = (1 shl 6);</code> | ||
+ | | AVE_CTRL: Average control: 2 samples | ||
+ | |- | ||
+ | | <code>STMPE811_TSC_CFG_AVE_CTRL_4 = (2 shl 6);</code> | ||
+ | | AVE_CTRL: Average control: 4 samples | ||
+ | |- | ||
+ | | <code>STMPE811_TSC_CFG_AVE_CTRL_8 = (3 shl 6);</code> | ||
+ | | AVE_CTRL: Average control: 8 samples | ||
+ | |- | ||
+ | | <code>STMPE811_TSC_CFG_TOUCH_DET_DELAY_MASK = (7 shl 3);</code> | ||
+ | | TOUCH_DET_DELAY: Touch detect delay | ||
+ | |- | ||
+ | | <code>STMPE811_TSC_CFG_SETTLING_MASK = (7 shl 0);</code> | ||
+ | | SETTLING: Panel driver settling time | ||
+ | |- | ||
+ | |} | ||
+ | </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 ADC control 1''' <code> STMPE*_ADC_CTRL1_* </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'' | ||
+ | |- | ||
+ | | <code>STMPE811_ADC_CTRL1_SAMPLE_TIME_MASK = (7 shl 4);</code> | ||
+ | | SAMPLE_TIMEn: ADC conversion time in number of clock | ||
+ | |- | ||
+ | | <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) | ||
+ | |- | ||
+ | | <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) | ||
+ | |- | ||
+ | |} | ||
+ | </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 ADC control 2''' <code> STMPE*_ADC_CTRL2_* </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'' | ||
+ | |- | ||
+ | | <code>STMPE811_ADC_CTRL2_ADC_FREQ_MASK = (3 shl 0);</code> | ||
+ | | ADC_FREQ: Selects the clock speed of ADC | ||
+ | |- | ||
+ | |} | ||
+ | </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 FIFO control and status''' <code> STMPE*_FIFO_STA_* </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'' | ||
+ | |- | ||
+ | | <code>STMPE811_FIFO_STA_RESET = (1 shl 0);</code> | ||
+ | | FIFO Reset (Write 0 : FIFO put out of reset mode/Write 1 : Resets FIFO. All data in FIFO will be cleared) | ||
+ | |- | ||
+ | |} | ||
+ | </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 interrupt control''' <code> STMPE*_INT_CTRL_* </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'' | ||
+ | |- | ||
+ | | <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) | ||
+ | |- | ||
+ | | <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) | ||
+ | |- | ||
+ | | <code>STMPE811_INT_CTRL_GLOBAL = (1 shl 0);</code> | ||
+ | | This is master enable for the interrupt system (1: Global interrupt/0: Stops all interrupts) | ||
+ | |- | ||
+ | |} | ||
+ | </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 interrupt enable''' <code> STMPE*_INT_EN_* </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'' | ||
+ | |- | ||
+ | | <code>STMPE811_INT_EN_GPIO = (1 shl 7);</code> | ||
+ | | GPIO: Any enabled GPIO interrupts | ||
+ | |- | ||
+ | | <code>STMPE811_INT_EN_ADC = (1 shl 6);</code> | ||
+ | | ADC: Any enabled ADC interrupts | ||
+ | |- | ||
+ | | <code>STMPE811_INT_EN_TEMP_SENS = (1 shl 5);</code> | ||
+ | | TEMP_SENS: Temperature threshold triggering | ||
+ | |- | ||
+ | | <code>STMPE811_INT_EN_FIFO_EMPTY = (1 shl 4);</code> | ||
+ | | FIFO_EMPTY: FIFO is empty | ||
+ | |- | ||
+ | | <code>STMPE811_INT_EN_FIFO_FULL = (1 shl 3);</code> | ||
+ | | FIFO_FULL: FIFO is full | ||
+ | |- | ||
+ | | <code>STMPE811_INT_EN_FIFO_OFLOW = (1 shl 2);</code> | ||
+ | | FIFO_OFLOW: FIFO is overflowed | ||
+ | |- | ||
+ | | <code>STMPE811_INT_EN_FIFO_TH = (1 shl 1);</code> | ||
+ | | FIFO_TH: FIFO is equal or above threshold value | ||
+ | |- | ||
+ | | <code>STMPE811_INT_EN_TOUCH_DET = (1 shl 0);</code> | ||
+ | | TOUCH_DET: Touch is detected | ||
+ | |- | ||
+ | |} | ||
+ | </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 interrupt status''' <code> STMPE*_INT_STA_* </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'' | ||
+ | |- | ||
+ | | <code>STMPE811_INT_STA_GPIO = (1 shl 7);</code> | ||
+ | | GPIO: Any enabled GPIO interrupts | ||
+ | |- | ||
+ | | <code>STMPE811_INT_STA_ADC = (1 shl 6);</code> | ||
+ | | ADC: Any enabled ADC interrupts | ||
+ | |- | ||
+ | | <code>STMPE811_INT_STA_TEMP_SENS = (1 shl 5);</code> | ||
+ | | TEMP_SENS: Temperature threshold triggering | ||
+ | |- | ||
+ | | <code>STMPE811_INT_STA_FIFO_EMPTY = (1 shl 4);</code> | ||
+ | | FIFO_EMPTY: FIFO is empty | ||
+ | |- | ||
+ | | <code>STMPE811_INT_STA_FIFO_FULL = (1 shl 3);</code> | ||
+ | | FIFO_FULL: FIFO is full | ||
+ | |- | ||
+ | | <code>STMPE811_INT_STA_FIFO_OFLOW = (1 shl 2);</code> | ||
+ | | FIFO_OFLOW: FIFO is overflowed | ||
+ | |- | ||
+ | | <code>STMPE811_INT_STA_FIFO_TH = (1 shl 1);</code> | ||
+ | | FIFO_TH: FIFO is equal or above threshold value | ||
+ | |- | ||
+ | | <code>STMPE811_INT_STA_TOUCH_DET = (1 shl 0);</code> | ||
+ | | TOUCH_DET: Touch is detected | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |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> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Type definitions === | === Type definitions === | ||
---- | ---- | ||
− | '' | + | |
+ | '''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 50: | 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 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''STMPE functions''' | ||
+ | |||
+ | <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 STMPE610GPIOCreate(I2C:PI2CDevice; SPI:PSPIDevice; Address,ChipSelect:Word; IRQ:PGPIOInfo):PGPIODevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create, register and start a new STMPE610 GPIO device connected to the specified I2C or SPI device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! 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 | ||
+ | |- | ||
+ | |} | ||
+ | </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 STMPE801GPIOCreate(I2C:PI2CDevice; Address:Word; IRQ:PGPIOInfo):PGPIODevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create, register and start a new STMPE801 GPIO device connected to the specified I2C device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! 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 | ||
+ | |- | ||
+ | |} | ||
+ | </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 STMPE811GPIOCreate(I2C:PI2CDevice; SPI:PSPIDevice; Address,ChipSelect:Word; IRQ:PGPIOInfo):PGPIODevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create, register and start a new STMPE811 GPIO device connected to the specified I2C or SPI device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! 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 | ||
+ | |- | ||
+ | |} | ||
+ | </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 STMPE1601GPIOCreate(I2C:PI2CDevice; Address:Word; IRQ:PGPIOInfo):PGPIODevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create, register and start a new STMPE1601 GPIO device connected to the specified I2C device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! 2C | ||
+ | | 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 | ||
+ | |- | ||
+ | |} | ||
+ | </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 STMPE1801GPIOCreate(I2C:PI2CDevice; Address:Word; IRQ:PGPIOInfo):PGPIODevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create, register and start a new STMPE1801 GPIO device connected to the specified I2C device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! 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 | ||
+ | |- | ||
+ | |} | ||
+ | </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 STMPE2401GPIOCreate(I2C:PI2CDevice; Address:Word; IRQ:PGPIOInfo):PGPIODevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create, register and start a new STMPE2401 GPIO device connected to the specified I2C device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! 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 | ||
+ | |- | ||
+ | |} | ||
+ | </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 STMPEGPIODestroy(GPIO:PGPIODevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Stop, deregister and destroy an STMPE GPIO device created by this driver</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! GPIO | ||
+ | | The GPIO device to destroy | ||
+ | |- | ||
+ | ! Return | ||
+ | | ERROR_SUCCESS if completed or another error code on failure | ||
+ | |- | ||
+ | |} | ||
+ | </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 STMPE610TouchCreate(I2C:PI2CDevice; SPI:PSPIDevice; Address,ChipSelect:Word; Width,Height:LongWord; IRQ:PGPIOInfo):PTouchDevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create, register and start a new STMPE610 Touch device connected to the specified I2C or SPI device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! 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 | ||
+ | |- | ||
+ | |} | ||
+ | </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 STMPE811TouchCreate(I2C:PI2CDevice; SPI:PSPIDevice; Address,ChipSelect:Word; Width,Height:LongWord; IRQ:PGPIOInfo):PTouchDevice;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Create, register and start a new STMPE811 Touch device connected to the specified I2C or SPI device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! 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 | ||
+ | |- | ||
+ | |} | ||
+ | </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 STMPETouchDestroy(Touch:PTouchDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Stop, deregister and destroy an STMPE Touch device created by this driver</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Touch | ||
+ | | The Touch device to destroy | ||
+ | |- | ||
+ | ! Return | ||
+ | | ERROR_SUCCESS if completed or another error code on failure | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''STMPE GPIO functions''' | ||
+ | |||
+ | <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 STMPEGPIOStart(GPIO:PGPIODevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of GPIODeviceStart 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 GPIODeviceStart 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 STMPEGPIOStop(GPIO:PGPIODevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of GPIODeviceStop 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 GPIODeviceStop 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 STMPEGPIORead(GPIO:PGPIODevice; Reg:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of GPIODeviceRead 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 GPIODeviceRead 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;">procedure STMPEGPIOWrite(GPIO:PGPIODevice; Reg,Value:LongWord);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of GPIODeviceWrite 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 GPIODeviceWrite 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 STMPEGPIOInputGet(GPIO:PGPIODevice; Pin:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of GPIODeviceInputGet 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 GPIODeviceInputGet 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 STMPEGPIOOutputSet(GPIO:PGPIODevice; Pin,Level:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of GPIODeviceOutputSet 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 GPIODeviceOutputSet 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 STMPEGPIOPullGet(GPIO:PGPIODevice; Pin:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of GPIODevicePullGet 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 GPIODevicePullGet 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 STMPEGPIOPullSelect(GPIO:PGPIODevice; Pin,Mode:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of GPIODevicePullSelect 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 GPIODevicePullSelect 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 STMPEGPIOFunctionGet(GPIO:PGPIODevice; Pin:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of GPIODeviceFunctionGet 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 GPIODeviceFunctionGet 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 STMPEGPIOFunctionSelect(GPIO:PGPIODevice; Pin,Mode:LongWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of GPIODeviceFunctionSelect 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 GPIODeviceFunctionSelect instead. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''STMPE touch functions''' | ||
+ | |||
+ | <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 STMPETouchStart(Touch:PTouchDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of TouchDeviceStart 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 TouchDeviceStart 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 STMPETouchStop(Touch:PTouchDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of TouchDeviceStop 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 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. | ||
+ | |- | ||
+ | |} | ||
+ | </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;">procedure STMPETouchTimer(Touch:PSTMPETouch);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Touch device timer event handler 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 | ||
+ | |- | ||
+ | |} | ||
+ | </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;">procedure STMPETouchCallback(Touch:PSTMPETouch; Pin,Trigger:LongWord);</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Touch device event callback (Interrupt) handler 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 | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''STMPE helper functions''' | ||
+ | |||
+ | <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 STMPEReadByte(Control:PSTMPEControl; Reg:Byte; Value:PByte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </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 STMPEWriteByte(Control:PSTMPEControl; Reg,Value:Byte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </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 STMPEReadWord(Control:PSTMPEControl; Reg:Byte; Value:PWord):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </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 STMPEWriteWord(Control:PSTMPEControl; Reg:Byte; Value:Word):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </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 STMPEReadBytes(Control:PSTMPEControl; Reg,Len:Byte; Values:PByte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </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 STMPEWriteBytes(Control:PSTMPEControl; Reg,Len:Byte; Values:PByte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </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 STMPESetBits(Control:PSTMPEControl; Reg,Mask,Value:Byte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </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 STMPEResetFIFO(Control:PSTMPEControl; Reg:Byte):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' To be documented</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
|- | |- | ||
|} | |} |
Latest revision as of 05:39, 13 September 2022
Return to Unit Reference
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*_*
STMPE610_GPIO_DESCRIPTION = 'STMicroelectronics STMPE610 I/O Expander';
|
Description of STMPE610 GPIO device |
STMPE801_GPIO_DESCRIPTION = 'STMicroelectronics STMPE801 I/O Expander';
|
Description of STMPE801 GPIO device |
STMPE811_GPIO_DESCRIPTION = 'STMicroelectronics STMPE811 I/O Expander';
|
Description of STMPE811 GPIO device |
STMPE1601_GPIO_DESCRIPTION = 'STMicroelectronics STMPE1601 I/O Expander';
|
Description of STMPE1601 GPIO device |
STMPE1801_GPIO_DESCRIPTION = 'STMicroelectronics STMPE1801 I/O Expander';
|
Description of STMPE1801 GPIO device |
STMPE2401_GPIO_DESCRIPTION = 'STMicroelectronics STMPE2401 I/O Expander';
|
Description of STMPE2401 GPIO device |
STMPE2403_GPIO_DESCRIPTION = 'STMicroelectronics STMPE2403 I/O Expander';
|
Description of STMPE2403 GPIO device |
STMPE610_TOUCH_DESCRIPTION = 'STMicroelectronics STMPE610 Touch Controller';
|
Description of STMPE610 Touch device |
STMPE811_TOUCH_DESCRIPTION = 'STMicroelectronics STMPE811 Touch Controller';
|
Description of STMPE811 Touch device |
STMPE610_GPIO_MIN_PIN = GPIO_PIN_2;
|
|
STMPE610_GPIO_MAX_PIN = GPIO_PIN_7;
|
|
STMPE610_GPIO_PIN_COUNT = 6;
|
|
STMPE801_GPIO_MIN_PIN = GPIO_PIN_0;
|
|
STMPE801_GPIO_MAX_PIN = GPIO_PIN_7;
|
|
STMPE801_GPIO_PIN_COUNT = 8;
|
|
STMPE811_GPIO_MIN_PIN = GPIO_PIN_0;
|
|
STMPE811_GPIO_MAX_PIN = GPIO_PIN_7;
|
|
STMPE811_GPIO_PIN_COUNT = 8;
|
|
STMPE1601_GPIO_MIN_PIN = GPIO_PIN_0;
|
|
STMPE1601_GPIO_MAX_PIN = GPIO_PIN_15;
|
|
STMPE1601_GPIO_PIN_COUNT = 16;
|
|
STMPE1801_GPIO_MIN_PIN = GPIO_PIN_0;
|
|
STMPE1801_GPIO_MAX_PIN = GPIO_PIN_17;
|
|
STMPE1801_GPIO_PIN_COUNT = 18;
|
|
STMPE240X_GPIO_MIN_PIN = GPIO_PIN_0;
|
|
STMPE240X_GPIO_MAX_PIN = GPIO_PIN_23;
|
|
STMPE240X_GPIO_PIN_COUNT = 24;
|
|
STMPE_GPIO_MAX_LEVEL = GPIO_LEVEL_HIGH;
|
|
STMPE_GPIO_MAX_PULL = GPIO_PULL_DOWN;
|
|
STMPE610_GPIO_MIN_FUNCTION = GPIO_FUNCTION_IN;
|
|
STMPE610_GPIO_MAX_FUNCTION = GPIO_FUNCTION_ALT0;
|
|
STMPE610_GPIO_FUNCTION_COUNT = 3;
|
|
STMPE801_GPIO_MIN_FUNCTION = GPIO_FUNCTION_IN;
|
|
STMPE801_GPIO_MAX_FUNCTION = GPIO_FUNCTION_OUT;
|
|
STMPE801_GPIO_FUNCTION_COUNT = 2;
|
|
STMPE811_GPIO_MIN_FUNCTION = GPIO_FUNCTION_IN;
|
|
STMPE811_GPIO_MAX_FUNCTION = GPIO_FUNCTION_ALT0;
|
|
STMPE811_GPIO_FUNCTION_COUNT = 3;
|
|
STMPE1601_GPIO_MIN_FUNCTION = GPIO_FUNCTION_IN;
|
|
STMPE1601_GPIO_MAX_FUNCTION = GPIO_FUNCTION_ALT1;
|
Alternate function 0 = Keypad/Alternate function 1 = PWM |
STMPE1601_GPIO_FUNCTION_COUNT = 4;
|
|
STMPE1801_GPIO_MIN_FUNCTION = GPIO_FUNCTION_IN;
|
|
STMPE1801_GPIO_MAX_FUNCTION = GPIO_FUNCTION_ALT0;
|
|
STMPE1801_GPIO_FUNCTION_COUNT = 3;
|
|
STMPE240X_GPIO_MIN_FUNCTION = GPIO_FUNCTION_IN;
|
|
STMPE240X_GPIO_MAX_FUNCTION = GPIO_FUNCTION_ALT2;
|
|
STMPE240X_GPIO_FUNCTION_COUNT = 5;
|
|
STMPE610_MAX_POINTS = 1;
|
|
STMPE610_MAX_X = $FFF;
|
|
STMPE610_MAX_Y = $FFF;
|
|
STMPE610_MAX_Z = $FF;
|
|
STMPE811_MAX_POINTS = 1;
|
|
STMPE811_MAX_X = $FFF;
|
|
STMPE811_MAX_Y = $FFF;
|
|
STMPE811_MAX_Z = $FF;
|
STMPE_CHIP_*
STMPE_CHIP_STMPE610 = 1;
|
|
STMPE_CHIP_STMPE801 = 2;
|
|
STMPE_CHIP_STMPE811 = 3;
|
|
STMPE_CHIP_STMPE1601 = 4;
|
|
STMPE_CHIP_STMPE1801 = 5;
|
|
STMPE_CHIP_STMPE2401 = 6;
|
|
STMPE_CHIP_STMPE2403 = 7;
|
STMPE_DIR_*
STMPE_DIR_ASCENDING = 0;
|
Register addresses in ascending order (Bits go from LSB to MSB) |
STMPE_DIR_DESCENDING = 1;
|
Register addresses in descending order (Bits go from MSB to LSB) |
STMPE_I2C_*
STMPE_I2C_RATE = 400000;
|
Default I2C clock rate (Device supports 100KHz and 400KHz) |
STMPE_SPI_*
STMPE_SPI_RATE = 500000;
|
Default SPI clock rate (Device supports up to 1MHz) |
STMPE_SPI_READ_CMD = (1 shl 7);
|
First bit of address must be set for a read |
STMPE*_REG_*
STMPE610/STMPE811 | |
STMPE811_REG_CHIP_ID = $00;
|
Device identification |
STMPE811_REG_ID_VER = $02;
|
Revision number (0x01 for engineering sample/0x03 for final silicon) |
STMPE811_REG_SYS_CTRL1 = $03;
|
Reset control |
STMPE811_REG_SYS_CTRL2 = $04;
|
Clock control |
STMPE811_REG_SPI_CFG = $08;
|
SPI interface configuration |
STMPE811_REG_INT_CTRL = $09;
|
Interrupt control register |
STMPE811_REG_INT_EN = $0A;
|
Interrupt enable register |
STMPE811_REG_INT_STA = $0B;
|
Interrupt status register |
STMPE811_REG_GPIO_INT_EN = $0C;
|
GPIO interrupt enable register |
STMPE811_REG_GPIO_INT_STA = $0D;
|
GPIO interrupt status register |
STMPE811_REG_ADC_INT_EN = $0E;
|
ADC interrupt enable register |
STMPE811_REG_ADC_INT_STA = $0F;
|
ADC interrupt status register |
STMPE811_REG_GPIO_SET_PIN = $10;
|
GPIO set pin register |
STMPE811_REG_GPIO_CLR_PIN = $11;
|
GPIO clear pin register |
STMPE811_REG_GPIO_MP_STA = $12;
|
GPIO monitor pin state register |
STMPE811_REG_GPIO_SET_DIR = $13;
|
GPIO direction register |
STMPE811_REG_GPIO_ED = $14;
|
GPIO edge detect register |
STMPE811_REG_GPIO_RE = $15;
|
GPIO rising edge register |
STMPE811_REG_GPIO_FE = $16;
|
GPIO falling edge register |
STMPE811_REG_GPIO_AF = $17;
|
Alternate function register |
STMPE811_REG_ADC_CTRL1 = $20;
|
ADC control |
STMPE811_REG_ADC_CTRL2 = $21;
|
ADC control |
STMPE811_REG_ADC_CAPT = $22;
|
To initiate ADC data acquisition |
STMPE811_REG_ADC_DATA_CH0 = $30;
|
ADC channel 0 |
STMPE811_REG_ADC_DATA_CH1 = $32;
|
ADC channel 1 |
STMPE811_REG_ADC_DATA_CH2 = $34;
|
ADC channel 2 |
STMPE811_REG_ADC_DATA_CH3 = $36;
|
ADC channel 3 |
STMPE811_REG_ADC_DATA_CH4 = $38;
|
ADC channel 4 |
STMPE811_REG_ADC_DATA_CH5 = $3A;
|
ADC channel 5 |
STMPE811_REG_ADC_DATA_CH6 = $3C;
|
ADC channel 6 |
STMPE811_REG_ADC_DATA_CH7 = $3E;
|
ADC channel 7 |
STMPE811_REG_TSC_CTRL = $40;
|
4-wire touchscreen controller setup |
STMPE811_REG_TSC_CFG = $41;
|
Touchscreen controller configuration |
STMPE811_REG_WDW_TR_X = $42;
|
Window setup for top right X |
STMPE811_REG_WDW_TR_Y = $44;
|
Window setup for top right Y |
STMPE811_REG_WDW_BL_X = $46;
|
Window setup for bottom left X |
STMPE811_REG_WDW_BL_Y = $48;
|
Window setup for bottom left Y |
STMPE811_REG_FIFO_TH = $4A;
|
FIFO level to generate interrupt |
STMPE811_REG_FIFO_STA = $4B;
|
Current status of FIFO |
STMPE811_REG_FIFO_SIZE = $4C;
|
Current filled level of FIFO |
STMPE811_REG_TSC_DATA_X = $4D;
|
Data port for touchscreen controller data access |
STMPE811_REG_TSC_DATA_Y = $4F;
|
Data port for touchscreen controller data access |
STMPE811_REG_TSC_DATA_Z = $51;
|
Data port for touchscreen controller data access |
STMPE811_REG_TSC_DATA_XYZ = $52;
|
Data port for touchscreen controller data access |
STMPE811_REG_TSC_FRACTION_Z = $56;
|
Touchscreen controller FRACTION_Z |
STMPE811_REG_TSC_DATA = $57;
|
Data port for touchscreen controller data access |
STMPE811_REG_TSC_I_DRIVE = $58;
|
Touchscreen controller drive I |
STMPE811_REG_TSC_SHIELD = $59;
|
Touchscreen controller shield |
STMPE811 | |
STMPE811_REG_TEMP_CTRL= $60;
|
Temperature sensor setup |
STMPE811_REG_TEMP_DATA = $61;
|
Temperature data access port |
STMPE811_REG_TEMP_TH = $62;
|
Threshold for temperature controlled interrupt |
STMPE811_REG_MAX = $62;
|
|
STMPE811_REG_SIZE = 1;
|
|
STMPE801 | |
STMPE801_REG_CHIP_ID = $00;
|
Device identification |
STMPE801_REG_ID_VER = $02;
|
Revision number (0x01 for engineering sample/0x02 for final silicon) |
STMPE801_REG_SYS_CTRL = $04;
|
Reset and interrupt control |
STMPE801_REG_GPIO_INT_EN = $08;
|
GPIO interrupt enable register |
STMPE801_REG_GPIO_INT_STA = $09;
|
GPIO interrupt status register |
STMPE801_REG_GPIO_MP_STA = $10;
|
GPIO monitor pin state register |
STMPE801_REG_GPIO_SET_PIN = $11;
|
GPIO set pin state register |
STMPE801_REG_GPIO_SET_DIR = $12;
|
GPIO set pin direction register |
STMPE801_REG_MAX = $12;
|
|
STMPE801_REG_SIZE = 1;
|
|
STMPE1601 | |
STMPE1601_REG_CHIP_ID = $80;
|
Device identification |
STMPE1601_REG_ID_VER = $81;
|
Revision number |
STMPE1601_REG_SYS_CTRL = $02;
|
System control register |
STMPE1601_REG_SYS_CTRL2 = $03;
|
System control register 2 |
STMPE1601_REG_INT_CTRL_MSB = $10;
|
Interrupt control register |
STMPE1601_REG_INT_CTRL_LSB = $11;
|
|
STMPE1601_REG_INT_EN_MSB = $12;
|
Interrupt enable mask register |
STMPE1601_REG_INT_EN_LSB = $13;
|
|
STMPE1601_REG_INT_STA_MSB = $14;
|
Interrupt status register |
STMPE1601_REG_INT_STA_LSB = $15;
|
|
STMPE1601_REG_GPIO_INT_EN_MSB = $16;
|
Interrupt enable GPIO mask register |
STMPE1601_REG_GPIO_INT_EN_LSB = $17;
|
|
STMPE1601_REG_GPIO_INT_STA_MSB = $18;
|
Interrupt status GPIO register |
STMPE1601_REG_GPIO_INT_STA_LSB = $19;
|
|
STMPE1601_REG_GPIO_SET_PIN_MSB = $82;
|
GPIO set pin state register |
STMPE1601_REG_GPIO_SET_PIN_LSB = $83;
|
|
STMPE1601_REG_GPIO_CLR_PIN_MSB = $84;
|
GPIO clear pin state register |
STMPE1601_REG_GPIO_CLR_PIN_LSB = $85;
|
|
STMPE1601_REG_GPIO_MP_STA_MSB = $86;
|
GPIO monitor pin state register |
STMPE1601_REG_GPIO_MP_STA_LSB = $87;
|
|
STMPE1601_REG_GPIO_SET_DIR_MSB = $88;
|
GPIO set pin direction register |
STMPE1601_REG_GPIO_SET_DIR_LSB = $89;
|
|
STMPE1601_REG_GPIO_ED_MSB = $8A;
|
GPIO edge detect status register |
STMPE1601_REG_GPIO_ED_LSB = $8B;
|
|
STMPE1601_REG_GPIO_RE_MSB = $8C;
|
GPIO rising edge register |
STMPE1601_REG_GPIO_RE_LSB = $8D;
|
|
STMPE1601_REG_GPIO_FE_MSB = $8E;
|
GPIO falling edge register |
STMPE1601_REG_GPIO_FE_LSB = $8F;
|
|
STMPE1601_REG_GPIO_PU_MSB = $90;
|
GPIO pull up register |
STMPE1601_REG_GPIO_PU_LSB = $91;
|
|
STMPE1601_REG_GPIO_AF_U_MSB = $92;
|
GPIO alternate function register (upper word) |
STMPE1601_REG_GPIO_AF_U_LSB = $93;
|
|
STMPE1601_REG_GPIO_AF_L_MSB = $94;
|
GPIO alternate function register (lower word) |
STMPE1601_REG_GPIO_AF_L_LSB = $95;
|
|
STMPE1601_REG_GPIO_LT_EN = $96;
|
GPIO level translator enable |
STMPE1601_REG_GPIO_LT_DIR = $97;
|
GPIO level translator direction |
STMPE1601_REG_MAX = $BF;
|
|
STMPE1601_REG_SIZE = 2;
|
|
STMPE1801 | |
STMPE1801_REG_CHIP_ID = $00;
|
Device identification |
STMPE1801_REG_ID_VER = $01;
|
Revision number |
STMPE1801_REG_SYS_CTRL = $02;
|
System control |
STMPE1801_REG_INT_CTRL_LOW = $04;
|
Interrupt control |
STMPE1801_REG_INT_CTRL_HIGH = $05;
|
|
STMPE1801_REG_INT_EN_LOW = $06;
|
Interrupt enable mask |
STMPE1801_REG_INT_EN_HIGH = $07;
|
|
STMPE1801_REG_INT_STA_LOW = $08;
|
Interrupt status |
STMPE1801_REG_INT_STA_HIGH = $09;
|
|
STMPE1801_REG_GPIO_INT_EN_LOW = $0A;
|
Interrupt enable GPIO mask |
STMPE1801_REG_GPIO_INT_EN_MID = $0B;
|
|
STMPE1801_REG_GPIO_INT_EN_HIGH = $0C;
|
|
STMPE1801_REG_GPIO_INT_STA_LOW = $0D;
|
Interrupt status GPIO |
STMPE1801_REG_GPIO_INT_STA_MID = $0E;
|
|
STMPE1801_REG_GPIO_INT_STA_HIGH = $0F;
|
|
STMPE1801_REG_GPIO_SET_PIN_LOW = $10;
|
GPIO set pin state |
STMPE1801_REG_GPIO_SET_PIN_MID = $11;
|
|
STMPE1801_REG_GPIO_SET_PIN_HIGH = $12
|
|
STMPE1801_REG_GPIO_CLR_PIN_LOW = $13;
|
GPIO clear pin state |
STMPE1801_REG_GPIO_CLR_PIN_MID = $14;
|
|
STMPE1801_REG_GPIO_CLR_PIN_HIGH = $15;
|
|
STMPE1801_REG_GPIO_MP_STA_LOW = $16;
|
GPIO monitor pin state |
STMPE1801_REG_GPIO_MP_STA_MID = $17;
|
|
STMPE1801_REG_GPIO_MP_STA_HIGH = $18;
|
|
STMPE1801_REG_GPIO_SET_DIR_LOW = $19;
|
GPIO set pin direction register |
STMPE1801_REG_GPIO_SET_DIR_MID = $1A;
|
|
STMPE1801_REG_GPIO_SET_DIR_HIGH = $1B;
|
|
STMPE1801_REG_GPIO_RE_LOW = $1C;
|
GPIO rising edge |
STMPE1801_REG_GPIO_RE_MID = $1D;
|
|
STMPE1801_REG_GPIO_RE_HIGH = $1E;
|
|
STMPE1801_REG_GPIO_FE_LOW = $1F;
|
GPIO falling edge |
STMPE1801_REG_GPIO_FE_MID = $20;
|
|
STMPE1801_REG_GPIO_FE_HIGH = $21;
|
|
STMPE1801_REG_GPIO_PULL_UP_LOW = $22;
|
GPIO pull up |
STMPE1801_REG_GPIO_PULL_UP_MID = $23;
|
|
STMPE1801_REG_GPIO_PULL_UP_HIGH = $24;
|
|
STMPE1801_REG_KPC_ROW = $30;
|
Keypad row scanning |
STMPE1801_REG_KPC_COL_LOW = $31;
|
Keypad column scanning |
STMPE1801_REG_KPC_COL_HIGH = $32;
|
|
STMPE1801_REG_KPC_CTRL_LOW = $33;
|
Key config: Scan count and dedicated key |
STMPE1801_REG_KPC_CTRL_MID = $34;
|
|
STMPE1801_REG_KPC_CTRL_HIGH = $35;
|
|
STMPE1801_REG_KPC_CMD = $36;
|
Keypad command |
STMPE1801_REG_KPC_COMB_KEY_0 = $37;
|
Keypad combination key mask |
STMPE1801_REG_KPC_COMB_KEY_1 = $38;
|
|
STMPE1801_REG_KPC_COMB_KEY_2 = $39;
|
|
STMPE1801_REG_KPC_DATA_BYTE0 = $3A;
|
Keypad data |
STMPE1801_REG_KPC_DATA_BYTE1 = $3B;
|
|
STMPE1801_REG_KPC_DATA_BYTE2 = $3C;
|
|
STMPE1801_REG_KPC_DATA_BYTE3 = $3D;
|
|
STMPE1801_REG_KPC_DATA_BYTE4 = $3E;
|
|
STMPE1801_REG_MAX = $3E;
|
|
STMPE1801_REG_SIZE = 3;
|
|
STMPE2401/STMPE2403 | |
STMPE240X_REG_CHIP_ID = $80;
|
Device identification |
STMPE240X_REG_ID_VER = $81;
|
Revision number |
STMPE240X_REG_SYS_CTRL = $02;
|
System control register |
STMPE240X_REG_INT_CTRL_MSB = $10;
|
Interrupt Control Register |
STMPE240X_REG_INT_CTRL_LSB = $11;
|
|
STMPE240X_REG_INT_EN_MSB = $12;
|
Interrupt Enable Mask Register |
STMPE240X_REG_INT_EN_LSB = $13;
|
|
STMPE240X_REG_INT_STA_MSB = $14;
|
Interrupt Status Register |
STMPE240X_REG_INT_STA_LSB = $15;
|
|
STMPE240X_REG_GPIO_INT_EN_MSB = $16;
|
Interrupt Enable GPIO Mask Register |
STMPE240X_REG_GPIO_INT_EN_MID = $17;
|
|
STMPE240X_REG_GPIO_INT_EN_LSB = $18;
|
|
STMPE240X_REG_GPIO_INT_STA_MSB = $19;
|
Interrupt Status GPIO Register |
STMPE240X_REG_GPIO_INT_STA_MID = $1A;
|
|
STMPE240X_REG_GPIO_INT_STA_LSB = $1B;
|
|
STMPE240X_REG_GPIO_MP_STA_MSB = $A2;
|
GPIO Monitor Pin State Register |
STMPE240X_REG_GPIO_MP_STA_MID = $A3;
|
|
STMPE240X_REG_GPIO_MP_STA_LSB = $A4;
|
|
STMPE240X_REG_GPIO_SET_PIN_MSB = $83;
|
GPIO Set Pin State Register |
STMPE240X_REG_GPIO_SET_PIN_MID = $84;
|
|
STMPE240X_REG_GPIO_SET_PIN_LSB = $85;
|
|
STMPE240X_REG_GPIO_CLR_PIN_MSB = $86;
|
GPIO Clear Pin State Register |
STMPE240X_REG_GPIO_CLR_PIN_MID = $87;
|
|
STMPE240X_REG_GPIO_CLR_PIN_LSB = $88;
|
|
STMPE240X_REG_GPIO_SET_DIR_MSB = $89;
|
GPIO Set Pin Direction Register |
STMPE240X_REG_GPIO_SET_DIR_MID = $8A;
|
|
STMPE240X_REG_GPIO_SET_DIR_LSB = $8B;
|
|
STMPE240X_REG_GPIO_ED_MSB = $8C;
|
GPIO Edge Detect Status Register |
STMPE240X_REG_GPIO_ED_MID = $8D;
|
|
STMPE240X_REG_GPIO_ED_LSB = $8E;
|
|
STMPE240X_REG_GPIO_RE_MSB = $8F;
|
GPIO Rising Edge Register |
STMPE240X_REG_GPIO_RE_MID = $90;
|
|
STMPE240X_REG_GPIO_RE_LSB = $91;
|
|
STMPE240X_REG_GPIO_FE_MSB = $92;
|
GPIO Falling Edge Register |
STMPE240X_REG_GPIO_FE_MID = $93;
|
|
STMPE240X_REG_GPIO_FE_LSB = $94;
|
|
STMPE240X_REG_GPIO_PULL_UP_MSB = $95;
|
GPIO Pull Up Register |
STMPE240X_REG_GPIO_PULL_UP_MID = $96;
|
|
STMPE240X_REG_GPIO_PULL_UP_LSB = $97;
|
|
STMPE240X_REG_GPIO_PULL_DN_MSB = $98;
|
GPIO Pull Down Register |
STMPE240X_REG_GPIO_PULL_DN_MID = $99;
|
|
STMPE240X_REG_GPIO_PULL_DN_LSB = $9A;
|
|
STMPE240X_REG_GPIO_AF_U_MSB = $9B;
|
GPIO Alternate Function Register (Upper Bit) |
STMPE240X_REG_GPIO_AF_U_MID = $9C;
|
|
STMPE240X_REG_GPIO_AF_U_LSB = $9D;
|
|
STMPE240X_REG_GPIO_AF_L_MSB = $9E;
|
GPIO Alternate Function Register(Lower Bit) |
STMPE240X_REG_GPIO_AF_L_MID = $9F;
|
|
STMPE240X_REG_GPIO_AF_L_LSB = $A0;
|
|
STMPE240X_REG_PWMCS = $30;
|
PWM Control and Status register |
STMPE240X_REG_PWMIC0 = $38;
|
PWM instructions are initialized through this data port |
STMPE240X_REG_PWMIC1 = $39;
|
|
STMPE240X_REG_PWMIC2 = $3A;
|
|
STMPE240X_REG_KPC_COL = $60;
|
Keypad column scanning register |
STMPE240X_REG_KPC_ROW_MSB = $61;
|
Keypad row scanning register |
STMPE240X_REG_KPC_ROW_LSB = $62;
|
|
STMPE240X_REG_KPC_CTRL_MSB = $63;
|
Keypad control register |
STMPE240X_REG_KPC_CTRL_LSB = $64;
|
|
STMPE240X_REG_KPC_DATA_BYTE0 = $68;
|
Keypad data register |
STMPE240X_REG_KPC_DATA_BYTE1 = $69;
|
|
STMPE240X_REG_KPC_DATA_BYTE2 = $6A;
|
|
STMPE240X_REG_MAX = $BF;
|
|
STMPE240X_REG_SIZE = 3;
|
|
STMPE_REG_UNKNOWN = $FF;
|
STMPE*_CHIP_ID
STMPE610/STMPE811 | |
STMPE811_CHIP_ID = $0811;
|
|
STMPE801 | |
STMPE801_CHIP_ID = $0801;
|
|
STMPE1601 | |
STMPE1601_CHIP_ID = $02;
|
|
STMPE1801 | |
STMPE1801_CHIP_ID = $C1;
|
|
STMPE2401/STMPE2403 | |
STMPE240X_CHIP_ID = $01;
|
STMPE*_SYS_CTRL*_*
STMPE610/STMPE811 | |
STMPE811_SYS_CTRL2_TS_OFF = (1 shl 3);
|
1: Switches off the clock supply to the temperature sensor |
STMPE811_SYS_CTRL2_GPIO_OFF (1 shl 2);
|
1: Switches off the clock supply to the GPIO |
STMPE811_SYS_CTRL2_TSC_OFF = (1 shl 1);
|
1: Switches off the clock supply to the touchscreen controller |
STMPE811_SYS_CTRL2_ADC_OFF = (1 shl 0);
|
1: Switches off the clock supply to the ADC |
STMPE801 | |
STMPE801_SYS_CTRL_RESET = (1 shl 7);
|
Writing 1 to this bit causes a soft reset. |
STMPE801_SYS_CTRL_INT_EN = (1 shl 2);
|
INT Enable 1 to enable, 0 to disable INT output. |
STMPE801_SYS_CTRL_INT_HI = (1 shl 0);
|
INT Polarity 1 for active HI, 0 for active LOW. |
STMPE1601 | |
STMPE1601_SYS_CTRL_RESET = (1 shl 7);
|
Writing a 1 to this bit will do a soft reset of the device. Once the reset is done, this bit will be cleared to 0 by the HW. |
STMPE1601_SYS_CTRL_ENABLE_GPIO = (1 shl 3);
|
Writing a 0 to this bit will gate off the clock to the GPIO module, thus stopping its operation. |
STMPE1601_SYS_CTRL_ENABLE_KPC = (1 shl 1);
|
Writing a 0 to this bit will gate off the clock to the keypad controller module, thus stopping its operation. |
STMPE1601_SYS_CTRL_ENABLE_SPWM = (1 shl 0);
|
Writing a 0 to this bit will gate off the clock to the simple PWM controller module, thus stopping its operation. |
STMPE1801 | |
STMPE1801_SYS_CTRL_RESET = (1 shl 7);
|
Writing a 1 to this bit will do a soft reset of the device. Once the reset is done, this bit will be cleared to 0 by the HW. |
STMPE240X | |
STMPE240X_SYS_CTRL_RESET = (1 shl 7);
|
Writing a 1 to this bit will do a soft reset of the device. Once the reset is done, this bit will be cleared to 0 by the HW. |
STMPE240X_SYS_CTRL_ENABLE_GPIO = (1 shl 3);
|
Writing a 0 to this bit will gate off the clock to the GPIO module, thus stopping its operation. |
STMPE240X_SYS_CTRL_ENABLE_PWM = (1 shl 2);
|
Writing a 0 to this bit will gate off the clock to the PWM module, thus stopping its operation. |
STMPE240X_SYS_CTRL_ENABLE_KPC = (1 shl 1);
|
Writing a 0 to this bit will gate off the clock to the Keypad Controller module, thus stopping its operation. |
STMPE240X_SYS_CTRL_ENABLE_ROT = (1 shl 0);
|
Writing a 0 to this bit will gate off the clock to the Rotator module, thus stopping its operation. |
STMPE*_TSC_CTRL_*
STMPE610/STMPE811 | |
STMPE811_TSC_CTRL_TSC_STA = (1 shl 7);
|
TSC status (Reads '1' when touch is detected/Reads '0' when touch is not detected) |
STMPE811_TSC_CTRL_TRACK_MASK = (7 shl 4);
|
TRACK: Tracking index |
STMPE811_TSC_CTRL_OPMODE_XYZ = (0 shl 1);
|
OP_MOD: TSC operating mode: X, Y, Z acquisition |
STMPE811_TSC_CTRL_OPMODE_XY = (1 shl 1);
|
OP_MOD: TSC operating mode: X, Y only |
STMPE811_TSC_CTRL_OPMODE_X = (2 shl 1);
|
OP_MOD: TSC operating mode: X only |
STMPE811_TSC_CTRL_OPMODE_Y = (3 shl 1);
|
OP_MOD: TSC operating mode: Y only |
STMPE811_TSC_CTRL_OPMODE_Z = (4 shl 1);
|
OP_MOD: TSC operating mode: Z only |
STMPE811_TSC_CTRL_TSC_EN = (1 shl 0);
|
Enable TSC |
STMPE*_TSC_CFG_*
STMPE610/STMPE811 | |
STMPE811_TSC_CFG_AVE_CTRL_1 = (0 shl 6);
|
AVE_CTRL: Average control: 1 sample |
STMPE811_TSC_CFG_AVE_CTRL_2 = (1 shl 6);
|
AVE_CTRL: Average control: 2 samples |
STMPE811_TSC_CFG_AVE_CTRL_4 = (2 shl 6);
|
AVE_CTRL: Average control: 4 samples |
STMPE811_TSC_CFG_AVE_CTRL_8 = (3 shl 6);
|
AVE_CTRL: Average control: 8 samples |
STMPE811_TSC_CFG_TOUCH_DET_DELAY_MASK = (7 shl 3);
|
TOUCH_DET_DELAY: Touch detect delay |
STMPE811_TSC_CFG_SETTLING_MASK = (7 shl 0);
|
SETTLING: Panel driver settling time |
STMPE*_ADC_CTRL1_*
STMPE610/STMPE811 | |
STMPE811_ADC_CTRL1_SAMPLE_TIME_MASK = (7 shl 4);
|
SAMPLE_TIMEn: ADC conversion time in number of clock |
STMPE811_ADC_CTRL1_MOD_12B = (1 shl 3);
|
MOD_12B: Selects 10 or 12-bit ADC operation (1: 12 bit ADC/0: 10 bit ADC) |
STMPE811_ADC_CTRL1_REF_SEL = (1 shl 1);
|
REF_SEL: Selects between internal or external reference for the ADC (1: External reference/0: Internal reference) |
STMPE*_ADC_CTRL2_*
STMPE610/STMPE811 | |
STMPE811_ADC_CTRL2_ADC_FREQ_MASK = (3 shl 0);
|
ADC_FREQ: Selects the clock speed of ADC |
STMPE*_FIFO_STA_*
STMPE610/STMPE811 | |
STMPE811_FIFO_STA_RESET = (1 shl 0);
|
FIFO Reset (Write 0 : FIFO put out of reset mode/Write 1 : Resets FIFO. All data in FIFO will be cleared) |
STMPE*_INT_CTRL_*
STMPE610/STMPE811 | |
STMPE811_INT_CTRL_POLARITY = (1 shl 2);
|
This bit sets the INT pin polarity (1: Active high/rising edge/0: Active low/falling edge) |
STMPE811_INT_CTRL_TYPE = (1 shl 1);
|
This bit sets the type of interrupt signal required by the host (1: Edge interrupt/0: Level interrupt) |
STMPE811_INT_CTRL_GLOBAL = (1 shl 0);
|
This is master enable for the interrupt system (1: Global interrupt/0: Stops all interrupts) |
STMPE*_INT_EN_*
STMPE610/STMPE811 | |
STMPE811_INT_EN_GPIO = (1 shl 7);
|
GPIO: Any enabled GPIO interrupts |
STMPE811_INT_EN_ADC = (1 shl 6);
|
ADC: Any enabled ADC interrupts |
STMPE811_INT_EN_TEMP_SENS = (1 shl 5);
|
TEMP_SENS: Temperature threshold triggering |
STMPE811_INT_EN_FIFO_EMPTY = (1 shl 4);
|
FIFO_EMPTY: FIFO is empty |
STMPE811_INT_EN_FIFO_FULL = (1 shl 3);
|
FIFO_FULL: FIFO is full |
STMPE811_INT_EN_FIFO_OFLOW = (1 shl 2);
|
FIFO_OFLOW: FIFO is overflowed |
STMPE811_INT_EN_FIFO_TH = (1 shl 1);
|
FIFO_TH: FIFO is equal or above threshold value |
STMPE811_INT_EN_TOUCH_DET = (1 shl 0);
|
TOUCH_DET: Touch is detected |
STMPE*_INT_STA_*
STMPE610/STMPE811 | |
STMPE811_INT_STA_GPIO = (1 shl 7);
|
GPIO: Any enabled GPIO interrupts |
STMPE811_INT_STA_ADC = (1 shl 6);
|
ADC: Any enabled ADC interrupts |
STMPE811_INT_STA_TEMP_SENS = (1 shl 5);
|
TEMP_SENS: Temperature threshold triggering |
STMPE811_INT_STA_FIFO_EMPTY = (1 shl 4);
|
FIFO_EMPTY: FIFO is empty |
STMPE811_INT_STA_FIFO_FULL = (1 shl 3);
|
FIFO_FULL: FIFO is full |
STMPE811_INT_STA_FIFO_OFLOW = (1 shl 2);
|
FIFO_OFLOW: FIFO is overflowed |
STMPE811_INT_STA_FIFO_TH = (1 shl 1);
|
FIFO_TH: FIFO is equal or above threshold value |
STMPE811_INT_STA_TOUCH_DET = (1 shl 0);
|
TOUCH_DET: Touch is detected |
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;
|
STMPE*Offsets*
STMPE610/STMPE811 Offsets | |
STMPE811Offsets:TSTMPEOffsets = (
| |
Control Register offsets | |
SysCtrl:STMPE811_REG_SYS_CTRL2;
|
|
IntCtrl:STMPE811_REG_INT_CTRL;
|
|
IntEnable:STMPE811_REG_INT_EN;
|
|
IntStatus:STMPE811_REG_INT_STA;
|
|
GPIO Registers offsets | |
GPIOIntEnable:STMPE811_REG_GPIO_INT_EN;
|
|
GPIOIntStatus:STMPE811_REG_GPIO_INT_STA;
|
|
GPIOPinGet:STMPE811_REG_GPIO_MP_STA;
|
|
GPIOPinSet:STMPE811_REG_GPIO_SET_PIN;
|
|
GPIOPinClr:STMPE811_REG_GPIO_CLR_PIN;
|
|
GPIODirSet:STMPE811_REG_GPIO_SET_DIR;
|
|
GPIOFuncSet:STMPE811_REG_GPIO_AF;
|
|
GPIOPullUp:STMPE_REG_UNKNOWN;
|
|
GPIOPullDown:STMPE_REG_UNKNOWN;
|
|
GPIOEdgeDetect:STMPE811_REG_GPIO_ED;
|
|
GPIORisingEdge:STMPE811_REG_GPIO_RE;
|
|
GPIOFallingEdge:STMPE811_REG_GPIO_FE;
|
|
Touchscreen Register offsets (610 and 811 Only) | |
ADCCtrl1:STMPE811_REG_ADC_CTRL1;
|
|
ADCCtrl2:STMPE811_REG_ADC_CTRL2;
|
|
TSCCtrl:STMPE811_REG_TSC_CTRL;
|
|
TSCCfg:STMPE811_REG_TSC_CFG;
|
|
FIFOThreshold:STMPE811_REG_FIFO_TH;
|
|
FIFOStatus:STMPE811_REG_FIFO_STA;
|
|
TSCDataXYZ:STMPE811_REG_TSC_DATA_XYZ;
|
|
TSCFractionZ:STMPE811_REG_TSC_FRACTION_Z;
|
|
TSCIDrive:STMPE811_REG_TSC_I_DRIVE );
|
|
STMPE801 Offsets | |
STMPE801Offsets:TSTMPEOffsets = (
| |
Control Register offsets | |
SysCtrl:STMPE801_REG_SYS_CTRL;
|
|
IntCtrl:STMPE801_REG_SYS_CTRL;
|
|
IntEnable:STMPE_REG_UNKNOWN;
|
|
IntStatus:STMPE_REG_UNKNOWN;
|
|
GPIO Registers offsets | |
GPIOIntEnable:STMPE801_REG_GPIO_INT_EN;
|
|
GPIOIntStatus:STMPE801_REG_GPIO_INT_STA;
|
|
GPIOPinGet:STMPE801_REG_GPIO_MP_STA;
|
|
GPIOPinSet:STMPE801_REG_GPIO_SET_PIN;
|
|
GPIOPinClr:STMPE801_REG_GPIO_SET_PIN;
|
|
GPIODirSet:STMPE801_REG_GPIO_SET_DIR;
|
|
GPIOFuncSet:STMPE_REG_UNKNOWN;
|
|
GPIOPullUp:STMPE_REG_UNKNOWN;
|
|
GPIOPullDown:STMPE_REG_UNKNOWN;
|
|
GPIOEdgeDetect:STMPE_REG_UNKNOWN;
|
|
GPIORisingEdge:STMPE_REG_UNKNOWN;
|
|
GPIOFallingEdge:STMPE_REG_UNKNOWN;
|
|
Touchscreen Register offsets (610 and 811 Only) | |
ADCCtrl1:STMPE_REG_UNKNOWN;
|
|
ADCCtrl2:STMPE_REG_UNKNOWN;
|
|
TSCCtrl:STMPE_REG_UNKNOWN;
|
|
TSCCfg:STMPE_REG_UNKNOWN;
|
|
FIFOThreshold:STMPE_REG_UNKNOWN;
|
|
FIFOStatus:STMPE_REG_UNKNOWN;
|
|
TSCDataXYZ:STMPE_REG_UNKNOWN;
|
|
TSCFractionZ:STMPE_REG_UNKNOWN;
|
|
TSCIDrive:STMPE_REG_UNKNOWN );
|
|
STMPE1601 Offsets | |
STMPE1601Offsets:TSTMPEOffsets = (
| |
Control Register offsets | |
SysCtrl:STMPE1601_REG_SYS_CTRL;
|
|
IntCtrl:STMPE1601_REG_INT_CTRL_LSB;
|
|
IntEnable:STMPE1601_REG_INT_EN_LSB;
|
|
IntStatus:STMPE1601_REG_INT_STA_LSB;
|
|
GPIO Registers offsets | |
GPIOIntEnable:STMPE1601_REG_GPIO_INT_EN_LSB;
|
|
GPIOIntStatus:STMPE1601_REG_GPIO_INT_STA_LSB;
|
|
GPIOPinGet:STMPE1601_REG_GPIO_MP_STA_LSB;
|
|
GPIOPinSet:STMPE1601_REG_GPIO_SET_PIN_LSB;
|
|
GPIOPinClr:STMPE1601_REG_GPIO_CLR_PIN_LSB;
|
|
GPIODirSet:STMPE1601_REG_GPIO_SET_DIR_LSB;
|
|
GPIOFuncSet:STMPE1601_REG_GPIO_AF_L_LSB;
|
|
GPIOPullUp:STMPE1601_REG_GPIO_PU_LSB;
|
|
GPIOPullDown:STMPE_REG_UNKNOWN;
|
|
GPIOEdgeDetect:STMPE1601_REG_GPIO_ED_LSB;
|
|
GPIORisingEdge:STMPE1601_REG_GPIO_RE_LSB;
|
|
GPIOFallingEdge:STMPE1601_REG_GPIO_FE_LSB;
|
|
Touchscreen Register offsets (610 and 811 Only) | |
ADCCtrl1:STMPE_REG_UNKNOWN;
|
|
ADCCtrl2:STMPE_REG_UNKNOWN;
|
|
TSCCtrl:STMPE_REG_UNKNOWN;
|
|
TSCCfg:STMPE_REG_UNKNOWN;
|
|
FIFOThreshold:STMPE_REG_UNKNOWN;
|
|
FIFOStatus:STMPE_REG_UNKNOWN;
|
|
TSCDataXYZ:STMPE_REG_UNKNOWN;
|
|
TSCFractionZ:STMPE_REG_UNKNOWN;
|
|
TSCIDrive:STMPE_REG_UNKNOWN );
|
|
STMPE1801 Offsets | |
STMPE1801Offsets:TSTMPEOffsets = (
| |
Control Register offsets | |
SysCtrl:STMPE1801_REG_SYS_CTRL;
|
|
IntCtrl:STMPE1801_REG_INT_CTRL_LOW;
|
|
IntEnable:STMPE1801_REG_INT_EN_LOW;
|
|
IntStatus:STMPE1801_REG_INT_STA_LOW;
|
|
GPIO Registers offsets | |
GPIOIntEnable:STMPE1801_REG_GPIO_INT_EN_LOW;
|
|
GPIOIntStatus:STMPE1801_REG_GPIO_INT_STA_LOW;
|
|
GPIOPinGet:STMPE1801_REG_GPIO_MP_STA_LOW;
|
|
GPIOPinSet:STMPE1801_REG_GPIO_SET_PIN_LOW;
|
|
GPIOPinClr:STMPE1801_REG_GPIO_CLR_PIN_LOW;
|
|
GPIODirSet:STMPE1801_REG_GPIO_SET_DIR_LOW;
|
|
GPIOFuncSet:STMPE_REG_UNKNOWN;
|
|
GPIOPullUp:STMPE1801_REG_GPIO_PULL_UP_LOW;
|
|
GPIOPullDown:STMPE_REG_UNKNOWN;
|
|
GPIOEdgeDetect:STMPE_REG_UNKNOWN;
|
|
GPIORisingEdge:STMPE1801_REG_GPIO_RE_LOW;
|
|
GPIOFallingEdge:STMPE1801_REG_GPIO_FE_LOW;
|
|
Touchscreen Register offsets (610 and 811 Only) | |
ADCCtrl1:STMPE_REG_UNKNOWN;
|
|
ADCCtrl2:STMPE_REG_UNKNOWN;
|
|
TSCCtrl:STMPE_REG_UNKNOWN;
|
|
TSCCfg:STMPE_REG_UNKNOWN;
|
|
FIFOThreshold:STMPE_REG_UNKNOWN;
|
|
FIFOStatus:STMPE_REG_UNKNOWN;
|
|
TSCDataXYZ:STMPE_REG_UNKNOWN;
|
|
TSCFractionZ:STMPE_REG_UNKNOWN;
|
|
TSCIDrive:STMPE_REG_UNKNOWN );
|
|
STMPE2401/STMPE2403 Offsets | |
STMPE240XOffsets:TSTMPEOffsets = (
| |
Control Register offsets | |
SysCtrl:STMPE240X_REG_SYS_CTRL;
|
|
IntCtrl:STMPE240X_REG_INT_CTRL_LSB;
|
|
IntEnable:STMPE240X_REG_INT_EN_LSB;
|
|
IntStatus:STMPE240X_REG_INT_STA_LSB;
|
|
GPIO Registers offsets | |
GPIOIntEnable:STMPE240X_REG_GPIO_INT_EN_LSB;
|
|
GPIOIntStatus:STMPE240X_REG_GPIO_INT_STA_LSB;
|
|
GPIOPinGet:STMPE240X_REG_GPIO_MP_STA_LSB;
|
|
GPIOPinSet:STMPE240X_REG_GPIO_SET_PIN_LSB;
|
|
GPIOPinClr:STMPE240X_REG_GPIO_CLR_PIN_LSB;
|
|
GPIODirSet:STMPE240X_REG_GPIO_SET_DIR_LSB;
|
|
GPIOFuncSet:STMPE240X_REG_GPIO_AF_L_LSB;
|
|
GPIOPullUp:STMPE240X_REG_GPIO_PULL_UP_LSB;
|
|
GPIOPullDown:STMPE240X_REG_GPIO_PULL_DN_LSB;
|
|
GPIOEdgeDetect:STMPE240X_REG_GPIO_ED_LSB;
|
|
GPIORisingEdge:STMPE240X_REG_GPIO_RE_LSB;
|
|
GPIOFallingEdge:STMPE240X_REG_GPIO_FE_LSB;
|
|
Touchscreen Register offsets (610 and 811 Only) | |
ADCCtrl1:STMPE_REG_UNKNOWN;
|
|
ADCCtrl2:STMPE_REG_UNKNOWN;
|
|
TSCCtrl:STMPE_REG_UNKNOWN;
|
|
TSCCfg:STMPE_REG_UNKNOWN;
|
|
FIFOThreshold:STMPE_REG_UNKNOWN;
|
|
FIFOStatus:STMPE_REG_UNKNOWN;
|
|
TSCDataXYZ:STMPE_REG_UNKNOWN;
|
|
TSCFractionZ:STMPE_REG_UNKNOWN;
|
|
TSCIDrive:STMPE_REG_UNKNOWN );
|
Type definitions
STMPE control
PSTMPEControl = ^TSTMPEControl;
TSTMPEControl = record
General Properties | |
Chip:LongWord;
|
The chip type (eg STMPE_CHIP_STMPE610) |
IRQ:TGPIOInfo;
|
The GPIO information for the IRQ line (Optional) |
I2C Properties | |
I2C:PI2CDevice;
|
The I2C device this device is connected to (Optional) |
Address:Word;
|
The I2C address of the device |
SPI Properties | |
SPI:PSPIDevice;
|
The SPI device this device is connected to (Optional) |
ChipSelect:Word;
|
The SPI chip select of the device |
Register Properties | |
RegMax:LongWord;
|
The maximum register address for read or write |
RegDir:LongWord;
|
The register address direction (Ascending/Descending) |
RegSize:LongWord;
|
The standard size of a register read or write |
STMPE offsets
PSTMPEOffsets = ^TSTMPEOffsets;
TSTMPEOffsets = record
Control Register offsets | |
SysCtrl:Byte;
|
|
IntCtrl:Byte;
|
|
IntEnable:Byte;
|
|
IntStatus:Byte;
|
|
GPIO Registers offsets | |
GPIOIntEnable:Byte;
|
|
GPIOIntStatus:Byte;
|
|
GPIOPinGet:Byte;
|
|
GPIOPinSet:Byte;
|
|
GPIOPinClr:Byte;
|
|
GPIODirSet:Byte;
|
|
GPIOFuncSet:Byte;
|
|
GPIOPullUp:Byte;
|
|
GPIOPullDown:Byte;
|
|
GPIOEdgeDetect:Byte;
|
|
GPIORisingEdge:Byte;
|
|
GPIOFallingEdge:Byte;
|
|
Touchscreen Register offsets (610 and 811 Only) | |
ADCCtrl1:Byte;
|
|
ADCCtrl2:Byte;
|
|
TSCCtrl:Byte;
|
|
TSCCfg:Byte;
|
|
FIFOThreshold:Byte;
|
|
FIFOStatus:Byte;
|
|
TSCDataXYZ:Byte;
|
|
TSCFractionZ:Byte;
|
|
TSCIDrive:Byte;
|
STMPE GPIO
PSTMPEGPIO = ^TSTMPEGPIO;
TSTMPEGPIO = record
GPIO Properties | |
GPIO:TGPIODevice;
|
|
STMPE Properties | |
Control:TSTMPEControl;
|
The control information (Chip, I2C, SPI etc) for this device |
Offsets:TSTMPEOffsets;
|
The register offsets for this device |
STMPE touch
PSTMPETouch = ^TSTMPETouch;
TSTMPETouch = record
Touch Properties | |
Touch:TTouchDevice;
|
|
General Properties | |
MaxX:Word;
|
Maximum X value for this device |
MaxY:Word;
|
Maximum Y value for this device |
MaxZ:Word;
|
Maximum Z value for this device |
Width:Word;
|
Screen width for this device |
Height:Word;
|
Screen height for this device |
MaxPoints:LongWord;
|
Maximum touch points for this device |
STMPE Properties | |
Control:TSTMPEControl;
|
The control information (Chip, I2C, SPI etc) for this device |
Offsets:TSTMPEOffsets;
|
The register offsets for this device |
Timer:TTimerHandle;
|
Handle for touch release timer |
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
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;
2C | 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 |
STMPE GPIO functions
function STMPEGPIOStart(GPIO:PGPIODevice):LongWord;
Note | Not intended to be called directly by applications, use GPIODeviceStart instead. |
---|
function STMPEGPIOStop(GPIO:PGPIODevice):LongWord;
Note | Not intended to be called directly by applications, use GPIODeviceStop instead. |
---|
function STMPEGPIORead(GPIO:PGPIODevice; Reg:LongWord):LongWord;
Note | Not intended to be called directly by applications, use GPIODeviceRead instead. |
---|
procedure STMPEGPIOWrite(GPIO:PGPIODevice; Reg,Value:LongWord);
Note | Not intended to be called directly by applications, use GPIODeviceWrite instead. |
---|
function STMPEGPIOInputGet(GPIO:PGPIODevice; Pin:LongWord):LongWord;
Note | Not intended to be called directly by applications, use GPIODeviceInputGet instead. |
---|
function STMPEGPIOOutputSet(GPIO:PGPIODevice; Pin,Level:LongWord):LongWord;
Note | Not intended to be called directly by applications, use GPIODeviceOutputSet instead. |
---|
function STMPEGPIOPullGet(GPIO:PGPIODevice; Pin:LongWord):LongWord;
Note | Not intended to be called directly by applications, use GPIODevicePullGet instead. |
---|
function STMPEGPIOPullSelect(GPIO:PGPIODevice; Pin,Mode:LongWord):LongWord;
Note | Not intended to be called directly by applications, use GPIODevicePullSelect instead. |
---|
function STMPEGPIOFunctionGet(GPIO:PGPIODevice; Pin:LongWord):LongWord;
Note | Not intended to be called directly by applications, use GPIODeviceFunctionGet instead. |
---|
function STMPEGPIOFunctionSelect(GPIO:PGPIODevice; Pin,Mode:LongWord):LongWord;
Note | Not intended to be called directly by applications, use GPIODeviceFunctionSelect instead. |
---|
STMPE touch functions
function STMPETouchStart(Touch:PTouchDevice):LongWord;
Note | Not intended to be called directly by applications, use TouchDeviceStart instead. |
---|
function STMPETouchStop(Touch:PTouchDevice):LongWord;
Note | Not intended to be called directly by applications, use TouchDeviceStop instead. |
---|
function STMPETouchUpdate(Touch:PTouchDevice):LongWord;
Note | Not intended to be called directly by applications, use TouchDeviceUpdate instead. |
---|
procedure STMPETouchTimer(Touch:PSTMPETouch);
Note | Not intended to be called directly by applications |
---|
procedure STMPETouchCallback(Touch:PSTMPETouch; Pin,Trigger:LongWord);
Note | Not intended to be called directly by applications |
---|
STMPE helper functions
function STMPEReadByte(Control:PSTMPEControl; Reg:Byte; Value:PByte):LongWord;
Note | None documented |
---|
function STMPEWriteByte(Control:PSTMPEControl; Reg,Value:Byte):LongWord;
Note | None documented |
---|
function STMPEReadWord(Control:PSTMPEControl; Reg:Byte; Value:PWord):LongWord;
Note | None documented |
---|
function STMPEWriteWord(Control:PSTMPEControl; Reg:Byte; Value:Word):LongWord;
Note | None documented |
---|
function STMPEReadBytes(Control:PSTMPEControl; Reg,Len:Byte; Values:PByte):LongWord;
Note | None documented |
---|
function STMPEWriteBytes(Control:PSTMPEControl; Reg,Len:Byte; Values:PByte):LongWord;
Note | None documented |
---|
function STMPESetBits(Control:PSTMPEControl; Reg,Mask,Value:Byte):LongWord;
Note | None documented |
---|
function STMPEResetFIFO(Control:PSTMPEControl; Reg:Byte):LongWord;
Note | None documented |
---|
Return to Unit Reference