Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: modem_ref_helper_for_v5_3_217
Diff: src/modem_ref.cpp
- Revision:
- 23:5553f9541759
- Parent:
- 21:d5018a680915
- Child:
- 24:3d8dd1d6e3de
--- a/src/modem_ref.cpp	Thu Dec 21 14:30:17 2017 +0000
+++ b/src/modem_ref.cpp	Wed Jan 31 11:34:16 2018 +0000
@@ -74,13 +74,13 @@
     int id = -1;
     s8 err = ALP_ERR_NONE;
     u8 eop;
-    //REF_PRINT("input 0x%x/%d Bytes\n",flowid,size);
+    REF_PRINT("input 0x%x/%d Bytes\n",flowid,size);
     switch (flowid)
     {
         case WC_FLOW_ALP_UNS:
         case WC_FLOW_ALP_CMD:
             rem -= alp_parse_chunk(&p, &r);
-            //REF_PRINT("Rem %d Bytes\n", rem);
+            PRINT_DATA("", "%02X", p, rem, "\n");
             // This should always be a TAG'ed request in case of FS access...
             if (r.type == ALP_OPCODE_TAG)
             {
@@ -88,8 +88,8 @@
                 while(rem>0)
                 {
                     // Parse File Operation
-                    rem -= alp_parse_chunk(&p, &r);
-                    //REF_PRINT("ALP OP[%d]\n",r.type);
+                    rem -= alp_parse_chunk(&p, &r);;
+                    REF_PRINT("ALP OP[%d] rem %d\n", r.type, rem);
                     switch (r.type)
                     {
                         case ALP_OPCODE_F_RD_DATA:
@@ -98,7 +98,8 @@
                             g_modem.cb->read(r.meta.f_data.fid,r.meta.f_data.offset,r.meta.f_data.length,id);
                             break;
                         case ALP_OPCODE_F_WR_DATA:
-                            g_modem.cb->write(r.meta.f_data.fid,r.data,r.meta.f_data.offset,r.meta.f_data.length,id);
+                            REF_PRINT("ALP_OPCODE_F_WR_DATA[%d] %d %d %d\n", id, r.meta.f_data.fid, r.meta.f_data.offset, r.meta.f_data.length);
+                            g_modem.cb->write(r.meta.f_data.fid, r.data, r.meta.f_data.offset, r.meta.f_data.length, id);
                             break;
                         case ALP_OPCODE_F_RD_PROP:
                             g_modem.cb->read_fprop(r.meta.f_data.fid,id);
@@ -113,7 +114,9 @@
                             ASSERT(false,"ASSERT: Unsupported ALP File Operation: %d\n",r.type);
                             break;
                     }
+                    REF_PRINT("ALP Parsing done. rem %d\n", rem);
                 }
+                REF_PRINT("ALP Packet done.\n");
             }
             else
             {