NM500 / NeuroShield

Dependents:   NeuroShield_SimpleScript NeuroShield_andIMU NeuroShield_Gesture_Recognition

Files at this revision

API Documentation at this revision

Comitter:
nepes_ai
Date:
Tue Feb 11 00:48:18 2020 +0000
Parent:
2:2812bcbcaaea
Commit message:
Release version 1.1.5

Changed in this revision

NeuroShield.cpp Show annotated file Show diff for this revision Revisions of this file
NeuroShield.h Show annotated file Show diff for this revision Revisions of this file
NeuroShieldSPI.cpp Show annotated file Show diff for this revision Revisions of this file
NeuroShieldSPI.h Show annotated file Show diff for this revision Revisions of this file
--- a/NeuroShield.cpp	Fri Jun 22 06:17:56 2018 +0000
+++ b/NeuroShield.cpp	Tue Feb 11 00:48:18 2020 +0000
@@ -32,7 +32,8 @@
  */
 
 /*
- * Revision History (v1.1.4)
+ * Revision History (v1.1.5)
+ * 2020/02/04    v1.1.5    Add dummy for switching between sd-card and nm spi
  * 2018/06/22    v1.1.4    Minor changes
  * 2018/01/03    v1.1.3    Add burst-mode read
  * 2017/12/20    v1.1.2    Modify the structure of neurondata
--- a/NeuroShield.h	Fri Jun 22 06:17:56 2018 +0000
+++ b/NeuroShield.h	Tue Feb 11 00:48:18 2020 +0000
@@ -32,7 +32,8 @@
  */
 
 /*
- * Revision History (v1.1.4)
+ * Revision History (v1.1.5)
+ * 2020/02/04    v1.1.5    Add dummy for switching between sd-card and nm spi
  * 2018/06/22    v1.1.4    Minor changes
  * 2018/01/03    v1.1.3    Add burst-mode read
  * 2017/12/20    v1.1.2    Modify the structure of neurondata
--- a/NeuroShieldSPI.cpp	Fri Jun 22 06:17:56 2018 +0000
+++ b/NeuroShieldSPI.cpp	Tue Feb 11 00:48:18 2020 +0000
@@ -32,7 +32,8 @@
  */
 
 /*
- * Revision History (v1.1.4)
+ * Revision History (v1.1.5)
+ * 2020/02/04    v1.1.5    Add dummy for switching between sd-card and nm spi
  * 2018/06/22    v1.1.4    Minor changes
  * 2018/01/03    v1.1.3    Add burst-mode read
  * 2017/12/20    v1.1.2    Modify the structure of neurondata
@@ -91,6 +92,8 @@
 {
     //device.lock();
     
+    device.write(0xff);                     // dummy for switching between sd-card and nm spi
+    
     nm500_ss = LOW;
     device.write(1);                        // Dummy for ID
     device.write((uint8_t)module_nm500);
@@ -113,6 +116,8 @@
 {
     //device.lock();
     
+    device.write(0xff);                                 // dummy for switching between sd-card and nm spi
+    
     nm500_ss = LOW;
     device.write(1);
     device.write((uint8_t)module_nm500);
@@ -139,6 +144,8 @@
 {
     //device.lock();
     
+    device.write(0xff);                                 // dummy for switching between sd-card and nm spi
+    
     nm500_ss = LOW;
     device.write(1);                                    // Dummy for ID
     device.write((uint8_t)(module_nm500 + 0x80));       // module and write flag
@@ -171,6 +178,8 @@
     
     //device.lock();
     
+    device.write(0xff);                             // dummy for switching between sd-card and nm spi
+    
     nm500_ss = LOW;
     device.write(1);                                // Dummy for ID
     device.write((uint8_t)(module_nm500 + 0x80));   // module and write flag
@@ -199,6 +208,8 @@
     
     //device.lock();
     
+    device.write(0xff);                             // dummy for switching between sd-card and nm spi
+    
     nm500_ss = LOW;
     device.write(1);                                // Dummy for ID
     device.write((uint8_t)(module_nm500 + 0x80));   // module and write flag
@@ -227,9 +238,11 @@
 {
     //device.lock();
     
+    device.write(0xff);                     // dummy for switching between sd-card and nm spi
+    
     nm500_ss = LOW;
     device.write(1);                        // Dummy for ID
-    device.write((uint8_t)module_fpga);   // address (4-byte)
+    device.write((uint8_t)module_fpga);     // address (4-byte)
     device.write(0);
     device.write(0);
     device.write(1);                        // version check : 0x01
@@ -252,6 +265,8 @@
 {
     //device.lock();
     
+    device.write(0xff);                             // dummy for switching between sd-card and nm spi
+    
     nm500_ss = LOW;
     device.write(1);                                // Dummy for ID
     device.write((uint8_t)(module_fpga + 0x80));    // address (4-byte)
@@ -275,6 +290,8 @@
 {
     //device.lock();
     
+    device.write(0xff);                             // dummy for switching between sd-card and nm spi
+    
     nm500_ss = LOW;
     device.write(1);                                // Dummy for ID
     device.write((uint8_t)(module_led + 0x80));     // address (4-byte)
--- a/NeuroShieldSPI.h	Fri Jun 22 06:17:56 2018 +0000
+++ b/NeuroShieldSPI.h	Tue Feb 11 00:48:18 2020 +0000
@@ -32,7 +32,8 @@
  */
 
 /*
- * Revision History (v1.1.4)
+ * Revision History (v1.1.5)
+ * 2020/02/04    v1.1.5    Add dummy for switching between sd-card and nm spi
  * 2018/06/22    v1.1.4    Minor changes
  * 2018/01/03    v1.1.3    Add burst-mode read
  * 2017/12/20    v1.1.2    Modify the structure of neurondata