Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/src/sm_at_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ static bool exit_datamode(void)
rsp_send("\r\n#XDATAMODE: %d\r\n", datamode_handler_result);
datamode_handler_result = 0;

sm_at_socket_notify_datamode_exit();

LOG_INF("Exit datamode");
ret = true;
}
Expand Down Expand Up @@ -873,6 +875,11 @@ bool in_datamode(void)
return (get_sm_mode() == SM_DATA_MODE);
}

bool in_at_mode(void)
{
return (get_sm_mode() == SM_AT_COMMAND_MODE);
}

bool exit_datamode_handler(int result)
{
bool ret = false;
Expand Down
7 changes: 7 additions & 0 deletions app/src/sm_at_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@ int enter_datamode(sm_datamode_handler_t handler, size_t data_len);
*/
bool in_datamode(void);

/**
* @brief Check whether Serial Modem AT host is in AT command mode
*
* @retval true if yes, false if no.
*/
bool in_at_mode(void);

/**
* @brief Exit the data mode handler
*
Expand Down
Loading