fix a bug in tencent_firmware wrapper

This commit is contained in:
mculover666
2020-09-01 15:37:21 +08:00
parent 02d52c6caa
commit 1c0c391ceb
3 changed files with 8 additions and 6 deletions

View File

@@ -487,6 +487,8 @@ tencent_firmware_module_t tencent_firmware_module_esp8266 = {
int esp8266_tencent_firmware_sal_init(hal_uart_port_t uart_port)
{
int ret = -1;
if (tos_at_init(uart_port, esp8266_tencent_firmware_at_event,
sizeof(esp8266_tencent_firmware_at_event) /
sizeof(esp8266_tencent_firmware_at_event[0])) != 0) {
@@ -497,8 +499,8 @@ int esp8266_tencent_firmware_sal_init(hal_uart_port_t uart_port)
return -1;
}
if (tos_tf_module_init() != 0) {
return -1;
if ((ret = tos_tf_module_init()) != 0) {
return ret;
}
return 0;