STMPE610 touch sensor driver library

Dependents:   TS_Eyes Tokei testUniGraphic_150217 AfficheurTFTAdafruit ... more

Files at this revision

API Documentation at this revision

Comitter:
Rhyme
Date:
Wed Nov 25 11:44:15 2015 +0000
Parent:
9:21f92cef6dca
Child:
13:09fece599665
Commit message:
spi_format for NUCLEO_F411RE added in the constructor

Changed in this revision

SPI_STMPE610.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/SPI_STMPE610.cpp	Thu Nov 19 13:10:11 2015 +0000
+++ b/SPI_STMPE610.cpp	Wed Nov 25 11:44:15 2015 +0000
@@ -138,8 +138,12 @@
     m_cs = 0 ;
     _mode = 0 ;
     m_spi.frequency(1000000) ;
+#if defined (TARGET_NUCLEO_F411RE)
+    m_spi.format(8, 1) ; /* works with st nucleo F411RE */
+#else
     m_spi.format(8, 0) ; /* works with freescale FRDMs */
-//    m_spi.format(8, 1) ; /* works with st nucleo F411RE */
+#endif 
+
     write8(REG_SYS_CTRL1, REG_SYS_CTRL1_RESET) ;
     wait(0.1) ;
     write8(REG_SYS_CTRL2, 0x00) ; // turn on clocks