mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
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.
This commit is contained in:
parent
4c3dcb2044
commit
2ac0adf37d
1 changed files with 19 additions and 0 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue