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: modem_ref.cpp
- Revision:
- 9:2f921fe9c519
- Parent:
- 8:97875739f11a
- Child:
- 10:24878b4c3cee
--- a/modem_ref.cpp Tue May 16 10:24:52 2017 +0000 +++ b/modem_ref.cpp Wed May 17 13:53:08 2017 +0000 @@ -74,6 +74,7 @@ case WC_FLOW_ALP_UNS: case WC_FLOW_ALP_CMD: rem -= alp_parse_chunk(&p, &r); + REF_PRINT("Rem %d Bytes\n", rem); // This should always be a TAG'ed request in case of FS access... if (r.type == ALP_OPCODE_TAG) { @@ -108,11 +109,13 @@ } else { + bool first = true; // ... or a 'real' URC (or ISTATUS if enabled on modem) g_modem.istatus = (modem_istatus_t){0}; - while(rem>0) + do { - rem -= alp_parse_chunk(&p, &r); + + switch (r.type) { case ALP_OPCODE_RSP_ISTATUS: @@ -139,6 +142,7 @@ g_modem.istatus.type, g_modem.istatus.length, g_modem.istatus.data); + break; case ALP_OPCODE_RSP_URC: if (r.meta.urc.type == ALP_URC_TYPE_LQUAL) g_modem.cb->lqual(r.meta.urc.ifid,r.meta.urc.per); @@ -151,7 +155,15 @@ ASSERT(false,"ASSERT: Unsupported ALP URC: %d\n",r.type); break; } - } + + int tem = alp_parse_chunk(&p, &r); + if (!tem) + { + break; + } + rem -= tem; + } while (rem>=0); + } break; case WC_FLOW_ALP_RESP: