add deinit func in sal wrapper and ec20
This commit is contained in:
@@ -551,3 +551,18 @@ int ec20_sal_init(hal_uart_port_t uart_port)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ec20_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;
|
||||
}
|
||||
|
||||
|
@@ -20,12 +20,8 @@
|
||||
|
||||
#include "tos_hal.h"
|
||||
|
||||
typedef enum sal_send_mode {
|
||||
SAL_SEND_MODE_NORMAL,
|
||||
SAL_SEND_MODE_TRANSPARENT,
|
||||
} sal_send_mode_t;
|
||||
|
||||
int ec20_sal_init(hal_uart_port_t uart_port);
|
||||
int ec20_sal_deinit(void);
|
||||
|
||||
#endif /* __EC20_H__ */
|
||||
|
||||
|
Reference in New Issue
Block a user