Class that stores state and functions for interacting with STMPE610.
More...
#include <Adafruit_STMPE610.h>
Class that stores state and functions for interacting with STMPE610.
◆ Adafruit_STMPE610() [1/3]
Adafruit_STMPE610::Adafruit_STMPE610 |
( |
uint8_t |
cspin, |
|
|
uint8_t |
mosipin, |
|
|
uint8_t |
misopin, |
|
|
uint8_t |
clkpin |
|
) |
| |
Instantiates a new STMPE610 class using bitbang SPI.
- Parameters
-
cspin | CS pin |
mosipin | MOSI pin |
misopin | MISO pin |
clkpin | CLK pin |
◆ Adafruit_STMPE610() [2/3]
Adafruit_STMPE610::Adafruit_STMPE610 |
( |
uint8_t |
cspin, |
|
|
SPIClass * |
theSPI = &SPI |
|
) |
| |
Instantiates a new STMPE610 using provided SPI.
- Parameters
-
cspin | CS pin |
*theSPI | spi object |
◆ Adafruit_STMPE610() [3/3]
Adafruit_STMPE610::Adafruit_STMPE610 |
( |
TwoWire * |
theWire = &Wire | ) |
|
Instantiates a new STMPE610 using provided Wire.
- Parameters
-
◆ begin()
boolean Adafruit_STMPE610::begin |
( |
uint8_t |
i2caddr = STMPE_ADDR | ) |
|
Setups the HW.
- Parameters
-
i2caddr | I2C address (defaults to STMPE_ADDR) |
- Returns
- True if process is successful
◆ writeRegister8()
void Adafruit_STMPE610::writeRegister8 |
( |
uint8_t |
reg, |
|
|
uint8_t |
val |
|
) |
| |
Writes 8 bit of data to specified register.
- Parameters
-
reg | The register |
val | Value to write |
◆ readRegister16()
uint16_t Adafruit_STMPE610::readRegister16 |
( |
uint8_t |
reg | ) |
|
Reads 16 bits of data from specified register.
- Parameters
-
- Returns
- Data in the register
◆ readRegister8()
uint8_t Adafruit_STMPE610::readRegister8 |
( |
uint8_t |
reg | ) |
|
Reads 8bit of data from specified register.
- Parameters
-
- Returns
- Data in the register
◆ readData()
void Adafruit_STMPE610::readData |
( |
uint16_t * |
x, |
|
|
uint16_t * |
y, |
|
|
uint8_t * |
z |
|
) |
| |
Reads touchscreen data.
- Parameters
-
*x | The x coordinate |
*y | The y coordinate |
*z | The z coordinate |
◆ getVersion()
uint16_t Adafruit_STMPE610::getVersion |
( |
| ) |
|
Returns the STMPE610 version number.
- Returns
- The STMPE610 version number
◆ touched()
boolean Adafruit_STMPE610::touched |
( |
| ) |
|
Returns true if touched, false otherwise.
- Returns
- True if if touched, false otherwise
◆ bufferEmpty()
boolean Adafruit_STMPE610::bufferEmpty |
( |
| ) |
|
Checks if buffer is empty.
- Returns
- True if empty, false otherwise
◆ bufferSize()
uint8_t Adafruit_STMPE610::bufferSize |
( |
| ) |
|
Returns the FIFO buffer size.
- Returns
- The FIFO buffer size
◆ getPoint()
TS_Point Adafruit_STMPE610::getPoint |
( |
| ) |
|
Returns point for touchscreen data.
- Returns
- The touch point using TS_Point
The documentation for this class was generated from the following files: