You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2024/02/08 21:52:53 UTC

(nuttx-apps) branch master updated: lte/alt1250: Correspond to ALT1250_EVTBIT_RESTARTAPI event

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 2ac0adf37 lte/alt1250: Correspond to ALT1250_EVTBIT_RESTARTAPI event
2ac0adf37 is described below

commit 2ac0adf37d3ec5d7fe83418331f8bf866b679d79
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Wed Dec 6 16:51:45 2023 +0900

    lte/alt1250: Correspond to ALT1250_EVTBIT_RESTARTAPI event
    
    If the ALT1250_EVTBIT_RESTARTAPI event is received,
    the ALT1250 daemon changes its state to handle LAPI normally.
---
 lte/alt1250/alt1250_devevent.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/lte/alt1250/alt1250_devevent.c b/lte/alt1250/alt1250_devevent.c
index 7d16f53ae..118f31254 100644
--- a/lte/alt1250/alt1250_devevent.c
+++ b/lte/alt1250/alt1250_devevent.c
@@ -298,6 +298,19 @@ exit:
   altdevice_powerresponse(dev->altfd, LTE_CMDID_STOPAPI, ret);
 }
 
+/****************************************************************************
+ * Name: perform_alt1250_restartevt
+ ****************************************************************************/
+
+static void perform_alt1250_restartevt(FAR struct alt1250_s *dev)
+{
+  /* All LTE API/Socket requests must be available. */
+
+  alt1250_set_api_enable(dev, true);
+
+  altdevice_powerresponse(dev->altfd, LTE_CMDID_RESTARTAPI, OK);
+}
+
 /****************************************************************************
  * Name: perform_alt1250_suspendevt
  ****************************************************************************/
@@ -398,6 +411,12 @@ int perform_alt1250events(FAR struct alt1250_s *dev)
 
       perform_alt1250_apistopevt(dev);
     }
+  else if (bitmap & ALT1250_EVTBIT_RESTARTAPI)
+    {
+      /* Handling API restart request */
+
+      perform_alt1250_restartevt(dev);
+    }
   else if (bitmap & ALT1250_EVTBIT_SUSPEND)
     {
       /* Handling Suspend request */