diff --git a/vendor/platform/Simcom-A7670C/BoatPlatoneDemo/A7670CRootDirCode/sc_application.c b/vendor/platform/Simcom-A7670C/BoatPlatoneDemo/A7670CRootDirCode/sc_application.c index 185e32187..30142b31e 100644 --- a/vendor/platform/Simcom-A7670C/BoatPlatoneDemo/A7670CRootDirCode/sc_application.c +++ b/vendor/platform/Simcom-A7670C/BoatPlatoneDemo/A7670CRootDirCode/sc_application.c @@ -1,16 +1,26 @@ /** - ****************************************************************************** - * @file sc_application.c - * @author SIMCom OpenSDK Team - * @brief Source code for SIMCom OpenSDK application, void userSpace_Main(void * arg) is the app entry for OpenSDK application,customer should start application from this call. - ****************************************************************************** - * @attention - * - * Copyright (c) 2022 SIMCom Wireless. - * All rights reserved. - * - ****************************************************************************** - */ +**************************************************************************************** +* @FilePath: sc_application.c +* @Author: aitos +* @Date: 2023-02-21 11:22:10 +* @LastEditors: +* @LastEditTime: 2023-02-21 11:22:10 +* @Descripttion: +**************************************************************************************** +*/ +/** + ****************************************************************************** + * @file sc_application.c + * @author SIMCom OpenSDK Team + * @brief Source code for SIMCom OpenSDK application, void userSpace_Main(void * arg) is the app entry for OpenSDK application,customer should start application from this call. + ****************************************************************************** + * @attention + * + * Copyright (c) 2022 SIMCom Wireless. + * All rights reserved. + * + ****************************************************************************** + */ /* Includes ------------------------------------------------------------------*/ #include @@ -19,7 +29,7 @@ #include #include #include -#include "sc_ApiMap.h" +#include "api_map.h" #include "simcom_debug.h" #include "simcom_os.h" #include "simcom_uart.h" @@ -32,33 +42,32 @@ extern void sAPP_UsbVcomTask(void); extern void sAPP_PlatoneDemo(void); /** - * @brief OpenSDK app entry. - * @param Pointer arg - * @note This is the app entry,like main(),all functions must start from here!!!!!! - * @retval void - */ + * @brief OpenSDK app entry. + * @param Pointer arg + * @note This is the app entry,like main(),all functions must start from here!!!!!! + * @retval void + */ void userSpace_Main(void *arg) { - /* simcom api init. Do not modify! */ - ApiMapInit(arg); - // sAPI_enableDUMP(); - /* UI demo task for customer with CLI method for all demo running, - customer need to define SIMCOM_UI_DEMO_TO_USB_AT_PORT or - SIMCOM_UI_DEMO_TO_UART1_PORT to select hardware interface. - */ - sleep(5);//Wait for USB initialization to complete and print catstudio log. - - // sAPP_SimcomUIDemo(); + /* simcom api init. Do not modify! */ + ApiMapInit(arg); + // sAPI_enableDUMP(); + /* UI demo task for customer with CLI method for all demo running, + customer need to define SIMCOM_UI_DEMO_TO_USB_AT_PORT or + SIMCOM_UI_DEMO_TO_UART1_PORT to select hardware interface. + */ + sleep(5); // Wait for USB initialization to complete and print catstudio log. - sAPP_UartTask(); - sAPP_UrcTask(); - sAPP_UsbVcomTask(); - // sAPP_HelloWorldDemo(); - sAPP_PlatoneDemo(); - printf("user app is running..."); + // sAPP_SimcomUIDemo(); + sAPP_UartTask(); + sAPP_UrcTask(); + sAPP_UsbVcomTask(); + // sAPP_HelloWorldDemo(); + sAPP_PlatoneDemo(); + printf("user app is running..."); } #define _appRegTable_attr_ __attribute__((unused, section(".userSpaceRegTable"))) -#define appMainStackSize (1024*10) -userSpaceEntry_t userSpaceEntry _appRegTable_attr_ = {NULL, NULL, appMainStackSize, 30, "userSpaceMain", userSpace_Main, NULL }; \ No newline at end of file +#define appMainStackSize (1024 * 10) +userSpaceEntry_t userSpaceEntry _appRegTable_attr_ = {NULL, NULL, appMainStackSize, 30, "userSpaceMain", userSpace_Main, NULL}; \ No newline at end of file diff --git a/vendor/platform/Simcom-A7670C/src/port_crypto_default/boatplatform_internal.c b/vendor/platform/Simcom-A7670C/src/port_crypto_default/boatplatform_internal.c index 3faa9326d..d18b05261 100644 --- a/vendor/platform/Simcom-A7670C/src/port_crypto_default/boatplatform_internal.c +++ b/vendor/platform/Simcom-A7670C/src/port_crypto_default/boatplatform_internal.c @@ -43,7 +43,6 @@ #include "http2intf.h" #include "simcom_tcpip_old.h" #include "simcom_ssl.h" -#include "boat_simcom_ssl.h" #endif // #if (PROTOCOL_USE_HLFABRIC == 1) @@ -344,21 +343,21 @@ BSINT32 BoatConnect(const BCHAR *address, void *rsvd) memcpy(ip, address, (int)(ptr - address)); memcpy(port, ptr + 1, strlen(address) - (int)(ptr - address)); - if (-1 == sAPI_TcpipPdpActive(1, 1)) - { - BoatLog(BOAT_LOG_CRITICAL, "sAPI_TcpipPdpActive() error"); - return -1; - } + // if (-1 == sAPI_TcpipPdpActive(1, 1)) + // { + // BoatLog(BOAT_LOG_CRITICAL, "sAPI_TcpipPdpActive() error"); + // return -1; + // } sockfd = sAPI_TcpipSocket(SC_AF_INET, SC_SOCK_STREAM, SC_IPPROTO_TCP); BoatLog(BOAT_LOG_CRITICAL, "BoatConnect sockfd[%d]", sockfd); if (sockfd < 0) { BoatLog(BOAT_LOG_CRITICAL, "sAPI_TcpipSocket() error"); - if (-1 == sAPI_TcpipPdpDeactive(1, 1)) - { - BoatLog(BOAT_LOG_CRITICAL, "sAPI_TcpipPdpDeactive() error"); - } + // if (-1 == sAPI_TcpipPdpDeactive(1, 1)) + // { + // BoatLog(BOAT_LOG_CRITICAL, "sAPI_TcpipPdpDeactive() error"); + // } return -1; } @@ -369,10 +368,10 @@ BSINT32 BoatConnect(const BCHAR *address, void *rsvd) sAPI_SslClose(0); sAPI_TcpipClose(sockfd); BoatLog(BOAT_LOG_CRITICAL, "sAPI_TcpipGethostbyname() error"); - if (-1 == sAPI_TcpipPdpDeactive(1, 1)) - { - BoatLog(BOAT_LOG_CRITICAL, "sAPI_TcpipPdpDeactive() error"); - } + // if (-1 == sAPI_TcpipPdpDeactive(1, 1)) + // { + // BoatLog(BOAT_LOG_CRITICAL, "sAPI_TcpipPdpDeactive() error"); + // } return -1; } @@ -387,10 +386,10 @@ BSINT32 BoatConnect(const BCHAR *address, void *rsvd) sAPI_SslClose(0); sAPI_TcpipClose(sockfd); BoatLog(BOAT_LOG_CRITICAL, "sAPI_TcpipConnect() error"); - if (-1 == sAPI_TcpipPdpDeactive(1, 1)) - { - BoatLog(BOAT_LOG_CRITICAL, "sAPI_TcpipPdpDeactive() error"); - } + // if (-1 == sAPI_TcpipPdpDeactive(1, 1)) + // { + // BoatLog(BOAT_LOG_CRITICAL, "sAPI_TcpipPdpDeactive() error"); + // } return -1; }