Kenta Tanabe / TRP105F_Spline_for_child

Fork of TRP105F_Spline by Akifumi Takahashi

Revision:
25:1dba430435cf
Parent:
23:772a9736ee59
diff -r 772a9736ee59 -r 1dba430435cf TRP105FS_SPIWrapper.cpp
--- a/TRP105FS_SPIWrapper.cpp	Thu Sep 01 09:37:34 2016 +0000
+++ b/TRP105FS_SPIWrapper.cpp	Fri Oct 14 06:59:56 2016 +0000
@@ -5,9 +5,12 @@
 //
 SPI
 SPI_TRP105FS::spi(p5,p6,p7);  // mosi(out), miso(in), sclk(clock)
+SPI_TRP105FS::spi2(p11,p12,p13);  // mosi(out), miso(in), sclk(clock)
 
 DigitalOut
-SPI_TRP105FS::cs(p9);           // cs (the chip select signal)
+SPI_TRP105FS::cs(p8);           // cs (the chip select signal)
+SPI_TRP105FS::cs2(p14);           // cs (the chip select signal)
+
 
 //
 //  For SPI, Define static method
@@ -18,9 +21,9 @@
     
     int command = (13|(ch<<1))<<11;
         __disable_irq(); // 割り込み禁止
-    cs=0;
-    int resultbyte=spi.write(command) & 0x3ff;
-    cs=1;
+    cs2=0;
+    int resultbyte=spi2.write(command) & 0x3ff;
+    cs2=1;
         __enable_irq(); // 割り込み許可
     return(resultbyte);
 }