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
3018a863
Commit
3018a863
authored
8 months ago
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:修改背光调节
parent
e89a14b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
BackLight.c
Firmware/Source/Application/BackLight.c
+35
-1
BackLight.h
Firmware/Source/Application/BackLight.h
+1
-1
No files found.
Firmware/Source/Application/BackLight.c
View file @
3018a863
#include "Backlight.h"
#include "Components.h"
#define BACK_LIGHT_Val_1 100
#define BACK_LIGHT_Val_2 300
#define BACK_LIGHT_Val_3 500
#define BACK_LIGHT_Val_4 700
#define BACK_LIGHT_Val_5 900
typedef
struct
{
Light_uint16_t
Temperature
;
/* 温度 */
...
...
@@ -377,4 +383,32 @@ void BackLight_Service(void)
{
Backlight_Operate
.
SetPwmCbk
(
0
);
}
}
\ No newline at end of file
}
void
BackLight_Process
(
void
)
{
if
(
Menu_Item_Select_Get
(
MENU_ITEM_BACKLIGHT_5
)
==
1
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_5
);
}
else
if
(
Menu_Item_Select_Get
(
MENU_ITEM_BACKLIGHT_4
)
==
1
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_4
);
}
else
if
(
Menu_Item_Select_Get
(
MENU_ITEM_BACKLIGHT_3
)
==
1
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_3
);
}
else
if
(
Menu_Item_Select_Get
(
MENU_ITEM_BACKLIGHT_2
)
==
1
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_2
);
}
else
if
(
Menu_Item_Select_Get
(
MENU_ITEM_BACKLIGHT_1
)
==
1
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_Val_1
);
}
else
{
;
}
}
This diff is collapsed.
Click to expand it.
Firmware/Source/Application/BackLight.h
View file @
3018a863
...
...
@@ -22,7 +22,7 @@
#endif
/* NULL */
void
Backlight_KL30_Wakeup_Init
(
void
);
void
BackLight_Process
(
void
);
...
...
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