Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
haoJin750TFT
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
时昊
haoJin750TFT
Commits
5b74da9c
Commit
5b74da9c
authored
Aug 21, 2024
by
张金硕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:优化OTA升级功能,增加蓝牙开关和获取电话本功能
parent
d39519b3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
22 deletions
+81
-22
HaoJin750TFT.uvprojx
.../Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
+1
-1
HaoJin750TFT.sct
...ject/Cmsemicon/BAT32A279/MDK_ARM/Objects/HaoJin750TFT.sct
+2
-2
userdefine.h
...BAT32A279/MDK_ARM/RTE/Device/BAT32A279KM64FB/userdefine.h
+1
-1
BlueTooth.c
Firmware/Source/Application/BlueTooth.c
+76
-17
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+1
-1
No files found.
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
View file @
5b74da9c
...
...
@@ -275,7 +275,7 @@
</OCR_RVCT3>
<OCR_RVCT4>
<Type>
1
</Type>
<StartAddress>
0x0
</StartAddress>
<StartAddress>
0x
c40
0
</StartAddress>
<Size>
0x73c00
</Size>
</OCR_RVCT4>
<OCR_RVCT5>
...
...
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/Objects/HaoJin750TFT.sct
View file @
5b74da9c
...
...
@@ -2,8 +2,8 @@
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x0000
00
00 0x00073C00 { ; load region size_region
ER_IROM1 0x0000
00
00 0x00073C00 { ; load address = execution address
LR_IROM1 0x0000
C4
00 0x00073C00 { ; load region size_region
ER_IROM1 0x0000
C4
00 0x00073C00 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
...
...
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/RTE/Device/BAT32A279KM64FB/userdefine.h
View file @
5b74da9c
...
...
@@ -20,7 +20,7 @@ User definitions
typedef
unsigned
short
MD_STATUS
;
#define HAS_BOOTLOADER (
0
u) // 仅仿真App时设置为0
#define HAS_BOOTLOADER (
1
u) // 仅仿真App时设置为0
#define APP_BASE (0x0000C400ul)
/* Status list definition */
...
...
Firmware/Source/Application/BlueTooth.c
View file @
5b74da9c
#include "Components.h"
uint8_t
OTA_Update_Count
=
0
;
const
uint8_t
HJBlueToothName
[
9
]
=
{
"HJ_750TFT"
};
uint8_t
OTA_Update_Count_Open
=
0
;
uint8_t
OTA_Update_Count_Close
=
0
;
uint8_t
Update_Graphic_Count
=
0
;
uint8_t
GetBlueToothVaild
=
0
;
uint8_t
GetPhoneBookVaild
=
0
;
const
uint8_t
HJBlueToothName
[
9
]
=
{
"HJ750"
};
uint8_t
UUIDConfigBuf
[
22
]
=
{
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x00
};
uint8_t
sjhja
[
20
]
=
{
0
};
uint8_t
PhoneName
[
100
]
=
{
0
};
uint8_t
BlueConnectStatus
;
ee_uint16_t
juasfha
;
void
BlueToothService
()
{
char
i
;
if
(
Get_Dis_Bluetooth_Open_Close
()
==
0
)
{
if
(
GetBlueToothVaild
==
0
)
{
SetBluetoothTurnXX
(
1
);
GetBlueToothVaild
=
1
;
}
}
else
{
if
(
GetBlueToothVaild
==
1
)
{
SetBluetoothTurnXX
(
0
);
GetBlueToothVaild
=
0
;
}
}
if
((
BlueToothPhoneData
.
BlueToothSignalSate
==
BlueTooth_Connection
)
&&
(
GetPhoneBookVaild
==
0
))
{
PackedTransfer_GetPhoneBookCmd
();
GetPhoneBookVaild
=
1
;
}
else
if
(
BlueToothPhoneData
.
BlueToothSignalSate
==
BlueTooth_DisConnect
)
{
GetPhoneBookVaild
=
0
;
}
// SetBlueToothName((uint8_t *)HJBlueToothName, sizeof(HJBlueToothName));
// SetUUIDData((char *)UUIDConfigBuf, 22);
// BlueConnectStatus = GetBlueToothPowerSTATE();
// juasfha = BlueToothPhoneData.BlueToothPhoneSate;
// juasfha = BlueToothPhoneData.PhoneBookTotalCount;
// for(i=0;i<20;i++)
// {
// sjhja[i] = BlueToothPhoneData.PhoneNumber[i];
// }
// for(i=0;i<100;i++)
// {
// PhoneName[i] = BlueToothPhoneData.BlueToothPhoneName[i];
// }
SetBlueToothName
((
uint8_t
*
)
HJBlueToothName
,
sizeof
(
HJBlueToothName
));
SetUUIDData
((
char
*
)
UUIDConfigBuf
,
22
);
// _QRCODE_RECT QRCode_Rect;
// QRCode_Rect.x = QRCode_X;
// QRCode_Rect.y = QRCode_Y;
...
...
@@ -18,14 +70,16 @@ void BlueToothService()
void
UpdateGraphics
(
void
)
{
_PICID_Struct
PicObj
;
PicObj
.
qr_logo_id
=
0
;
PicObj
.
main_pic_id
=
Pic_0382
;
PicObj
.
qr_pic_id
=
Pic_0316
;
PicObj
.
update_pic_id
=
Pic_0193
;
PicObj
.
second_menu
=
0
;
PicObj
.
navigation_task_id
=
0
;
PackedTransfer_DisplayPhoneMirrorQRcode
(
0
,
PicObj
);
_PICID_Struct
PicObj
;
PicObj
.
qr_logo_id
=
0
;
PicObj
.
main_pic_id
=
Pic_0382
;
PicObj
.
qr_pic_id
=
Pic_0316
;
PicObj
.
update_pic_id
=
Pic_0193
;
PicObj
.
second_menu
=
0
;
PicObj
.
navigation_task_id
=
0
;
PackedTransfer_DisplayPhoneMirrorQRcode
(
0
,
PicObj
);
}
void
OTAUpdateService
(
void
)
{
...
...
@@ -36,15 +90,20 @@ void OTAUpdateService(void)
QRCode_Rect
.
width
=
240
;
if
(
OTA_Update_Flag
==
1
)
{
OTA_Update_Count
++
;
if
(
OTA_Update_Count
<
5
)
if
(
OTA_Update_Count_Open
<
5
)
{
SetUpdateCtrl
(
1
,
QRCode_Rect
);
SetUpdateCtrl
(
1
,
QRCode_Rect
);
OTA_Update_Count_Open
++
;
}
OTA_Update_Count_Close
=
0
;
}
else
{
SetUpdateCtrl
(
0
,
QRCode_Rect
);
OTA_Update_Count
=
0
;
if
(
OTA_Update_Count_Close
<
5
)
{
SetUpdateCtrl
(
0
,
QRCode_Rect
);
OTA_Update_Count_Close
++
;
}
OTA_Update_Count_Open
=
0
;
}
}
Firmware/Source/System/Sys_Task_List.c
View file @
5b74da9c
...
...
@@ -52,7 +52,6 @@ void Sys_20ms_Tasks(void)
void
Sys_50ms_Tasks
(
void
)
{
// BlueToothService();
UpdateGraphics
();
Telltales_Management
();
g_u8Cursor_Posittion
=
Menu_Get_Current_Cursor_Information
();
...
...
@@ -77,6 +76,7 @@ uint32_t aaa = 0;
void
Sys_100ms_Tasks
(
void
)
{
BlueToothService
();
S3_ServerCNTT
();
Get_DisTime_Service
();
Fuel_Cal_Sevice
(
100u
);
...
...
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