STMPE610 touch sensor driver library
Dependents: TS_Eyes Tokei testUniGraphic_150217 AfficheurTFTAdafruit ... more
Diff: SPI_STMPE610.cpp
- Revision:
- 10:dc5912872d41
- Parent:
- 8:e4b4cf8cf7d6
- Child:
- 13:09fece599665
diff -r 21f92cef6dca -r dc5912872d41 SPI_STMPE610.cpp
--- 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