Motoo Tanaka / SPI_STMPE610

Dependents:   TS_Eyes Tokei testUniGraphic_150217 AfficheurTFTAdafruit ... more

Files at this revision

API Documentation at this revision

Comitter:
Rhyme
Date:
Wed Nov 25 11:41:27 2015 +0000
Parent:
9:21f92cef6dca
Commit message:
spi_format for NUCLEO F411RE included 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:41:27 2015 +0000
@@ -138,7 +138,11 @@
     m_cs = 0 ;
     _mode = 0 ;
     m_spi.frequency(1000000) ;
+#if defined (TARGET_NUCLEO_F411RE)
+    m_spi.format(8, 1) ;
+#else
     m_spi.format(8, 0) ; /* works with freescale FRDMs */
+#endif
 //    m_spi.format(8, 1) ; /* works with st nucleo F411RE */
     write8(REG_SYS_CTRL1, REG_SYS_CTRL1_RESET) ;
     wait(0.1) ;