Fork of the offical HSP_RPC_GUI firmware

Dependencies:   USBDevice

Fork of MAXREFDES100 firmware for MAX32620HSP

Revision:
1:9490836294ea
Parent:
0:e4a10ed6eb92
Child:
3:8e9b9f5818aa
--- a/HSP/Devices/S25FS256/S25FS512_RPC.cpp	Tue Oct 25 15:22:11 2016 +0000
+++ b/HSP/Devices/S25FS256/S25FS512_RPC.cpp	Fri Apr 21 12:12:30 2017 -0500
@@ -45,6 +45,7 @@
   return 0;
 }
 
+//******************************************************************************
 int S25FS512_EnableHWReset(char argStrs[32][32], char replyStrs[32][32]) {
   uint32_t reply[1];
   Peripherals::s25FS512()->enableHWReset();
@@ -53,6 +54,7 @@
   return 0;
 }
 
+//******************************************************************************
 int S25FS512_SpiWriteRead(char argStrs[32][32], char replyStrs[32][32]) {
   uint8_t args[16];
   uint8_t reply[16];
@@ -67,6 +69,7 @@
   return 0;
 }
 
+//******************************************************************************
 int S25FS512_SpiWriteRead4Wire(char argStrs[32][32], char replyStrs[32][32]) {
   uint8_t args[16];
   uint8_t reply[16];
@@ -81,6 +84,7 @@
   return 0;
 }
 
+//******************************************************************************
 int S25FS512_ReadPage(char argStrs[32][32], char replyStrs[32][32]) {
   uint32_t args[2];
   uint32_t reply[1];
@@ -90,10 +94,10 @@
   return 0;
 }
 
+//******************************************************************************
 int S25FS512_ReadPagesBinary(char argStrs[32][32], char replyStrs[32][32]) {
   uint32_t args[2];
-  uint32_t reply[1];
-  uint8_t pageData[256];
+  uint8_t pageData[258];
 
   uint32_t startPage;
   uint32_t endPage;
@@ -104,13 +108,15 @@
   endPage = args[1];
   for (page = startPage; page <= endPage; page++) {
     Peripherals::s25FS512()->readPages_Helper(page, page, pageData, 0);
-    putBytes256Block(pageData, 1);
+    //putBytes256Block(pageData, 1);
+    pageData[sizeof(pageData) - 2] = 0x0D;
+    pageData[sizeof(pageData) - 1] = 0x0A;
+    putBytes(pageData, sizeof(pageData));
   }
-  reply[0] = 0x80;
-  FormatReply32(reply, sizeof(reply) / sizeof(uint32_t), replyStrs);
-  return 0;
+  return RPC_SKIP_CRLF;
 }
 
+//******************************************************************************
 int S25FS512_ReadId(char argStrs[32][32], char replyStrs[32][32]) {
   char str[32];
   uint8_t data[128];