add deinit func in esp8266 driver
This commit is contained in:
@@ -475,3 +475,18 @@ int esp8266_sal_init(hal_uart_port_t uart_port)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int esp8266_sal_deinit()
|
||||
{
|
||||
int id = 0;
|
||||
|
||||
for (id = 0; id < AT_DATA_CHANNEL_NUM; ++id) {
|
||||
tos_sal_module_close(id);
|
||||
}
|
||||
|
||||
tos_sal_module_register_default();
|
||||
|
||||
tos_at_deinit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -40,5 +40,7 @@ int esp8266_sal_init(hal_uart_port_t uart_port);
|
||||
|
||||
int esp8266_join_ap(const char *ssid, const char *pwd);
|
||||
|
||||
int esp8266_sal_deinit(void);
|
||||
|
||||
#endif /* __ESP8266_H__ */
|
||||
|
||||
|
Reference in New Issue
Block a user