Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
VC66_7C
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
ISUZU
VC66_7C
Commits
18e03db0
Commit
18e03db0
authored
3 years ago
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整时间日期设置,显示,调整星期算法
parent
da37d8ec
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
21166 additions
and
21239 deletions
+21166
-21239
project
ghs/project
+0
-0
project.hex
ghs/project.hex
+21137
-21142
project.siz
ghs/project.siz
+2
-2
GUI.c
source/Application/Graphic/GUI/GUI.c
+1
-1
GUI.h
source/Application/Graphic/GUI/GUI.h
+2
-2
Menu_user.c
source/Application/Graphic/Menu/Menu_user.c
+11
-4
RTE_TIME.c
source/Application/RTE/RTE_TIME.c
+1
-1
RTC.c
source/Driver/Clock/RTC.c
+12
-87
No files found.
ghs/project
View file @
18e03db0
No preview for this file type
This diff is collapsed.
Click to expand it.
ghs/project.hex
View file @
18e03db0
This diff is collapsed.
Click to expand it.
ghs/project.siz
View file @
18e03db0
project .intvect 1536
project .text 314
828
project .text 314
684
project .rodata 410775
project .secinfo 120
project .syscall 6
project .romdata 90
37
project .romdata 90
29
project .ROM.ramfunc 208
project .ramfunc 208
This diff is collapsed.
Click to expand it.
source/Application/Graphic/GUI/GUI.c
View file @
18e03db0
...
...
@@ -295,7 +295,7 @@ void GUI_Data_Dispaly(uint8_t Mode)
GUI_General_Digit_Display
(
Calendar_Sprite
,
Year
,
Nb_14_0
,
4u
,
0u
,
GUI_DISP_Year
,
48
,
GUI_BLENDMODE_SRC_OVER
);
/*显示年*/
GUI_General_Digit_Display
(
Calendar_Sprite
,
Month
,
Nb_14_0
,
2u
,
0u
,
GUI_DISP_Month
,
48
,
GUI_BLENDMODE_SRC_OVER
);
/*显示月*/
GUI_General_Digit_Display
(
Calendar_Sprite
,
Date
,
Nb_14_0
,
2u
,
0u
,
GUI_DISP_Date
,
48
,
GUI_BLENDMODE_SRC_OVER
);
/*显示日*/
GUI_General_Display
(
Calendar_Sprite
,
GUIWedk
[
Week
-
1u
],
GUI_BLENDMODE_SRC_OVER
);
GUI_General_Display
(
Calendar_Sprite
,
GUIWedk
[
Week
],
GUI_BLENDMODE_SRC_OVER
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
source/Application/Graphic/GUI/GUI.h
View file @
18e03db0
...
...
@@ -134,8 +134,8 @@ typedef struct
}
_TPMS
;
extern
_TPMS
TPMS_Matching
;
static
const
uint32_t
GUIWedk
[
7u
]
=
{
CN_xingqi
yi
,
CN_xingqier
,
CN_xingqisan
,
CN_xingqisi
,
CN_xingqiwu
,
CN_xingqiliu
,
CN_xingqiri
};
static
const
uint32_t
GUIMenuWedk
[
7u
]
=
{
CN_
Mon
,
CN_Tue
,
CN_Wed
,
CN_Thu
,
CN_Fri
,
CN_Sat
,
CN_ri
};
static
const
uint32_t
GUIWedk
[
7u
]
=
{
CN_xingqi
ri
,
CN_xingqiyi
,
CN_xingqier
,
CN_xingqisan
,
CN_xingqisi
,
CN_xingqiwu
,
CN_xingqiliu
};
static
const
uint32_t
GUIMenuWedk
[
7u
]
=
{
CN_
ri
,
CN_Mon
,
CN_Tue
,
CN_Wed
,
CN_Thu
,
CN_Fri
,
CN_Sat
};
static
const
uint32_t
GUIGear
[
12u
]
=
{
CN_dangwei_1
,
CN_dangwei_2
,
CN_dangwei_3
,
CN_dangwei_4
,
CN_dangwei_5
,
CN_dangwei_6
,
CN_dangwei_7
,
CN_dangwei_8
,
CN_dangwei_9
,
CN_dangwei_10
,
CN_dangwei_11
,
CN_dangwei_12
};
static
const
uint16_t
GUI_DISP_AC_TEMP
[
2
]
=
{
229u
,
216u
};
/*室外温度数字显示*/
...
...
This diff is collapsed.
Click to expand it.
source/Application/Graphic/Menu/Menu_user.c
View file @
18e03db0
...
...
@@ -843,9 +843,9 @@ void Level3_3Menu_7Exit(void)
/*日期设定 ----- 年*/
void
Level3_4Menu_1Enter_1
(
void
)
{
User_set_Num
.
Year
=
Get_RTC_YEAR
();
User_set_Num
.
Year
=
Get_RTC_YEAR
();
User_set_Num
.
Month
=
Get_RTC_MONTH
();
User_set_Num
.
Date
=
Get_RTC_DATE
();
User_set_Num
.
Date
=
Get_RTC_DATE
();
}
void
Level3_4Menu_1Do_1
(
void
)
{
...
...
@@ -881,9 +881,12 @@ void Level3_4Menu_1Exit_3(void)
{
if
(
MenuFlag
.
Menu_Return
)
{
RTE_RTC_Set_Year
(
User_set_Num
.
Year
+
2000u
);
RTE_RTC_Set_Year
(
User_set_Num
.
Year
+
2000u
);
RTE_RTC_Set_Month
(
User_set_Num
.
Month
);
RTE_RTC_Set_Date
(
User_set_Num
.
Date
);
RTE_RTC_Set_Date
(
User_set_Num
.
Date
);
RTE_RTC_Set_Hour
(
Get_RTC_HOUR
());
RTE_RTC_Set_Minute
(
Get_RTC_MINUTE
());
MenuFlag
.
Menu_Return
=
0
;
...
...
@@ -919,6 +922,10 @@ void Level3_4Menu_2Exit_2(void)
{
if
(
MenuFlag
.
Menu_Return
)
{
RTE_RTC_Set_Year
(
Get_RTC_YEAR
()
+
2000u
);
RTE_RTC_Set_Month
(
Get_RTC_MONTH
()
);
RTE_RTC_Set_Date
(
Get_RTC_DATE
()
);
RTE_RTC_Set_Hour
(
User_set_Num
.
Hour
);
RTE_RTC_Set_Minute
(
User_set_Num
.
Minute
);
...
...
This diff is collapsed.
Click to expand it.
source/Application/RTE/RTE_TIME.c
View file @
18e03db0
...
...
@@ -103,4 +103,4 @@ uint8_t Get_RTC_SECOND(void)
uint8_t
Get_RTC_WEEK
(
void
)
{
return
RTC_WEEK
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
source/Driver/Clock/RTC.c
View file @
18e03db0
...
...
@@ -61,7 +61,7 @@ void RTC_Pre_Init(void)
RTC_Stop
();
/* Stop RTCA*/
#if (RTC_MODE_SELECT == RTC_MODE_MAIN)
RTCA0SLSB
=
1U
;
/*Frequency selection mode*/
RTCA0SLSB
=
1U
;
/*Frequency selection mode*/
RTCA0SCMP
=
4000000U
-
1U
;
/*4M*/
#else
RTCA0SLSB
=
0U
;
/*32.768 kHz mode*/
...
...
@@ -94,7 +94,7 @@ void RTC_Set_Time(RTC_Information_st_t *pstRTCTime)
{
;
}
RTCA0WAIT
=
1U
;
/*Stop all clock counters*/
RTCA0WAIT
=
1U
;
/*Stop all clock counters*/
while
(
RTCA0WST
!=
1U
)
/*Wait all clock counters stop*/
{
;
...
...
@@ -126,7 +126,7 @@ void RTC_Timing_Service(void)
{
;
}
RTCA0WAIT
=
1U
;
/*Stop all clock counters*/
RTCA0WAIT
=
1U
;
/*Stop all clock counters*/
while
(
RTCA0WST
!=
1U
)
/*Wait all clock counters stop*/
{
;
...
...
@@ -142,11 +142,7 @@ void RTC_Timing_Service(void)
Week
=
Cal_RTC_Week
(
g_stRTCInformation
.
u8RTCYear
,
g_stRTCInformation
.
u8RTCMonth
,
g_stRTCInformation
.
u8RTCDayOfMonth
);
if
(
Week
)
{
g_stRTCInformation
.
u8RTCWeek
=
Week
;
}
g_stRTCInformation
.
u8RTCWeek
=
Week
;
g_RTCLeapYear
=
RTC_Determine_Leap_Year
(
g_stRTCInformation
.
u8RTCYear
);
...
...
@@ -166,86 +162,15 @@ void RTC_Init(void)
/*计算 星期几*/
static
uint8_t
Cal_RTC_Week
(
uint16_t
Year
,
uint8_t
Month
,
uint8_t
Day
)
{
static
uint8_t
DefaultWeek
=
6
;
//2000.1.1
static
uint16_t
OldYear
=
0
;
static
uint8_t
OldMonth
=
0
;
static
uint8_t
OldDay
=
0
;
uint8_t
u8Result
=
0
;
uint32_t
DiffDay
=
0
;
uint16_t
DiffYear
=
0
;
uint16_t
DiffMouth
=
0
;
if
((
Year
!=
OldYear
)
||
(
Month
!=
OldMonth
)
||
(
Day
!=
OldDay
))
if
(
Month
<
3
)
{
OldYear
=
Year
;
OldMonth
=
Month
;
OldDay
=
Day
;
DiffYear
=
Year
-
0
;
DiffMouth
=
Month
-
1
;
while
(
DiffYear
)
{
if
(
RTC_Determine_Leap_Year
((
DiffYear
-
1
)))
{
DiffDay
+=
366
;
}
else
{
DiffDay
+=
365
;
}
DiffYear
--
;
}
while
(
DiffMouth
)
{
switch
(
DiffMouth
+
1
)
{
case
1
:
case
3
:
case
5
:
case
7
:
case
8
:
case
10
:
case
12
:
DiffDay
+=
31
;
break
;
case
4
:
case
6
:
case
9
:
case
11
:
DiffDay
+=
30
;
break
;
case
2
:
if
(
RTC_Determine_Leap_Year
(
Year
))
{
DiffDay
+=
29
;
}
else
{
DiffDay
+=
28
;
}
break
;
}
DiffMouth
--
;
}
DiffDay
+=
(
Day
-
1
)
;
DiffDay
%=
7
;
DiffDay
+=
DefaultWeek
;
if
(
DiffDay
>
7
)
{
DiffDay
-=
7
;
}
u8Result
=
(
uint8_t
)
DiffDay
;
Month
+=
12
;
Year
--
;
}
return
u8Result
;
uint8_t
tmp_0
=
(
uint8_t
)(
Year
%
100
);
uint8_t
tmp_1
=
(
uint8_t
)(
Year
/
100
);
uint8_t
week
=
(
uint8_t
)((
tmp_0
+
(
tmp_0
>>
2
)
+
(
tmp_1
>>
2
)
+
13
*
(
Month
+
1
)
/
5
+
Day
-
1
-
(
tmp_1
<<
1
))
%
7
);
return
week
;
}
This diff is collapsed.
Click to expand it.
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