Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RT_RMR42E
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
时昊
RT_RMR42E
Commits
154c9f0a
Commit
154c9f0a
authored
May 20, 2025
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:增加段码屏热插拔功能
parent
adbda899
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
98 additions
and
0 deletions
+98
-0
BU98R10.c
Firmware/Source/Component/BU98R10/BU98R10.c
+98
-0
No files found.
Firmware/Source/Component/BU98R10/BU98R10.c
View file @
154c9f0a
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
#define BU98R10_NOP_TIME 5U
#define BU98R10_NOP_TIME 5U
static
uint16_t
BU98R10ResetCount
=
0
;
uint8_t
BU98R10_CHIP0_GET_SD_LEVEL
(
void
);
uint8_t
BU98R10_CHIP0_GET_SD_LEVEL
(
void
);
uint8_t
BU98R10_CHIP0_GET_SD_LEVEL
(
void
)
uint8_t
BU98R10_CHIP0_GET_SD_LEVEL
(
void
)
{
{
...
@@ -280,6 +282,7 @@ uint32_t u32BU98R10ForcedUpdate = 0UL;
...
@@ -280,6 +282,7 @@ uint32_t u32BU98R10ForcedUpdate = 0UL;
void
BU98R10_Init
(
void
)
void
BU98R10_Init
(
void
)
{
{
uint8_t
i
;
uint8_t
i
;
BU98R10ResetCount
=
0
;
#if BU98R10_WRITE_AT_SAME_TIME
#if BU98R10_WRITE_AT_SAME_TIME
#if BU98R10_COLORFUL_LCD_MODE
#if BU98R10_COLORFUL_LCD_MODE
...
@@ -563,6 +566,88 @@ void BU98R10_Init(void)
...
@@ -563,6 +566,88 @@ void BU98R10_Init(void)
#endif
#endif
}
}
/*****************************************************************************************************
* @brief BU98R10_Reset
*
* @version 0.1
* @author (kaiwen.jiang@hljtyw.com)
* @date 2024-11-07
* @copyright Copyright (c) 2024
*
* 1s调用一次
*****************************************************************************************************/
void
BU98R10_Reset
(
void
)
{
// uint8_t i;
/* IC模式复位 */
BU98R10_0_Command_Write
(
BU98R10_CMD_ICSET
|
BU98R10_PAR_ICSET_RGB
);
BU98R10_1_Command_Write
(
BU98R10_CMD_ICSET
|
BU98R10_PAR_ICSET_RGB
);
/* 驱动控制复位 */
BU98R10_0_Command_Write
(
BU98R10_CMD_DRVCTRL
|
BU98R10_PAR_DRVCTRL_NORMAL
);
BU98R10_1_Command_Write
(
BU98R10_CMD_DRVCTRL
|
BU98R10_PAR_DRVCTRL_NORMAL
);
/* 设置段码频率,0x98是指令,0x08是值(120hz) */
BU98R10_0_Command_Write
(
BU98R10_CMD_FREQ
);
BU98R10_0_Data_Write
(
BU98R10_FRAME_FREQ
);
BU98R10_1_Command_Write
(
BU98R10_CMD_FREQ
);
BU98R10_1_Data_Write
(
BU98R10_FRAME_FREQ
);
/* LED控制 */
// BU98R10_0_Command_Write(BU98R10_CMD_LED_CTRL);
// BU98R10_0_Data_Write(0x12u);
/* 定时控制--R段 */
// BU98R10_0_Command_Write(BU98R10_CMD_SEG_R);
// BU98R10_0_Data_Write(BU98R10_REG_SEG_R);
/* 定时控制--G段 */
// BU98R10_0_Command_Write(BU98R10_CMD_SEG_G);
// BU98R10_0_Data_Write(BU98R10_REG_SEG_G);
/* 定时控制--B段 */
// BU98R10_0_Command_Write(BU98R10_CMD_SEG_B);
// BU98R10_0_Data_Write(BU98R10_REG_SEG_B);
/**< 灰度------------------------------------------------- */
// BU98R10_All_Command_Write(BU98R10_CMD_LED_STARTR);
// BU98R10_All_Data_Write(BU98R10_LRS, BU98R10_LRS);
// BU98R10_All_Command_Write(BU98R10_CMD_LED_STARTG);
// BU98R10_All_Data_Write(BU98R10_LGS, BU98R10_LGS);
// BU98R10_All_Command_Write(BU98R10_CMD_LED_STARTB);
// BU98R10_All_Data_Write(BU98R10_LBS, BU98R10_LBS);
// BU98R10_All_Command_Write(BU98R10_CMD_LED_WIDTHR);
// BU98R10_All_Data_Write(BU98R10_LRW, BU98R10_LRW);
// BU98R10_All_Command_Write(BU98R10_CMD_LED_WIDTHG);
// BU98R10_All_Data_Write(BU98R10_LGW, BU98R10_LGW);
// BU98R10_All_Command_Write(BU98R10_CMD_LED_WIDTHB);
// BU98R10_All_Data_Write(BU98R10_LBW, BU98R10_LBW);
/**< 灰度------------------------------------------------- */
/* 设置RAM地址 */
// BU98R10_0_Command_Write(BU98R10_CMD_ADSET);
// BU98R10_0_Data_Write(0x00u);
/* 写入数据 */
// BU98R10_All_Command_Write(BU98R10_CMD_DATWR);
// for (i = 0; i < BU98R10_DDRAM_SIZE; i++)
// {
// BU98R10_All_Data_Write(BU98R10Chip0DDRAMBackup.Byte[i], BU98R10Chip1DDRAMBackup.Byte[i]);
// }
/* 正常显示模式 */
BU98R10_0_Command_Write
(
BU98R10_CMD_DISPON
);
BU98R10_1_Command_Write
(
BU98R10_CMD_DISPON
);
}
void
BU98R10_Shutdown
(
void
)
void
BU98R10_Shutdown
(
void
)
{
{
#if BU98R10_WRITE_AT_SAME_TIME
#if BU98R10_WRITE_AT_SAME_TIME
...
@@ -581,6 +666,19 @@ void BU98R10_Shutdown(void)
...
@@ -581,6 +666,19 @@ void BU98R10_Shutdown(void)
#define BU98R10_FORCED_SEG_NUM 2U
#define BU98R10_FORCED_SEG_NUM 2U
void
BU98R10_Update_Request
(
void
)
void
BU98R10_Update_Request
(
void
)
{
{
if
(
BU98R10ResetCount
>=
100
)
{
if
(
BU98R10Update
.
En
==
0
)
{
BU98R10_Reset
();
BU98R10ResetCount
=
0u
;
}
}
else
{
BU98R10ResetCount
++
;
}
if
(
BU98R10Update
.
En
==
0
)
if
(
BU98R10Update
.
En
==
0
)
{
{
if
(
u32BU98R10ForcedUpdate
<=
(
BU98R10_DDRAM_SIZE
-
BU98R10_FORCED_SEG_NUM
))
if
(
u32BU98R10ForcedUpdate
<=
(
BU98R10_DDRAM_SIZE
-
BU98R10_FORCED_SEG_NUM
))
...
...
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