Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PHPmihuan
rt-thread
提交
f9a809fd
R
rt-thread
项目概览
PHPmihuan
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
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,发现更多精彩内容 >>
提交
f9a809fd
编写于
10月 04, 2018
作者:
xuzhuoyi96
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[bsp][stm32f429-disco] Add LCD/touch/i2c to Kconfig
上级
61bca24c
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
222 addition
and
312 deletion
+222
-312
bsp/stm32f429-disco/.config
bsp/stm32f429-disco/.config
+30
-7
bsp/stm32f429-disco/applications/application.c
bsp/stm32f429-disco/applications/application.c
+2
-0
bsp/stm32f429-disco/drivers/Kconfig
bsp/stm32f429-disco/drivers/Kconfig
+17
-1
bsp/stm32f429-disco/drivers/SConscript
bsp/stm32f429-disco/drivers/SConscript
+12
-2
bsp/stm32f429-disco/drivers/drv_touch.c
bsp/stm32f429-disco/drivers/drv_touch.c
+7
-7
bsp/stm32f429-disco/drivers/drv_touch.h
bsp/stm32f429-disco/drivers/drv_touch.h
+2
-0
bsp/stm32f429-disco/project.uvprojx
bsp/stm32f429-disco/project.uvprojx
+133
-291
bsp/stm32f429-disco/readme.md
bsp/stm32f429-disco/readme.md
+9
-4
bsp/stm32f429-disco/rtconfig.h
bsp/stm32f429-disco/rtconfig.h
+10
-0
未找到文件。
bsp/stm32f429-disco/.config
浏览文件 @
f9a809fd
...
...
@@ -117,18 +117,24 @@ CONFIG_RT_USING_SERIAL=y
# CONFIG_RT_USING_CAN is not set
# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_CPUTIME is not set
# CONFIG_RT_USING_I2C is not set
CONFIG_RT_USING_I2C
=
y
CONFIG_RT_USING_I2C_BITOPS
=
y
CONFIG_RT_USING_PIN
=
y
# CONFIG_RT_USING_PWM is not set
# CONFIG_RT_USING_MTD_NOR is not set
# CONFIG_RT_USING_MTD_NAND is not set
# CONFIG_RT_USING_MTD is not set
# CONFIG_RT_USING_RTC is not set
# CONFIG_RT_USING_SDIO is not set
# CONFIG_RT_USING_SPI is not set
# CONFIG_RT_USING_WDT is not set
# CONFIG_RT_USING_WIFI is not set
# CONFIG_RT_USING_AUDIO is not set
#
# Using WiFi
#
# CONFIG_RT_USING_WIFI is not set
#
# Using USB
#
...
...
@@ -138,8 +144,13 @@ CONFIG_RT_USING_PIN=y
#
# POSIX layer and C standard library
#
# CONFIG_RT_USING_LIBC is not set
CONFIG_RT_USING_LIBC
=
y
# CONFIG_RT_USING_PTHREADS is not set
CONFIG_RT_USING_POSIX
=
y
# CONFIG_RT_USING_POSIX_MMAP is not set
# CONFIG_RT_USING_POSIX_TERMIOS is not set
# CONFIG_RT_USING_POSIX_AIO is not set
# CONFIG_RT_USING_MODULE is not set
#
# Network
...
...
@@ -210,6 +221,7 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_NOPOLL is not set
# CONFIG_PKG_USING_NETUTILS is not set
# CONFIG_PKG_USING_AT_DEVICE is not set
# CONFIG_PKG_USING_WIZNET is not set
#
# IoT Cloud
...
...
@@ -246,13 +258,12 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_EASYFLASH is not set
# CONFIG_PKG_USING_EASYLOGGER is not set
# CONFIG_PKG_USING_SYSTEMVIEW is not set
# CONFIG_PKG_USING_RDB is not set
#
# system packages
#
# CONFIG_PKG_USING_GUIENGINE is not set
# CONFIG_PKG_USING_GUIENGINE_V200 is not set
# CONFIG_PKG_USING_GUIENGINE_LATEST_VERSION is not set
# CONFIG_PKG_USING_CAIRO is not set
# CONFIG_PKG_USING_PIXMAN is not set
# CONFIG_PKG_USING_LWEXT4 is not set
...
...
@@ -261,18 +272,27 @@ CONFIG_RT_USING_PIN=y
# CONFIG_PKG_USING_SQLITE is not set
# CONFIG_PKG_USING_RTI is not set
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
# CONFIG_PKG_USING_LITTLEVGL2RTT_V001 is not set
# CONFIG_PKG_USING_LITTLEVGL2RTT_LATEST_VERSION is not set
# CONFIG_LV_MEM_STATIC is not set
# CONFIG_LV_MEM_DYNAMIC is not set
# CONFIG_LV_COLOR_DEPTH_1 is not set
# CONFIG_LV_COLOR_DEPTH_8 is not set
# CONFIG_LV_COLOR_DEPTH_16 is not set
# CONFIG_LV_COLOR_DEPTH_24 is not set
# CONFIG_PKG_USING_CMSIS is not set
# CONFIG_PKG_USING_DFS_YAFFS is not set
#
# peripheral libraries and drivers
#
# CONFIG_PKG_USING_STM32F4_HAL is not set
# CONFIG_PKG_USING_STM32F4_DRIVERS is not set
# CONFIG_PKG_USING_REALTEK_AMEBA is not set
# CONFIG_PKG_USING_SHT2X is not set
# CONFIG_PKG_USING_AHT10 is not set
# CONFIG_PKG_USING_AP3216C is not set
# CONFIG_PKG_USING_STM32_SDIO is not set
# CONFIG_PKG_USING_ICM20608 is not set
# CONFIG_PKG_USING_U8G2 is not set
#
# miscellaneous packages
...
...
@@ -303,8 +323,11 @@ CONFIG_RT_USING_PIN=y
# example package: hello
#
# CONFIG_PKG_USING_HELLO is not set
CONFIG_RT_USING_ILI9341_LCD
=
y
CONFIG_RT_USING_STMPE811_TOUCH
=
y
CONFIG_RT_USING_EXT_SDRAM
=
y
CONFIG_RT_USING_UART1
=
y
# CONFIG_RT_USING_UART2 is not set
# CONFIG_RT_USING_UART3 is not set
# CONFIG_RT_USING_SPI5 is not set
CONFIG_RT_USING_I2C3
=
y
bsp/stm32f429-disco/applications/application.c
浏览文件 @
f9a809fd
...
...
@@ -40,8 +40,10 @@
static
void
rt_touch_thread_entry
(
void
*
parameter
)
{
#ifdef PKG_USING_LITTLEVGL2RTT
int16_t
x
;
int16_t
y
;
#endif
struct
touch_state
ts
;
while
(
1
)
{
...
...
bsp/stm32f429-disco/drivers/Kconfig
浏览文件 @
f9a809fd
config RT_USING_ILI9341_LCD
bool "Enable LCD on the board"
default y
select RT_USING_EXT_SDRAM
config RT_USING_STMPE811_TOUCH
bool "Enable Touchscreen on the board"
default y
select RT_USING_I2C3
config RT_USING_EXT_SDRAM
bool "Enable SDRAM on the board"
default y
...
...
@@ -16,4 +26,10 @@ config RT_USING_UART3
config RT_USING_SPI5
bool "Enable SPI5"
default n
default n
config RT_USING_I2C3
bool "Enable I2C3"
default y
select RT_USING_I2C
select RT_USING_I2C_BITOPS
bsp/stm32f429-disco/drivers/SConscript
浏览文件 @
f9a809fd
...
...
@@ -9,10 +9,20 @@ src = Split("""
board.c
stm32f4xx_it.c
usart.c
drv_sdram.c
drv_lcd.c
"""
)
if
GetDepend
([
'RT_USING_EXT_SDRAM'
]):
src
+=
[
'drv_sdram.c'
]
if
GetDepend
([
'RT_USING_I2C'
]):
src
+=
[
'drv_i2c.c'
]
if
GetDepend
([
'RT_USING_ILI9341_LCD'
]):
src
+=
[
'drv_lcd.c'
]
if
GetDepend
([
'RT_USING_STMPE811_TOUCH'
]):
src
+=
[
'drv_touch.c'
]
CPPPATH
=
[
cwd
]
group
=
DefineGroup
(
'Drivers'
,
src
,
depend
=
[
''
],
CPPPATH
=
CPPPATH
)
...
...
bsp/stm32f429-disco/drivers/drv_touch.c
浏览文件 @
f9a809fd
...
...
@@ -68,7 +68,7 @@ static int32_t touch_read (uint8_t reg, uint8_t *val)
- \b 0: function succeeded
- \b -1: function failed
*/
static
int32_t
touch_write
(
uint8_t
reg
,
uint8_t
val
)
static
int32_t
touch_write
(
uint8_t
reg
,
uint8_t
val
)
{
struct
rt_i2c_msg
msgs
;
rt_uint8_t
buf
[
2
]
=
{
reg
,
val
};
...
...
@@ -99,7 +99,7 @@ static int32_t touch_write (uint8_t reg, uint8_t val)
*/
static
rt_err_t
stmpe811_touch_init
(
rt_device_t
dev
)
{
stmpe811_i2c_bus
=
rt_i2c_bus_device_find
(
STMPE811_I2CBUS_NAME
);
stmpe811_i2c_bus
=
rt_i2c_bus_device_find
(
"touch"
);
// ptrI2C->Initialize (NULL);
// ptrI2C->PowerControl(ARM_POWER_FULL);
...
...
@@ -148,7 +148,7 @@ int32_t touch_uninitialize (void) {
- \b 0: function succeeded
- \b -1: function failed
*/
int32_t
touch_get_state
(
struct
touch_state
*
pS
tate
)
int32_t
touch_get_state
(
struct
touch_state
*
s
tate
)
{
uint8_t
val
;
uint8_t
num
;
...
...
@@ -159,9 +159,9 @@ int32_t touch_get_state(struct touch_state *pState)
/* Read touch status */
res
=
touch_read
(
STMPE811_TSC_CTRL
,
&
val
);
if
(
res
<
0
)
return
-
1
;
pS
tate
->
pressed
=
(
val
&
(
1
<<
7
))
?
1
:
0
;
s
tate
->
pressed
=
(
val
&
(
1
<<
7
))
?
1
:
0
;
if
(
pS
tate
->
pressed
)
if
(
s
tate
->
pressed
)
{
val
=
STMPE811_TSC_DATA
;
...
...
@@ -187,8 +187,8 @@ int32_t touch_get_state(struct touch_state *pState)
//ptrI2C->MasterReceive (TSC_I2C_ADDR, xyz, 4, false);
//while (ptrI2C->GetStatus().busy);
}
pS
tate
->
x
=
(
int16_t
)((
xyz
[
0
]
<<
4
)
|
((
xyz
[
1
]
&
0xF0
)
>>
4
));
pS
tate
->
y
=
(
int16_t
)
(
xyz
[
2
]
|
((
xyz
[
1
]
&
0x0F
)
<<
8
));
s
tate
->
x
=
(
int16_t
)((
xyz
[
0
]
<<
4
)
|
((
xyz
[
1
]
&
0xF0
)
>>
4
));
s
tate
->
y
=
(
int16_t
)
(
xyz
[
2
]
|
((
xyz
[
1
]
&
0x0F
)
<<
8
));
}
else
{
...
...
bsp/stm32f429-disco/drivers/drv_touch.h
浏览文件 @
f9a809fd
...
...
@@ -78,4 +78,6 @@ struct touch_state {
uint8_t
padding
;
};
int32_t
touch_get_state
(
struct
touch_state
*
state
);
#endif
/* __DRV_TOUCH_H__ */
bsp/stm32f429-disco/project.uvprojx
浏览文件 @
f9a809fd
此差异已折叠。
点击以展开。
bsp/stm32f429-disco/readme.md
浏览文件 @
f9a809fd
...
...
@@ -20,6 +20,8 @@ STM32F429I-DISCOVERY 开发板使用高性能 MCU STM32F429,可以用于实现
|LED| 6 个 |
|按键| 2 个 |
本 BSP 已测试支持 RT-Thread GUIEngine 和 Littlevgl,可以使用 env 工具安装相应的 Package。
## 2. 编译说明
STM32F429-DISCO 板级包支持 MDK4﹑MDK5﹑IAR 开发环境和 GCC 编译器,以下是具体版本信息:
...
...
@@ -61,13 +63,16 @@ finsh />
| 驱动 | 支持情况 | 备注 |
| ------ | ---- | :------: |
| USART | 支持 | USART1/2/3 |
| SPI | 支持 | |
|
LCD | 支持 | 支持 FrameBuffer 模式 LCD 显示
|
| SPI | 支持 |
SPI5
|
|
IIC | 支持 | IIC3
|
| SDRAM | 支持 | |
| LCD | 支持 | 支持 FrameBuffer 模式 LCD 显示 |
| 触摸屏 | 支持 | IIC 接口 STMPE811 |
| USB OTG Host| 即将支持 | 预计 2018/11 |
| USB OTG Device| 未支持 | |
| GPIO | 未支持 | |
| IIC | 未支持 | |
| L3GD20 | 未支持 | |
| USB OTG | 未支持 | |
## 5. 联系人信息
...
...
bsp/stm32f429-disco/rtconfig.h
浏览文件 @
f9a809fd
...
...
@@ -75,13 +75,20 @@
#define RT_USING_DEVICE_IPC
#define RT_PIPE_BUFSZ 512
#define RT_USING_SERIAL
#define RT_USING_I2C
#define RT_USING_I2C_BITOPS
#define RT_USING_PIN
/* Using WiFi */
/* Using USB */
/* POSIX layer and C standard library */
#define RT_USING_LIBC
#define RT_USING_POSIX
/* Network */
...
...
@@ -147,7 +154,10 @@
/* example package: hello */
#define RT_USING_ILI9341_LCD
#define RT_USING_STMPE811_TOUCH
#define RT_USING_EXT_SDRAM
#define RT_USING_UART1
#define RT_USING_I2C3
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录