Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RT200T_ESP32
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
RT200T
RT200T_ESP32
Commits
204d45bf
Commit
204d45bf
authored
Jun 05, 2024
by
李秉薇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:升级ESP32时,升级完成后发送复位指令
parent
68c9a9f1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
3 deletions
+14
-3
Protocol_Lib.h
RT200T_2_ESP32/main/Protocol_Lib.h
+1
-0
Protocol_User.c
RT200T_2_ESP32/main/Protocol_User.c
+8
-0
Protocol_User.h
RT200T_2_ESP32/main/Protocol_User.h
+1
-0
sdkconfig
RT200T_2_ESP32/sdkconfig
+0
-2
http_server.c
RT200T_2_ESP32/source/wifi/http_server.c
+4
-1
No files found.
RT200T_2_ESP32/main/Protocol_Lib.h
View file @
204d45bf
...
...
@@ -45,6 +45,7 @@ typedef struct
#define CMD_FLASH_ERASE 0x30//擦除 FLASH
#define CMD_FLASH_DWNLD 0x31//下载用户程序到 FLASH
#define CMD_DATA_CRC_CHECK 0x32//CRC 校验下载用户程
#define CMD_SYS_RESET 0x50//系统复位
typedef
struct
{
Protocol_uint8_t
CMDH
;
//宏定义所包含的
...
...
RT200T_2_ESP32/main/Protocol_User.c
View file @
204d45bf
...
...
@@ -511,6 +511,14 @@ void SendCmd_CrcCheckBAT32A239_Flash(void)
UpdateBAT32A239Protocol_Send
(
Update_Frame
);
}
void
SendCmd_ResetComond
(
void
)
{
Update_Frame
.
CMDH
=
CMD_SYS_RESET
;
Update_Frame
.
CMDL
=
0x00
;
Update_Frame
.
LEN
=
0x00
;
UpdateBAT32A239Protocol_Send
(
Update_Frame
);
}
static
uint32_t
UpgradeBAT32A239_1ms_Cnt
;
void
Upgrade_BAT32A239_Task
(
void
*
arg
)
{
...
...
RT200T_2_ESP32/main/Protocol_User.h
View file @
204d45bf
...
...
@@ -28,6 +28,7 @@ void BAT32A239_MCU_Update(void);
void
Prot_Send_Msg_Process
(
void
);
Protocol_uint32_t
CalcCrc32
(
Protocol_uint8_t
buf
[],
int
Len
);
extern
Protocol_uint32_t
UpdateBAT32A239Protocol_Parse
(
const
Protocol_uint8_t
*
pData
,
Protocol_uint32_t
len
);
extern
void
SendCmd_ResetComond
(
void
);
#ifdef UPGRADE_N32G031
#define CMD_SET_BR 0x01//设置串口波特率
...
...
RT200T_2_ESP32/sdkconfig
View file @
204d45bf
...
...
@@ -701,8 +701,6 @@ CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
CONFIG_BTDM_RESERVE_DRAM=0xdb5c
CONFIG_BTDM_CTRL_HLI=y
# end of Controller Options
# CONFIG_BT_HCI_LOG_DEBUG_EN is not set
# end of Bluetooth
# CONFIG_BLE_MESH is not set
...
...
RT200T_2_ESP32/source/wifi/http_server.c
View file @
204d45bf
...
...
@@ -10,6 +10,7 @@
#include "nvs_flash.h"
#include "esp_ota_ops.h"
#include "http_server.h"
#include "Protocol_User.h"
static
const
char
*
TAG
=
"http_server"
;
...
...
@@ -133,7 +134,9 @@ static esp_err_t app_post_handler(httpd_req_t *req)
// delele_tasks();
// httpd_resp_sendstr(req, "<p>应用程序更新完成,3秒后自动重启.</p>");
vTaskDelay
(
pdMS_TO_TICKS
(
3000
));
esp_restart
();
//esp_restart();
SendCmd_ResetComond
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment