Skip to content

Commit

Permalink
Close #262: Add API wifi_manager_stop (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSomeMan authored Sep 15, 2023
1 parent 8e10e8f commit 3d6488c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/include/wifi_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ wifi_manager_stop_ap(void);
void
wifi_manager_start_ap(const bool flag_block_req_from_lan);

/**
* @brief Stop Wi-Fi Manger
*/
void
wifi_manager_stop(void);

/**
* @brief requests a connection to an access point that will be process in the main task thread.
*/
Expand Down
9 changes: 9 additions & 0 deletions src/wifi_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,15 @@ wifi_manager_start_ap(const bool flag_block_req_from_lan)
wifiman_msg_send_cmd_start_ap(flag_block_req_from_lan);
}

void
wifi_manager_stop(void)
{
if (!wifiman_msg_send_cmd_stop_and_destroy())
{
LOG_ERR("%s failed", "wifiman_msg_send_cmd_stop_and_destroy");
}
}

static void
wifi_manager_timer_cb_task_watchdog_feed(const os_timer_periodic_cptr_without_arg_t* const p_timer)
{
Expand Down

0 comments on commit 3d6488c

Please sign in to comment.