Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
宁楠萍
rt-thread
提交
efe00652
R
rt-thread
项目概览
宁楠萍
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
efe00652
编写于
9月 14, 2018
作者:
xuzhuoyi96
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[bsp][stm32f429-disco] Change to use rt_components_init()
上级
68c5cc39
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
13 deletion
+20
-13
bsp/stm32f429-disco/applications/application.c
bsp/stm32f429-disco/applications/application.c
+2
-8
bsp/stm32f429-disco/drivers/board.c
bsp/stm32f429-disco/drivers/board.c
+14
-1
bsp/stm32f429-disco/drivers/drv_lcd.c
bsp/stm32f429-disco/drivers/drv_lcd.c
+3
-3
bsp/stm32f429-disco/drivers/drv_sdram.h
bsp/stm32f429-disco/drivers/drv_sdram.h
+1
-1
未找到文件。
bsp/stm32f429-disco/applications/application.c
浏览文件 @
efe00652
...
...
@@ -34,8 +34,6 @@
void
rt_init_thread_entry
(
void
*
parameter
)
{
rt_device_t
lcd
;
/* GDB STUB */
#ifdef RT_USING_GDB
gdb_set_device
(
"uart6"
);
...
...
@@ -57,13 +55,9 @@ void rt_init_thread_entry(void* parameter)
rt_kprintf
(
"TCP/IP initialized!
\n
"
);
}
#endif
rt_components_init
();
#ifdef RT_USING_FINSH
finsh_system_init
();
#endif
lcd
=
rt_device_find
(
"lcd"
);
rtgui_graphic_set_device
(
lcd
);
rt_gui_demo_init
();
}
int
rt_application_init
()
...
...
bsp/stm32f429-disco/drivers/board.c
浏览文件 @
efe00652
...
...
@@ -15,11 +15,16 @@
#include <rthw.h>
#include <rtthread.h>
#ifdef PKG_USING_GUIENGINE
#include <rtgui/driver.h>
#endif
#include "stm32f4xx.h"
#include "board.h"
#include "usart.h"
#include "stm32f4xx_hal.h"
void
_init
(
void
)
{
...
...
@@ -133,6 +138,8 @@ void HAL_Delay(__IO uint32_t Delay)
*/
void
rt_hw_board_init
()
{
rt_device_t
lcd
;
HAL_Init
();
SystemClock_Config
();
...
...
@@ -142,10 +149,16 @@ void rt_hw_board_init()
#else
stm32_hw_usart_init
();
#endif
#ifdef RT_USING_CONSOLE
rt_console_set_device
(
CONSOLE_DEVICE
);
#endif
#ifdef RT_USING_CONSOLE
lcd
=
rt_device_find
(
"lcd"
);
rtgui_graphic_set_device
(
lcd
);
#endif
}
/*@}*/
bsp/stm32f429-disco/drivers/drv_lcd.c
浏览文件 @
efe00652
...
...
@@ -655,7 +655,7 @@ uint8_t BSP_LCD_Init(void)
void
BSP_LCD_DrawPixel
(
uint16_t
Xpos
,
uint16_t
Ypos
,
uint32_t
RGB_Code
)
{
/* Write data value to all SDRAM memory */
*
(
__IO
uint32_t
*
)
(
LtdcHandler
.
LayerCfg
[
ActiveLayer
].
FBStartAdress
+
(
4
*
(
Ypos
*
240
+
Xpos
)))
=
RGB_Code
;
*
(
__IO
uint32_t
*
)
(
LtdcHandler
.
LayerCfg
[
ActiveLayer
].
FBStartAdress
+
(
2
*
(
Ypos
*
240
+
Xpos
)))
=
RGB_Code
;
}
void
BSP_LCD_DrawLine
(
uint32_t
pixel
,
uint16_t
X1
,
uint16_t
Y1
,
uint16_t
X2
,
uint16_t
Y2
)
...
...
@@ -926,7 +926,7 @@ static rt_err_t lcd_control(rt_device_t dev, int cmd, void *args)
static
void
ili9341_lcd_set_pixel
(
const
char
*
pixel
,
int
x
,
int
y
)
{
*
(
__IO
uint
32_t
*
)
(
LtdcHandler
.
LayerCfg
[
ActiveLayer
].
FBStartAdress
+
(
4
*
(
y
*
240
+
x
)))
=
*
(
uint16_t
*
)
pixel
;
*
(
__IO
uint
16_t
*
)(
LtdcHandler
.
LayerCfg
[
ActiveLayer
].
FBStartAdress
+
(
2
*
(
y
*
240
+
x
)))
=
*
(
uint16_t
*
)
pixel
;
}
#ifdef RT_USING_FINSH
static
void
lcd_set_pixel
(
uint16_t
color
,
int
x
,
int
y
)
...
...
@@ -1006,7 +1006,7 @@ static void ili9341_lcd_blit_line(const char* pixels, int x, int y, rt_size_t si
{
int
i
=
0
;
while
(
size
--
)
*
(
__IO
uint
32_t
*
)
(
LtdcHandler
.
LayerCfg
[
ActiveLayer
].
FBStartAdress
+
(
4
*
(
y
*
240
+
x
+
i
++
)))
=
*
(
uint16_t
*
)
pixels
++
;
*
(
__IO
uint
16_t
*
)
(
LtdcHandler
.
LayerCfg
[
ActiveLayer
].
FBStartAdress
+
(
2
*
(
y
*
240
+
x
+
i
++
)))
=
*
(
uint16_t
*
)
pixels
++
;
}
#ifdef RT_USING_FINSH
#define LINE_LEN 30
...
...
bsp/stm32f429-disco/drivers/drv_sdram.h
浏览文件 @
efe00652
...
...
@@ -25,7 +25,7 @@
#include <board.h>
#define SDRAM_BANK_ADDR ((uint32_t)0xD00
00000)
#define SDRAM_BANK_ADDR ((uint32_t)0xD00
30000)
/*0xD0000000-0xD002FFFF used for LCD framebuffer*/
/* #define SDRAM_MEMORY_WIDTH FMC_SDRAM_MEM_BUS_WIDTH_8 */
#define SDRAM_MEMORY_WIDTH FMC_SDRAM_MEM_BUS_WIDTH_16
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录