Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wwsmg1
rt-thread
提交
8a180d5d
R
rt-thread
项目概览
wwsmg1
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8a180d5d
编写于
10月 15, 2021
作者:
csdn_JZ_
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Convert format
上级
025b7153
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
44 addition
and
44 deletion
+44
-44
bsp/tkm32F499/drivers/board.c
bsp/tkm32F499/drivers/board.c
+2
-2
bsp/tkm32F499/drivers/drv_gpio.h
bsp/tkm32F499/drivers/drv_gpio.h
+1
-1
bsp/tkm32F499/drivers/lcd/lcd.c
bsp/tkm32F499/drivers/lcd/lcd.c
+21
-21
bsp/tkm32F499/drivers/lcd/lcd.h
bsp/tkm32F499/drivers/lcd/lcd.h
+20
-20
未找到文件。
bsp/tkm32F499/drivers/board.c
浏览文件 @
8a180d5d
...
...
@@ -26,8 +26,8 @@ MSH_CMD_EXPORT(reboot, Reboot System);
static
void
bsp_clock_config
(
void
)
{
RemapVtorTable
();
SystemClk_HSEInit
(
RCC_PLLMul_20
);
//启动PLL时钟,12MHz*20=240MHz
NVIC_PriorityGroupConfig
(
NVIC_PriorityGroup_2
);
//2:2,全局性函数,仅需设置一次
SystemClk_HSEInit
(
RCC_PLLMul_20
);
//启动PLL时钟,12MHz*20=240MHz
NVIC_PriorityGroupConfig
(
NVIC_PriorityGroup_2
);
//2:2,全局性函数,仅需设置一次
uint32_t
sysclk
=
0
;
getSystemClock
(
&
sysclk
);
...
...
bsp/tkm32F499/drivers/drv_gpio.h
浏览文件 @
8a180d5d
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
bsp/tkm32F499/drivers/lcd/lcd.c
浏览文件 @
8a180d5d
...
...
@@ -187,7 +187,7 @@ void BlockWrite(unsigned int Xstart, unsigned int Xend, unsigned int Ystart, uns
SPI_WriteData
(
Yend
&
0xff
);
SPI_WriteComm
(
0x2c00
);
//
for(Xstart=0;Xstart<1000;Xstart++)SPI_WriteData(0x55);
//
for(Xstart=0;Xstart<1000;Xstart++)SPI_WriteData(0x55);
}
void
Lcd_Initialize
(
void
)
{
...
...
@@ -1040,23 +1040,23 @@ void LCD_Initial(rt_uint32_t LTDC_Buf1, rt_uint32_t LTDC_Buf2) //LCD初始化函
// LTDC_Buf[yStart + i + YSIZE_PHYS * j + temp] = Color;
// }
// //
rt_uint16_t i,j;
// //
rt_uint32_t temp;
// //
temp = XSIZE_PHYS*yStart;
// //
for(i=0;i<yLong;i++)
// //
{
// //
for(j=0;j<xLong;j++)
// //
LTDC_Buf[xStart+j+XSIZE_PHYS*i+temp]=Color;
// //
}
// //
rt_uint16_t i,j;
// //
rt_uint32_t temp;
// //
temp = XSIZE_PHYS*yStart;
// //
for(i=0;i<yLong;i++)
// //
{
// //
for(j=0;j<xLong;j++)
// //
LTDC_Buf[xStart+j+XSIZE_PHYS*i+temp]=Color;
// //
}
// }
/******************************************
函数名:Lcd图像填充
功能:向Lcd指定位置填充图像
入口参数:
(x,y): 图片左上角起始坐标
(pic_H,pic_V): 图片的宽高
pic 指向存储图片数组的指针
(x,y): 图片左上角起始坐标
(pic_H,pic_V): 图片的宽高
pic 指向存储图片数组的指针
LCD_Fill_Pic(400,100,320,480,(rt_uint32_t*)gImage_MM_T035);
******************************************/
// void LCD_Fill_Pic(rt_uint16_t x, rt_uint16_t y, rt_uint16_t pic_H, rt_uint16_t pic_V, rt_uint32_t *pic)
...
...
@@ -1070,20 +1070,20 @@ LCD_Fill_Pic(400,100,320,480,(rt_uint32_t*)gImage_MM_T035);
// LTDC_Buf[Xstart + i + YSIZE_PHYS * j + y] = pic[k++];
// }
// //
rt_uint16_t i,j;
// //
rt_uint32_t Ystart,k=0;
// //
Ystart = YSIZE_PHYS*y;
// //
for(i=0;i<pic_V;i++)
// //
{
// //
for(j=0;j<pic_H;j++)
// //
LTDC_Buf[x+j+YSIZE_PHYS*i+Ystart]=pic[k++];
// //
}
// //
rt_uint16_t i,j;
// //
rt_uint32_t Ystart,k=0;
// //
Ystart = YSIZE_PHYS*y;
// //
for(i=0;i<pic_V;i++)
// //
{
// //
for(j=0;j<pic_H;j++)
// //
LTDC_Buf[x+j+YSIZE_PHYS*i+Ystart]=pic[k++];
// //
}
// }
//=============== 在x,y 坐标上打一个颜色为Color的点 ===============
// void DrawPixel(rt_uint16_t x, rt_uint16_t y, int Color)
// {
// LTDC_Buf[y + YSIZE_PHYS * x] = Color;
// //
LTDC_Buf[x+XSIZE_PHYS*y] = Color;
// //
LTDC_Buf[x+XSIZE_PHYS*y] = Color;
// }
/**********8*16字体 ASCII码 显示*************
(x,y): 显示字母的起始坐标
...
...
bsp/tkm32F499/drivers/lcd/lcd.h
浏览文件 @
8a180d5d
...
...
@@ -13,27 +13,27 @@
// #define XSIZE_PHYS 800
// #define YSIZE_PHYS 480
// extern __align(256) rt_uint32_t LTDC_Buf[XSIZE_PHYS*YSIZE_PHYS];
#define LCD_SPI_CS(a)
\
if (a)
\
GPIOB->BSRR = GPIO_Pin_11;
\
else
\
GPIOB->BRR = GPIO_Pin_11;
#define SPI_DCLK(a)
\
if (a)
\
GPIOB->BSRR = GPIO_Pin_9;
\
else
\
GPIOB->BRR = GPIO_Pin_9;
#define SPI_SDA(a)
\
if (a)
\
GPIOB->BSRR = GPIO_Pin_0;
\
else
\
GPIOB->BRR = GPIO_Pin_0;
#define LCD_SPI_CS(a)
\
if (a)
\
GPIOB->BSRR = GPIO_Pin_11;
\
else
\
GPIOB->BRR = GPIO_Pin_11;
#define SPI_DCLK(a)
\
if (a)
\
GPIOB->BSRR = GPIO_Pin_9;
\
else
\
GPIOB->BRR = GPIO_Pin_9;
#define SPI_SDA(a)
\
if (a)
\
GPIOB->BSRR = GPIO_Pin_0;
\
else
\
GPIOB->BRR = GPIO_Pin_0;
#define LCD_RST(a)
\
if (a)
\
GPIOD->BSRR = GPIO_Pin_6;
\
else
\
GPIOD->BRR = GPIO_Pin_6;
#define LCD_RST(a)
\
if (a)
\
GPIOD->BSRR = GPIO_Pin_6;
\
else
\
GPIOD->BRR = GPIO_Pin_6;
#define Set_Rst GPIOD->BSRR = GPIO_Pin_6
#define Clr_Rst GPIOD->BRR = GPIO_Pin_6
#define Lcd_Light_ON GPIOD->BSRR = GPIO_Pin_8 //PD8为高电平 背光打开
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录