Skip to content

Commit

Permalink
lte/alt1250: Correspond to ALT1250_EVTBIT_RESTARTAPI event
Browse files Browse the repository at this point in the history
If the ALT1250_EVTBIT_RESTARTAPI event is received,
the ALT1250 daemon changes its state to handle LAPI normally.
  • Loading branch information
SPRESENSE authored and pkarashchenko committed Feb 8, 2024
1 parent 4c3dcb2 commit 2ac0adf
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lte/alt1250/alt1250_devevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,19 @@ static void perform_alt1250_apistopevt(FAR struct alt1250_s *dev)
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
****************************************************************************/
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 2ac0adf

Please sign in to comment.