Skip to content

Commit

Permalink
lte/alt1250: Add internal function to get LTE API progress
Browse files Browse the repository at this point in the history
Add internal function to check for LTE APIs being processed by
Daemon.
  • Loading branch information
SPRESENSE committed Jan 26, 2023
1 parent dd9f975 commit 4fba2bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions lte/alt1250/alt1250_daemon.h
Expand Up @@ -134,6 +134,7 @@ struct alt1250_s
#ifdef CONFIG_LTE_ALT1250_ENABLE_HIBERNATION_MODE
int alt1250_set_api_enable(FAR struct alt1250_s *dev, bool enable);
int alt1250_count_opened_sockets(FAR struct alt1250_s *dev);
int alt1250_is_api_in_progress(FAR struct alt1250_s *dev);
#endif

#endif /* __LTE_ALT1250_ALT1250_DAEMON_H__ */
10 changes: 10 additions & 0 deletions lte/alt1250/alt1250_main.c
Expand Up @@ -306,4 +306,14 @@ int alt1250_count_opened_sockets(FAR struct alt1250_s *dev)

return ret;
}

int alt1250_is_api_in_progress(FAR struct alt1250_s *dev)
{
if (!dev)
{
return ERROR;
}

return dev->is_usockrcvd ? 1 : 0;
}
#endif

0 comments on commit 4fba2bd

Please sign in to comment.