From 8ead70e7d59f8ff77ed43963e865cebf3df7d26d Mon Sep 17 00:00:00 2001 From: KirisameMashiro <47731209+Sssssaltyfish@users.noreply.github.com> Date: Wed, 25 Dec 2024 11:14:57 +0800 Subject: [PATCH] Tried to use EC200A adapter for EC201E-CN --- APP_Framework/Framework/connection/at_agent.h | 14 ++++++++------ .../third_party_driver/lte/connect_lte.c | 9 +++++++++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/APP_Framework/Framework/connection/at_agent.h b/APP_Framework/Framework/connection/at_agent.h index d43f13046..7de80be3f 100755 --- a/APP_Framework/Framework/connection/at_agent.h +++ b/APP_Framework/Framework/connection/at_agent.h @@ -58,13 +58,15 @@ struct ATAgent uint32 maintain_len; uint32 maintain_max; -#ifdef ADD_XIZI_FEATURES - #ifdef ADAPTER_GM800TF +#ifdef ADD_XIZI_FEATURES + +#if defined(ADAPTER_GM800TF) || defined(ADAPTER_EC801E) pthread_mutex_t lock; - #else - int lock; - #endif #else + int lock; +#endif + +#else // ADD_XIZI_FEATURES pthread_mutex_t lock; #endif @@ -73,7 +75,7 @@ struct ATAgent char reply_end_last_char; char reply_end_char; uint32 reply_char_num; -#ifdef ADD_XIZI_FEATURES +#ifdef ADD_XIZI_FEATURES int rsp_sem; #else sem_t rsp_sem; diff --git a/Ubiquitous/XiZi_IIoT/board/ch32v208rbt6/third_party_driver/lte/connect_lte.c b/Ubiquitous/XiZi_IIoT/board/ch32v208rbt6/third_party_driver/lte/connect_lte.c index 7ef250fbc..43aa0822a 100644 --- a/Ubiquitous/XiZi_IIoT/board/ch32v208rbt6/third_party_driver/lte/connect_lte.c +++ b/Ubiquitous/XiZi_IIoT/board/ch32v208rbt6/third_party_driver/lte/connect_lte.c @@ -314,5 +314,14 @@ int InitHwLte(void) { USART_Init(USART2, &USART_InitStructure_Lte); USART_Cmd(USART2, ENABLE); + /* Enable module pin */ + GPIO_InitStructure_Lte.GPIO_Pin = GPIO_Pin_6; + GPIO_InitStructure_Lte.GPIO_Speed = GPIO_Speed_50MHz; + GPIO_InitStructure_Lte.GPIO_Mode = GPIO_Mode_Out_PP; + GPIO_Init(GPIOA, &GPIO_InitStructure_Lte); + GPIO_SetBits(GPIOA, GPIO_Pin_6); + Delay_Ms(2000); + GPIO_ResetBits(GPIOA, GPIO_Pin_6); + return ret; }