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
3cbed2be
Commit
3cbed2be
authored
Aug 23, 2024
by
张金硕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:新增刷OTA升级的二维码功能
parent
a01e62b2
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
54 additions
and
26 deletions
+54
-26
HaoJin750TFT.uvprojx
.../Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
+2
-2
BlueTooth.c
Firmware/Source/Application/BlueTooth.c
+5
-17
BlueTooth.h
Firmware/Source/Application/BlueTooth.h
+2
-1
AMT630H_Datas.c
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
+5
-3
GraphicsFunc.c
Firmware/Source/Component/AMT630H/GraphicsFunc.c
+1
-1
kei_S1.0.4_20240818.lib
Firmware/Source/Component/AMT630H/kei_S1.0.4_20240818.lib
+0
-0
kei_S1.0.5_20240822.lib
Firmware/Source/Component/AMT630H/kei_S1.0.5_20240822.lib
+0
-0
RTE_UART.c
...are/Source/Device/Cmsemicon/BAT32A279/RTE/UART/RTE_UART.c
+37
-0
RTE_UART.h
...are/Source/Device/Cmsemicon/BAT32A279/RTE/UART/RTE_UART.h
+2
-0
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+0
-2
No files found.
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
View file @
3cbed2be
...
@@ -979,9 +979,9 @@
...
@@ -979,9 +979,9 @@
<FilePath>
..\..\..\..\Source\Component\AMT630H\PicBin.h
</FilePath>
<FilePath>
..\..\..\..\Source\Component\AMT630H\PicBin.h
</FilePath>
</File>
</File>
<File>
<File>
<FileName>
kei_S1.0.
4_20240818
.lib
</FileName>
<FileName>
kei_S1.0.
5_20240822
.lib
</FileName>
<FileType>
4
</FileType>
<FileType>
4
</FileType>
<FilePath>
..\..\..\..\Source\Component\AMT630H\kei_S1.0.
4_20240818
.lib
</FilePath>
<FilePath>
..\..\..\..\Source\Component\AMT630H\kei_S1.0.
5_20240822
.lib
</FilePath>
</File>
</File>
<File>
<File>
<FileName>
UartProtocol.h
</FileName>
<FileName>
UartProtocol.h
</FileName>
...
...
Firmware/Source/Application/BlueTooth.c
View file @
3cbed2be
...
@@ -6,6 +6,7 @@ uint8_t Update_Graphic_Count = 0;
...
@@ -6,6 +6,7 @@ uint8_t Update_Graphic_Count = 0;
uint8_t
GetBlueToothVaild
=
0
;
uint8_t
GetBlueToothVaild
=
0
;
uint8_t
GetPhoneBookVaild
=
0
;
uint8_t
GetPhoneBookVaild
=
0
;
uint8_t
TextInit
=
0
;
uint8_t
TextInit
=
0
;
uint8_t
SetUUIDTimes
=
0
;
_PICID_Struct
PicObj
;
_PICID_Struct
PicObj
;
_QRCODE_RECT
QRCode_Rect
;
_QRCODE_RECT
QRCode_Rect
;
const
uint8_t
HJBlueToothName
[
9
]
=
{
"HJ750"
};
const
uint8_t
HJBlueToothName
[
9
]
=
{
"HJ750"
};
...
@@ -20,6 +21,7 @@ void TextService(void);
...
@@ -20,6 +21,7 @@ void TextService(void);
void
BlueToothService
()
void
BlueToothService
()
{
{
// SetUUIDTimes++;
if
(
Get_Dis_Bluetooth_Open_Close
()
==
0
)
if
(
Get_Dis_Bluetooth_Open_Close
()
==
0
)
{
{
if
(
GetBlueToothVaild
==
0
)
if
(
GetBlueToothVaild
==
0
)
...
@@ -107,8 +109,6 @@ void TextService(void)
...
@@ -107,8 +109,6 @@ void TextService(void)
memset
(
LastBlueToothPhoneName
,
0
,
sizeof
(
LastBlueToothPhoneName
));
memset
(
LastBlueToothPhoneName
,
0
,
sizeof
(
LastBlueToothPhoneName
));
memset
(
CurBlueToothPhoneName
,
0
,
sizeof
(
CurBlueToothPhoneName
));
memset
(
CurBlueToothPhoneName
,
0
,
sizeof
(
CurBlueToothPhoneName
));
}
}
if
(
BlueToothPhoneData
.
BlueToothSignalSate
==
BlueTooth_Connection
)
if
(
BlueToothPhoneData
.
BlueToothSignalSate
==
BlueTooth_Connection
)
{
{
if
((
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Outgoing
)
||
(
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Incoming
)
||
(
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Talking
))
{
if
((
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Outgoing
)
||
(
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Incoming
)
||
(
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Talking
))
{
...
@@ -136,25 +136,13 @@ void TextService(void)
...
@@ -136,25 +136,13 @@ void TextService(void)
}
}
}
}
void
UpdateGraphics
(
void
)
{
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
;
if
(
OTA_Update_Flag
==
1
)
{
PackedTransfer_DisplayPhoneMirrorQRcode
(
0
,
PicObj
);
}
}
void
OTAUpdateService
(
void
)
void
OTAUpdateService
(
void
)
{
{
QRCode_Rect
.
x
=
457
;
QRCode_Rect
.
x
=
178
;
QRCode_Rect
.
y
=
13
7
;
QRCode_Rect
.
y
=
13
0
;
QRCode_Rect
.
height
=
240
;
QRCode_Rect
.
height
=
240
;
QRCode_Rect
.
width
=
240
;
QRCode_Rect
.
width
=
240
;
SetScreenType
(
QRCode_TYPE
,
QRCode_Rect
);
if
(
Menu_Get_Current_Cursor_Information
()
!=
MENU_ITEM_FAULT_INFORMATION
)
if
(
Menu_Get_Current_Cursor_Information
()
!=
MENU_ITEM_FAULT_INFORMATION
)
{
{
OTA_Update_Flag
=
0
;
OTA_Update_Flag
=
0
;
...
...
Firmware/Source/Application/BlueTooth.h
View file @
3cbed2be
...
@@ -33,6 +33,7 @@ typedef struct {
...
@@ -33,6 +33,7 @@ typedef struct {
extern
void
BlueToothService
(
void
);
extern
void
BlueToothService
(
void
);
extern
void
OTAUpdateService
(
void
);
extern
void
OTAUpdateService
(
void
);
void
UpdateGraphics
(
void
);
extern
void
OTAUpdateInit
(
void
);
extern
_PICID_Struct
PicObj
;
#endif
#endif
\ No newline at end of file
Firmware/Source/Component/AMT630H/AMT630H_Datas.c
View file @
3cbed2be
...
@@ -4251,9 +4251,11 @@ void AMT630H_GUI_ReadPosittion_Display(void)
...
@@ -4251,9 +4251,11 @@ void AMT630H_GUI_ReadPosittion_Display(void)
AMT630H_GUI_Fault_Information
();
AMT630H_GUI_Fault_Information
();
}
}
else
else
{
{
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0653_54_499
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0002_0_0
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0193_0_0
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0477_178_130
);
SetPagePic
(
GRAPHICS_PAGE_0
,
Pic_0233_605_289
);
PackedTransfer_DisplayPhoneMirrorQRcode
(
0
,
PicObj
);
}
}
break
;
break
;
case
MENU_ITEM_PHONE_CONNECT
:
/*28 手机互联*/
case
MENU_ITEM_PHONE_CONNECT
:
/*28 手机互联*/
...
...
Firmware/Source/Component/AMT630H/GraphicsFunc.c
View file @
3cbed2be
...
@@ -18,7 +18,7 @@ uint8_t *GetUartRecvData(uint32_t *UartRecvBufLen, uint32_t *UartRecvPos)
...
@@ -18,7 +18,7 @@ uint8_t *GetUartRecvData(uint32_t *UartRecvBufLen, uint32_t *UartRecvPos)
void
UartSendData
(
uint8_t
*
data
,
uint32_t
len
)
void
UartSendData
(
uint8_t
*
data
,
uint32_t
len
)
{
{
UART_Ch2_Send_Multiple_Byte
(
data
,
len
);
mwAmt630hUartSendData
(
data
,
len
);
}
}
void
DisplayNum
(
uint8_t
page
,
DISPLAY_NUM_ST
*
pNumData
,
int32_t
NumVal
)
void
DisplayNum
(
uint8_t
page
,
DISPLAY_NUM_ST
*
pNumData
,
int32_t
NumVal
)
...
...
Firmware/Source/Component/AMT630H/kei_S1.0.4_20240818.lib
deleted
100644 → 0
View file @
a01e62b2
File deleted
Firmware/Source/Component/AMT630H/kei_S1.0.5_20240822.lib
0 → 100644
View file @
3cbed2be
File added
Firmware/Source/Device/Cmsemicon/BAT32A279/RTE/UART/RTE_UART.c
View file @
3cbed2be
...
@@ -280,6 +280,42 @@ uint8_t UART_Ch3_Get_TX_Busy_Flag(void)
...
@@ -280,6 +280,42 @@ uint8_t UART_Ch3_Get_TX_Busy_Flag(void)
// }
// }
return
u8Status
;
return
u8Status
;
}
}
/* 一部代买码,暂时未使用,纯借鉴 */
#define MAX_SERIAL_BUFF_SIZE 4096
uint8_t
mwAmt630hSerialSendBuffer
[
MAX_SERIAL_BUFF_SIZE
]
=
{
0
};
uint16_t
mwAmt630hSerialDataIndex
=
0
;
uint16_t
mwAmt630hSerialSendCnts
=
0
;
uint16_t
mwAmt630hSerialSendFillCnts
=
0
;
uint8_t
mwAmt630hSerialSendValid
=
0
;
void
mwAmt630hUartSendData
(
uint8_t
*
data
,
uint32_t
length
)
{
uint16_t
StartIndex
=
mwAmt630hSerialDataIndex
;
for
(
uint16_t
i
=
0
;
i
<
length
;
i
++
)
{
mwAmt630hSerialSendBuffer
[
mwAmt630hSerialDataIndex
++
]
=
data
[
i
];
if
(
mwAmt630hSerialDataIndex
>=
MAX_SERIAL_BUFF_SIZE
)
{
mwAmt630hSerialDataIndex
=
0
;
}
}
mwAmt630hSerialSendFillCnts
+=
length
;
if
(
mwAmt630hSerialSendValid
==
0
)
{
UART_Ch2_Send_Multiple_Byte
(
&
mwAmt630hSerialSendBuffer
[
StartIndex
]
,
sizeof
(
mwAmt630hSerialSendBuffer
[
StartIndex
]));
mwAmt630hSerialSendCnts
=
StartIndex
+
1
;
mwAmt630hSerialSendValid
=
1
;
}
}
void
mwAmt630hUartSendIsr
(
void
)
{
if
(
mwAmt630hSerialSendFillCnts
>
0
)
{
mwAmt630hSerialSendFillCnts
--
;
UART_Ch2_Send_Multiple_Byte
(
&
mwAmt630hSerialSendBuffer
[
mwAmt630hSerialSendCnts
++
],
sizeof
(
mwAmt630hSerialSendBuffer
[
mwAmt630hSerialSendCnts
]));
if
(
mwAmt630hSerialSendCnts
==
MAX_SERIAL_BUFF_SIZE
)
{
mwAmt630hSerialSendCnts
=
0
;
}
}
else
{
mwAmt630hSerialSendValid
=
0
;
}
}
/*
/*
Data:要发送数据的指针,
Data:要发送数据的指针,
请确认是全局变量的指针,且指向的数据在发送完成之前不会被改变。
请确认是全局变量的指针,且指向的数据在发送完成之前不会被改变。
...
@@ -463,6 +499,7 @@ void UART_CH2_TX_ISR(void)
...
@@ -463,6 +499,7 @@ void UART_CH2_TX_ISR(void)
stUARTCh2Cfg
.
pfnUARTConfirmCallBack
(
);
stUARTCh2Cfg
.
pfnUARTConfirmCallBack
(
);
}
}
}
}
mwAmt630hUartSendIsr
();
}
}
void
UART_CH3_TX_ISR
(
void
)
void
UART_CH3_TX_ISR
(
void
)
{
{
...
...
Firmware/Source/Device/Cmsemicon/BAT32A279/RTE/UART/RTE_UART.h
View file @
3cbed2be
...
@@ -57,5 +57,7 @@ void UART_Ch2_Send_Multiple_Byte(uint8_t *Data, uint8_t Len);
...
@@ -57,5 +57,7 @@ void UART_Ch2_Send_Multiple_Byte(uint8_t *Data, uint8_t Len);
extern
uint32_t
RTE_UART_Init
(
UART_Channel_en_t
enUARTCh
,
UART_Channel_Config_st_t
*
penUARTCfg
);
extern
uint32_t
RTE_UART_Init
(
UART_Channel_en_t
enUARTCh
,
UART_Channel_Config_st_t
*
penUARTCfg
);
/*休眠时调用*/
/*休眠时调用*/
extern
void
RTE_UART_Sleep_Init
(
UART_Channel_en_t
enUARTCh
);
extern
void
RTE_UART_Sleep_Init
(
UART_Channel_en_t
enUARTCh
);
extern
void
mwAmt630hUartSendData
(
uint8_t
*
data
,
uint32_t
length
);
extern
void
mwAmt630hUartSendIsr
(
void
);
#endif
#endif
Firmware/Source/System/Sys_Task_List.c
View file @
3cbed2be
...
@@ -52,9 +52,7 @@ void Sys_20ms_Tasks(void)
...
@@ -52,9 +52,7 @@ void Sys_20ms_Tasks(void)
void
Sys_50ms_Tasks
(
void
)
void
Sys_50ms_Tasks
(
void
)
{
{
// BlueToothService();
BackLight_Service
();
BackLight_Service
();
UpdateGraphics
();
Telltales_Management
();
Telltales_Management
();
g_u8Cursor_Posittion
=
Menu_Get_Current_Cursor_Information
();
g_u8Cursor_Posittion
=
Menu_Get_Current_Cursor_Information
();
...
...
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