Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiancetai
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
陈家乐
jiancetai
Commits
54187b7e
Commit
54187b7e
authored
Nov 01, 2024
by
王佳伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:新增适配天马屏
parent
078925ad
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
114 additions
and
144 deletions
+114
-144
BSP.c
source/touch_screen/BSP/BSP.c
+79
-140
BSP.h
source/touch_screen/BSP/BSP.h
+1
-1
fx12_test.c
source/touch_screen/fx12_test/fx12_test.c
+33
-2
fx12_test.h
source/touch_screen/fx12_test/fx12_test.h
+1
-1
G393_color_cycle_5s.rec
编译文件/G393_color_cycle_5s.rec
+0
-0
No files found.
source/touch_screen/BSP/BSP.c
View file @
54187b7e
...
...
@@ -340,10 +340,8 @@ void AIM951_i2c_sendreceive(uint8_t sendreceive_addr, uint8_t *receive_data)
BSP_WDT_Clear
();
}
void
switch_951_init
(
uint8_t
work_mode
)
void
switch_951_init
(
void
)
{
if
(
work_mode
==
0
)
{
AIM951_i2c_send
(
0xFF
,
0x00
);
AIM951_i2c_send
(
0x08
,
0xAC
);
AIM951_i2c_send
(
0x68
,
0x02
);
...
...
@@ -357,17 +355,18 @@ void switch_951_init(uint8_t work_mode)
AIM951_i2c_send
(
0x03
,
0x50
);
AIM951_i2c_send
(
0xFF
,
0x03
);
AIM951_i2c_send
(
0x03
,
0x50
);
// 111
2
// 122
2
AIM951_i2c_send
(
0xFF
,
0x00
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x44
,
0x0A
);
AIM951_i2c_send
(
0x44
,
0x0B
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x50
,
0xC0
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x51
,
0x3
0
);
AIM951_i2c_send
(
0x51
,
0xF
0
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x3B
,
0x4C
);
BSP_Delay_ms
(
10
);
// 951 iic mapping
AIM951_i2c_send
(
0xFF
,
0x00
);
BSP_Delay_ms
(
10
);
...
...
@@ -375,13 +374,15 @@ void switch_951_init(uint8_t work_mode)
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x16
,
0x34
);
BSP_Delay_ms
(
10
);
// INTB init
// intb enable
AIM951_i2c_send
(
0xFF
,
0x00
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x93
,
0x10
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x5C
,
0x21
);
AIM951_i2c_send
(
0x5c
,
0x21
);
BSP_Delay_ms
(
10
);
// 951 init end
AIM951_i2c_send
(
0xFF
,
0x00
);
BSP_Delay_ms
(
10
);
...
...
@@ -389,7 +390,9 @@ void switch_951_init(uint8_t work_mode)
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x3B
,
0xCC
);
BSP_Delay_ms
(
10
);
// 951 patternGen 1920*720P60 1222 mode
if
(
Touch_Status
()
==
0
)
{
// 951 patternGen 1920*720P60 1222 mode 纯色(最初屏参)
AIM951_i2c_send
(
0xFF
,
0x00
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x5F
,
0x60
);
...
...
@@ -424,76 +427,18 @@ void switch_951_init(uint8_t work_mode)
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x11
,
0x03
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x02
,
0x44
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x00
,
0x05
);
AIM951_i2c_send
(
0xFF
,
0x00
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x31
,
0x33
);
AIM951_i2c_send
(
0x02
,
0x06
);
BSP_Delay_ms
(
10
);
GPIO_OUT_PORT08_PIN12
=
1U
;
GPIO_OUT_PORT08_PIN09
=
1U
;
AIM951_i2c_send
(
0x00
,
0x23
);
}
if
(
work_mode
==
1
)
else
{
AIM951_i2c_send
(
0xFF
,
0x00
);
AIM951_i2c_send
(
0x08
,
0xAC
);
AIM951_i2c_send
(
0x68
,
0x02
);
AIM951_i2c_send
(
0x04
,
0x70
);
AIM951_i2c_send
(
0xFF
,
0x05
);
AIM951_i2c_send
(
0x1B
,
0x00
);
AIM951_i2c_send
(
0x1F
,
0x08
);
AIM951_i2c_send
(
0xFF
,
0x08
);
AIM951_i2c_send
(
0x88
,
0x1F
);
AIM951_i2c_send
(
0xFF
,
0x04
);
AIM951_i2c_send
(
0x03
,
0x50
);
AIM951_i2c_send
(
0xFF
,
0x03
);
AIM951_i2c_send
(
0x03
,
0x50
);
// 1222
AIM951_i2c_send
(
0xFF
,
0x00
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x44
,
0x0B
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x50
,
0xC0
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x51
,
0xF0
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x3B
,
0x4C
);
BSP_Delay_ms
(
10
);
// 951 iic mapping
AIM951_i2c_send
(
0xFF
,
0x00
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x0E
,
0x34
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x16
,
0x34
);
BSP_Delay_ms
(
10
);
// intb enable
AIM951_i2c_send
(
0xFF
,
0x00
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x93
,
0x10
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x5c
,
0x21
);
BSP_Delay_ms
(
10
);
// 951 init end
AIM951_i2c_send
(
0xFF
,
0x00
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x04
,
0x50
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x3B
,
0xCC
);
BSP_Delay_ms
(
10
);
// 951 patternGen 1920*720P60 1222 mode 纯色
// 951 patternGen 1920*720P60 1222 mode 纯色(更新后 天马屏参)
AIM951_i2c_send
(
0xFF
,
0x00
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x5F
,
0x60
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x84
,
0x1
5
);
AIM951_i2c_send
(
0x84
,
0x1
3
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x8C
,
0x01
);
BSP_Delay_ms
(
10
);
...
...
@@ -503,9 +448,9 @@ void switch_951_init(uint8_t work_mode)
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x07
,
0x00
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x08
,
0x
D9
);
AIM951_i2c_send
(
0x08
,
0x
0D
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x09
,
0x8
2
);
AIM951_i2c_send
(
0x09
,
0x8
3
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x0A
,
0x80
);
BSP_Delay_ms
(
10
);
...
...
@@ -513,28 +458,28 @@ void switch_951_init(uint8_t work_mode)
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x0C
,
0x72
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x0D
,
0x2
8
);
AIM951_i2c_send
(
0x0D
,
0x2
0
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x0E
,
0x0
2
);
AIM951_i2c_send
(
0x0E
,
0x0
8
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x0F
,
0x2
8
);
AIM951_i2c_send
(
0x0F
,
0x2
0
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x10
,
0x0
2
);
AIM951_i2c_send
(
0x10
,
0x0
8
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x11
,
0x03
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x02
,
0x
06
);
AIM951_i2c_send
(
0x02
,
0x
44
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x00
,
0x23
);
AIM951_i2c_send
(
0x00
,
0x05
);
BSP_Delay_ms
(
10
);
}
AIM951_i2c_send
(
0xFF
,
0x00
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x31
,
0x33
);
BSP_Delay_ms
(
10
);
GPIO_OUT_PORT08_PIN12
=
1U
;
GPIO_OUT_PORT08_PIN09
=
1U
;
}
}
// void switch_951_3G_6G(uint8_t work_mode)
...
...
@@ -698,7 +643,7 @@ void switch_951_Color(uint8_t in)
case
0
:
//白
AIM951_i2c_send
(
0xFF
,
0x01
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x02
,
0x
0
4
);
AIM951_i2c_send
(
0x02
,
0x
4
4
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x00
,
0x13
);
BSP_Delay_ms
(
10
);
...
...
@@ -707,7 +652,7 @@ void switch_951_Color(uint8_t in)
case
1
:
//黑
AIM951_i2c_send
(
0xFF
,
0x01
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x02
,
0x
0
4
);
AIM951_i2c_send
(
0x02
,
0x
4
4
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x00
,
0x23
);
BSP_Delay_ms
(
10
);
...
...
@@ -716,7 +661,7 @@ void switch_951_Color(uint8_t in)
case
2
:
//红
AIM951_i2c_send
(
0xFF
,
0x01
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x02
,
0x
0
4
);
AIM951_i2c_send
(
0x02
,
0x
4
4
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x00
,
0x33
);
BSP_Delay_ms
(
10
);
...
...
@@ -725,7 +670,7 @@ void switch_951_Color(uint8_t in)
case
3
:
//绿
AIM951_i2c_send
(
0xFF
,
0x01
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x02
,
0x
0
4
);
AIM951_i2c_send
(
0x02
,
0x
4
4
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x00
,
0x43
);
BSP_Delay_ms
(
10
);
...
...
@@ -734,7 +679,7 @@ void switch_951_Color(uint8_t in)
case
4
:
//蓝
AIM951_i2c_send
(
0xFF
,
0x01
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x02
,
0x
0
4
);
AIM951_i2c_send
(
0x02
,
0x
4
4
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x00
,
0x53
);
BSP_Delay_ms
(
10
);
...
...
@@ -755,12 +700,6 @@ void switch_951_Color(uint8_t in)
}
void
init_951
(
void
)
{
AIM951_i2c_send
(
0xFF
,
0x01
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x02
,
0x04
);
BSP_Delay_ms
(
10
);
AIM951_i2c_send
(
0x00
,
0x23
);
BSP_Delay_ms
(
10
);
switch_951_init
(
1
);
switch_951_init
();
}
source/touch_screen/BSP/BSP.h
View file @
54187b7e
...
...
@@ -101,7 +101,7 @@ uint8_t gpio_get_96751_lock(void);
//void init_96751(void);
void
init_951
(
void
);
//void switch_96751_3G_6G(uint8_t in);
void
switch_951_init
(
uint8_t
work_mode
);
void
switch_951_init
(
void
);
void
switch_951_Color
(
uint8_t
in
);
void
AIM951_i2c_send
(
uint8_t
addr
,
uint8_t
data
);
void
AIM951_i2c_sendreceive
(
uint8_t
sendreceive_addr
,
uint8_t
*
receive_data
);
...
...
source/touch_screen/fx12_test/fx12_test.c
View file @
54187b7e
...
...
@@ -29,6 +29,10 @@ uint32_t pwm_data;
uint32_t
pwm_load_data
;
uint8_t
lock_flag
=
0
;
uint8_t
Touch_data_last
=
0
;
uint8_t
Touch_data_status
=
0
;
uint8_t
Touch_Flag
=
1
;
uint32_t
size
;
uint32_t
count
;
...
...
@@ -408,7 +412,7 @@ void fx12_test_server(void)
tft_switch_switch
=
1
;
}
TFT_LCD_Draw_Bmp
(
1
,
32
,
(
uint8_t
*
)
gImage_point_right
[
1
]);
// 仪表选择显示
switch_951_init
(
1
);
//switch_951_init(
);
}
}
else
...
...
@@ -517,6 +521,11 @@ void fx12_test_server(void)
{
key3_flag
=
0
;
}
if
(
Touch_data_status
==
1
)
{
Touch_data_status
=
0
;
switch_951_init
();
}
// lock功能检测
if
(
gpio_get_96751_lock
()
==
0
)
...
...
@@ -582,7 +591,7 @@ void fx12_test_server(void)
if
(
recive_buf
[
0
]
!=
0x19
)
{
version_flag
=
0
;
switch_951_init
(
1
);
switch_951_init
();
TFT_LCD_Draw_Bmp
(
80
,
144
,
(
uint8_t
*
)
D
[
0
]);
TFT_LCD_Draw_Bmp
(
116
,
144
,
(
uint8_t
*
)
D
[
0
]);
TFT_LCD_Draw_Bmp
(
152
,
144
,
(
uint8_t
*
)
D
[
0
]);
...
...
@@ -640,6 +649,23 @@ void fx12_test_server(void)
touch_buff
[
11
],
touch_buff
[
12
]);
}
else
if
(
touch_buff
[
0
]
==
0x4AU
)
{
if
(
touch_buff
[
3
]
!=
Touch_data_last
)
{
Touch_data_status
=
1
;
Touch_data_last
=
touch_buff
[
3
];
if
(
touch_buff
[
3
]
==
0x04
)
{
Touch_Flag
=
1
;
}
else
{
Touch_Flag
=
0
;
}
}
}
Clear_TOUCH_IRQHandler_flag
();
}
}
...
...
@@ -648,3 +674,8 @@ void BSP_SetBL_Brightness_PWM(uint32_t in)
{
PWM_Channel_Set_Duty
(
7
,
in
);
// 设置屏幕背光占空比
}
uint8_t
Touch_Status
(
void
)
{
return
Touch_Flag
;
}
source/touch_screen/fx12_test/fx12_test.h
View file @
54187b7e
...
...
@@ -10,6 +10,6 @@
void
Display_Init
(
void
);
void
fx12_test_server
(
void
);
void
BSP_SetBL_Brightness_PWM
(
uint32_t
in
);
extern
uint8_t
Touch_Status
(
void
);
#endif
/* MV1_TOUCH_TEST_H_ */
编译文件/G393_color_cycle_5s.rec
0 → 100644
View file @
54187b7e
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