Exportable version of WizziLab's modem driver.

Dependents:   modem_ref_helper

Revision:
62:75d819d68e5f
Parent:
61:820395fc5572
Child:
63:544a488a06d3
--- a/src/alp_payload.cpp	Tue Sep 07 15:58:51 2021 +0000
+++ b/src/alp_payload.cpp	Tue Sep 21 08:47:52 2021 +0000
@@ -87,28 +87,23 @@
     return alp_1;
 }
 
-static void _alp_payload_print(alp_payload_t* alp, u32 action)
-{
-    if (NULL == alp)
-    {
-        return;
-    }
-
-    u32 i;
-    PRINT("ALP[%d]: ", action);
-    for (i = 0; i < alp->len; i++)
-    {
-        PRINT("%02X ", alp->d[i]);
-    }
-    PRINT("\n");
-    FLUSH();
-
-    _alp_payload_print(alp->next, ++action);
-}
-
 void alp_payload_print(alp_payload_t* alp)
 {
-    _alp_payload_print(alp, 0);
+    u32 action = 0;
+    u32 i;
+    
+    while (alp != NULL)
+    {
+        PRINT("ALP[%d]:", action);
+        PRINT_DATA("", " %02X", alp->d, alp->len, "\n");
+        FLUSH();
+        
+        action++;
+        
+        alp = alp->next;
+    }
+    
+    PRINT("---\n");
 }
 
 u32 alp_payload_to_buf(alp_payload_t* alp, u8* buf, u32 offset, u32 max)