Helper library to use modem_ref driver.

Dependencies:   WizziCom WizziDebug ram_fs modem_ref

Dependents:   D7A_Localisation D7A_1x_demo_send_file_data_and_forget D7A_1x_demo_CodeUpgradeProtocol D7A_1x_demo_LoRaWAN ... more

Revision:
80:c2e45d6eab29
Parent:
77:5146f44cde83
--- a/modem_d7a.cpp	Fri Sep 24 12:36:50 2021 +0000
+++ b/modem_d7a.cpp	Fri Oct 01 08:46:58 2021 +0000
@@ -19,16 +19,13 @@
 static WizziCom* g_modem_com;
 
 // Callback for id User
-static void modem_cb(uint8_t terminal, int8_t err, uint8_t id)
+static void modem_cb(uint8_t id)
 {
     (void)id;
     
-    //PRINT("CB EOP:%d ERR:%d ID:%d\n", terminal, err, id);
+    HELPER_PRINT("CB ID:%d\n", id);
 
-    if (terminal)
-    {
-        g_s[id].release();
-    }
+    g_s[id].release();
 }
 
 static int g_boot_nb;
@@ -38,17 +35,6 @@
 static int g_pwc_nb;
 static int g_fail_nb;
 
-int modem_wait_resp(Semaphore* s, uint32_t timeout, char* function, uint32_t line)
-{
-    if (!s->try_acquire_for(timeout))
-    {
-        PRINT("%s:%d: Modem resp timeout after %d ms\n", function, line, timeout);
-        return -1;
-    }
-
-    return 0;
-}
-
 int my_alp_itf_d7a_cfg_size(d7a_sp_cfg_t* cfg)
 {
     int size = sizeof(d7a_sp_cfg_t) - sizeof(d7a_addressee_t);
@@ -212,7 +198,7 @@
     PRINT("-----------------------------------------\r\n");
     FLUSH();
 
-    //modem_cup_update(&rev);
+    modem_cup_update(&rev);
 
     return 0;
 }
@@ -236,6 +222,7 @@
     modem_ref_alp(itf, alp, alp_rsp, id);
     if (!g_s[id].try_acquire_for(timeout))
     {
+        PRINT("Modem_d7a timeout (%dms) on id %d\n", timeout, id);
         err = ALP_ERR_UNKNOWN;
     }
     else