Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SPI_STMPE610 TFT_fonts UniGraphic mbed
Fork of TFT_test_frdm-kl25z by
Diff: SPI_STMPE610.h
- Revision:
- 0:6b8a2d4c88b3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SPI_STMPE610.h Fri Oct 31 01:16:01 2014 +0000
@@ -0,0 +1,58 @@
+/* mbed SPI_STMPE610.h to test adafruit 2.8" TFT LCD shiled w Touchscreen
+ * Copyright (c) 2014 Motoo Tanaka @ Design Methodology Lab
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#ifndef SPI_STMPE610_H
+#define SPI_STMPE610_H
+
+#include "mbed.h"
+
+/**
+ * STMPE610 Touch Sensor
+ *
+ *
+ */
+
+class SPI_STMPE610
+{
+public:
+ /**
+ * STMPE610 constructor
+ *
+ * @param mosi SPI_MOSI pin
+ * @param miso SPI_MISO pin
+ * @param sclk SPI_CLK pin
+ * @param cs SPI_CS pin
+ */
+ SPI_STMPE610(PinName mosi, PinName miso, PinName sclk, PinName cs) ;
+
+ ~SPI_STMPE610() ;
+
+ /*
+ * some member functions here (yet to be written)
+ */
+
+ SPI m_spi;
+ DigitalOut m_cs ;
+ int _mode ;
+
+ void readRegs(int addr, uint8_t *data, int len) ;
+ void writeRegs(uint8_t *data, int len) ;
+ uint8_t read8(int addr) ;
+ void write8(int addr, uint8_t data) ;
+ uint16_t read16(int addr) ;
+ void write16(int addr, uint16_t data) ;
+
+ int getRAWPoint(uint16_t *x, uint16_t *y, uint16_t *z) ;
+
+ private:
+} ;
+#endif /* SPI_STMPE610_H */
\ No newline at end of file
