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
a99874fa
Commit
a99874fa
authored
Aug 17, 2024
by
郑萍
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://tyw-server.synology.me:12345/shihao/haojin750tft
into zhengping
parents
a98c02be
e81dbe30
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
116 additions
and
76 deletions
+116
-76
HaoJin750TFT.uvprojx
.../Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
+6
-6
BackLight.c
Firmware/Source/Application/BackLight.c
+105
-67
BackLight.h
Firmware/Source/Application/BackLight.h
+2
-0
GpioUser.c
Firmware/Source/Application/GpioUser.c
+1
-1
Analog_Signals.c
Firmware/Source/Component/Analog/Analog_Signals.c
+2
-2
No files found.
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/HaoJin750TFT.uvprojx
View file @
a99874fa
...
...
@@ -361,7 +361,7 @@
</VariousControls>
</Aads>
<LDads>
<umfTarg>
0
</umfTarg>
<umfTarg>
1
</umfTarg>
<Ropi>
0
</Ropi>
<Rwpi>
0
</Rwpi>
<noStLib>
0
</noStLib>
...
...
@@ -968,16 +968,16 @@
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Component\AMT630H\PicBin.h
</FilePath>
</File>
<File>
<FileName>
UartProtocol.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Component\AMT630H\UartProtocol.h
</FilePath>
</File>
<File>
<FileName>
UartProtocol_V1.32_BAT32A239.lib
</FileName>
<FileType>
4
</FileType>
<FilePath>
..\..\..\..\Source\Component\AMT630H\UartProtocol_V1.32_BAT32A239.lib
</FilePath>
</File>
<File>
<FileName>
UartProtocol.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Component\AMT630H\UartProtocol.h
</FilePath>
</File>
<File>
<FileName>
AMT630H_Datas.c
</FileName>
<FileType>
1
</FileType>
...
...
Firmware/Source/Application/BackLight.c
View file @
a99874fa
...
...
@@ -30,7 +30,7 @@ typedef struct
}
_st_BacklightLevel
;
#define Backlight_Max 10
#define BacklightLevel_Max
10
#define BacklightLevel_Max
5
_st_Backlight
BacklightTable
[
Backlight_Max
]
=
{
/*温度 阻值 */
...
...
@@ -50,9 +50,9 @@ _st_BacklightLevel BacklightLevelTable[BacklightLevel_Max] =
/*背光等级 背光占空比 */
{
1
,
100
},
{
2
,
200
},
{
3
,
3
00
},
{
4
,
4
00
},
{
5
,
5
00
},
{
3
,
4
00
},
{
4
,
6
00
},
{
5
,
8
00
},
};
...
...
@@ -63,8 +63,6 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
uint8_t
i
,
j
;
uint32_t
temp32
;
static
uint16_t
timeCount
=
0
;
if
(
GET_Backlight
()
==
Backlight_ATUO
)
{
if
(
timeCount
>=
LIGHT_DATA_TIME
)
{
timeCount
=
0
;
...
...
@@ -72,7 +70,6 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
{
/*获取光敏电阻*/
LightRes
=
ADC_Read_Signal
(
ADC_CH_LIGHT_SENSITIVE
);
// ADC_Read_Signal(ADC_CH_FUEL1);
/*四舍五入*/
if
(
LightRes
<
32000
)
{
...
...
@@ -114,41 +111,61 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
}
}
timeCount
+=
deltaTime
;
if
(
LightADCompleteFlg
)
if
(
Menu_Item_Select_Get
(
MENU_ITEM_SELECT_AUTO
)
)
{
if
(
LightR_Status
==
0
)
if
(
LightADCompleteFlg
)
{
if
(
LightR
>
20
)
if
(
LightR
<=
800
)
{
LightR_Status_Count
++
;
if
(
LightR_Status_Count
>=
150
)
{
LightR_Status_Count
=
0
;
LightR_Status
=
0
;
}
else
}
else
if
(
LightR
>
800
)
{
LightR_Status_Count
=
0
;
LightR_Status_Count
++
;
if
(
LightR_Status_Count
>=
150
)
{
LightR_Status_Count
=
0
;
LightR_Status
=
1
;
}
}
if
(
LightR_Status
==
0
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
200
);
}
else
{
if
(
LightR
<
20
)
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
800
);
}
}
}
else
if
(
Menu_Item_Select_Get
(
MENU_ITEM_BACKLIGHT_AUTO
))
{
if
(
Backlight_SetPwmLevel
()
==
1U
)
{
LightR_Status_Count
++
;
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
100
)
;
}
else
else
if
(
Backlight_SetPwmLevel
()
==
2U
)
{
LightR_Status_Count
=
0
;
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
200
)
;
}
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
800
);
else
if
(
Backlight_SetPwmLevel
()
==
3U
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
400
);
}
if
(
LightR_Status_Count
>=
150
)
else
if
(
Backlight_SetPwmLevel
()
==
4U
)
{
LightR_Status_Count
=
0
;
LightR_Status
=
!
LightR_Status
;
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
600
);
}
else
if
(
Backlight_SetPwmLevel
()
==
5U
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
800
);
}
}
else
{
...
...
@@ -214,8 +231,29 @@ Light_uint8_t Backlight_SetPwmEn(void)
/* 背光等级回调函数 */
Light_uint8_t
Backlight_SetPwmLevel
(
void
)
{
Light_uint8_t
Backlight_PwmLevel
;
return
1
;
if
(
LightR
>
0
&&
LightR
<=
400
)
{
Backlight_PwmLevel
=
1U
;
}
else
if
(
LightR
>
400
&&
LightR
<=
800
)
{
Backlight_PwmLevel
=
2U
;
}
else
if
(
LightR
>
800
&&
LightR
<=
1400
)
{
Backlight_PwmLevel
=
3U
;
}
else
if
(
LightR
>
1400
&&
LightR
<=
2000
)
{
Backlight_PwmLevel
=
4U
;
}
else
if
(
LightR
>
2000
&&
LightR
<=
2600
)
{
Backlight_PwmLevel
=
5U
;
}
return
Backlight_PwmLevel
;
}
/* 获取电阻值回调函数 */
...
...
Firmware/Source/Application/BackLight.h
View file @
a99874fa
...
...
@@ -21,8 +21,10 @@
#define Backlight_NULL ( void * )0u
#endif
/* NULL */
extern
Light_uint16_t
LightR_Status
;
void
Backlight_KL30_Wakeup_Init
(
void
);
void
BackLight_Process
(
void
);
Light_uint8_t
Backlight_SetPwmLevel
(
void
);
...
...
Firmware/Source/Application/GpioUser.c
View file @
a99874fa
...
...
@@ -80,7 +80,7 @@ void Gpio_Init(_GpioUser_Enum InitMode)
RTE_GPIO_Config
(
RTE_GPIO_PORT14_PIN00
,
GpioOut_Low
);
//L_BD433Ctrl_OUT
RTE_GPIO_Config
(
RTE_GPIO_PORT14_PIN01
,
RTE_GPIO_DIR_IN
);
//L_BiasBitSW_燃油_OUT---
RTE_GPIO_Config
(
RTE_GPIO_PORT14_PIN06
,
GpioOut_Low
);
RTE_GPIO_Config
(
RTE_GPIO_PORT14_PIN07
,
GpioOut_Low
);
RTE_GPIO_Config
(
RTE_GPIO_PORT14_PIN07
,
RTE_GPIO_DIR_IN
);
}
else
{
...
...
Firmware/Source/Component/Analog/Analog_Signals.c
View file @
a99874fa
...
...
@@ -85,7 +85,7 @@ const __attribute__((aligned(4))) ADC_Ch_Cfg_st_t stADCChCfg[ADC_SIGNAL_CH_NUMBE
{
3U
,
2U
,
0U
,
2U
,
0U
,
1U
,
ADC_Res_Calc_Circuit101
,},
{
4U
,
2U
,
0U
,
2U
,
0U
,
1U
,
ADC_Res_Calc_Circuit101
,},
{
5U
,
3U
,
0U
,
5000U
,
0U
,
10U
,
ADC_Res_Calc_Circuit201
,},
{
6U
,
2U
,
0U
,
2U
,
0U
,
1U
,
ADC_Res_Calc_Circuit101
,},
{
6U
,
0U
,
0U
,
0U
,
0U
,
1U
,
ADC_Voltage_Calc_Circuit101
,},
};
...
...
@@ -97,7 +97,7 @@ const __attribute__((aligned(4))) ADC_Res_List_st_t stADCResList[ADC_SIGNAL_CH_N
{
0U
,
0U
,
500U
,
300U
,},
{
0U
,
0U
,
500U
,
0U
,},
{
47000U
,
0U
,
100000U
,
0U
,},
{
0U
,
0U
,
50
0U
,
0U
,},
{
0U
,
100000U
,
0U
,
0U
,},
};
/* Private function prototypes ----------------------------------------------*/
...
...
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