Skip to content

Commit

Permalink
bitbang spi reverted
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffmannjan committed Mar 14, 2019
1 parent 4229688 commit 6c06088
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
26 changes: 18 additions & 8 deletions Adafruit_STMPE610.cpp
Expand Up @@ -36,25 +36,35 @@
static SPISettings mySPISettings;

/*!
* @brief Instantiates a new STMPE610 class using provided SPI
* @brief Instantiates a new STMPE610 class using bitbang SPI
* @param cspin
* CS pin
* @param mosipin
* MOSI pin (default to -1)
* MOSI pin
* @param misopin
* MISO pin (default to -1)
* MISO pin
* @param clkpin
* CLK pin (default to -1)
* @param *theSPI
* spi object
* CLK pin
*/
Adafruit_STMPE610::Adafruit_STMPE610(uint8_t cspin, uint8_t mosipin,
uint8_t misopin, uint8_t clkpin,
SPIClass *theSPI) {
uint8_t misopin, uint8_t clkpin) {
_CS = cspin;
_MOSI = mosipin;
_MISO = misopin;
_CLK = clkpin;
}

/*!
* @brief Instantiates a new STMPE610 using provided SPI
* @param cspin
* CS pin
* @param *theSPI
* spi object
*/
Adafruit_STMPE610::Adafruit_STMPE610(uint8_t cspin,
SPIClass *theSPI) {
_CS = cspin;
_MOSI = _MISO = _CLK = -1;
_spi = theSPI;
}

Expand Down
5 changes: 3 additions & 2 deletions Adafruit_STMPE610.h
Expand Up @@ -151,8 +151,9 @@ class TS_Point {
*/
class Adafruit_STMPE610 {
public:
Adafruit_STMPE610(uint8_t cspin, uint8_t mosipin = -1, uint8_t misopin = -1,
uint8_t clkpin = -1, SPIClass *theSPI = &SPI);
Adafruit_STMPE610(uint8_t cspin, uint8_t mosipin, uint8_t misopin,
uint8_t clkpin);
Adafruit_STMPE610(uint8_t cspin, SPIClass *theSPI = &SPI);
Adafruit_STMPE610(TwoWire *theWire = &Wire);

boolean begin(uint8_t i2caddr = STMPE_ADDR);
Expand Down

0 comments on commit 6c06088

Please sign in to comment.