Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
dcf175b2
R
rt-thread
项目概览
BaiXuePrincess
/
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看板
未验证
提交
dcf175b2
编写于
11月 13, 2017
作者:
B
Bernard Xiong
提交者:
GitHub
11月 13, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #991 from enkiller/x1000_dev_update
[BSP] Update X1000 bsp.
上级
338835f9
029feac5
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
100 addition
and
93 deletion
+100
-93
bsp/x1000/.config
bsp/x1000/.config
+18
-12
bsp/x1000/SConstruct
bsp/x1000/SConstruct
+5
-5
bsp/x1000/applications/rtgui_demo.c
bsp/x1000/applications/rtgui_demo.c
+34
-34
bsp/x1000/drivers/Kconfig
bsp/x1000/drivers/Kconfig
+17
-15
bsp/x1000/rtconfig.h
bsp/x1000/rtconfig.h
+19
-12
bsp/x1000/rtconfig.py
bsp/x1000/rtconfig.py
+2
-13
components/drivers/audio/audio_pipe.h
components/drivers/audio/audio_pipe.h
+5
-2
未找到文件。
bsp/x1000/.config
浏览文件 @
dcf175b2
...
...
@@ -7,15 +7,18 @@
# RT-Thread Kernel
#
CONFIG_RT_NAME_MAX
=
8
CONFIG_RT_ALIGN_SIZE
=
4
CONFIG_RT_ALIGN_SIZE
=
8
# CONFIG_RT_THREAD_PRIORITY_8 is not set
CONFIG_RT_THREAD_PRIORITY_32
=
y
# CONFIG_RT_THREAD_PRIORITY_256 is not set
CONFIG_RT_THREAD_PRIORITY_MAX
=
32
CONFIG_RT_TICK_PER_SECOND
=
100
CONFIG_RT_TICK_PER_SECOND
=
100
0
CONFIG_RT_DEBUG
=
y
CONFIG_RT_USING_OVERFLOW_CHECK
=
y
CONFIG_RT_DEBUG_INIT
=
0
CONFIG_RT_DEBUG_THREAD
=
0
CONFIG_RT_USING_HOOK
=
y
CONFIG_IDLE_THREAD_STACK_SIZE
=
256
CONFIG_IDLE_THREAD_STACK_SIZE
=
512
# CONFIG_RT_USING_TIMER_SOFT is not set
#
...
...
@@ -33,9 +36,10 @@ CONFIG_RT_USING_MESSAGEQUEUE=y
#
CONFIG_RT_USING_MEMPOOL
=
y
# CONFIG_RT_USING_MEMHEAP is not set
CONFIG_RT_USING_HEAP
=
y
# CONFIG_RT_USING_NOHEAP is not set
CONFIG_RT_USING_SMALL_MEM
=
y
# CONFIG_RT_USING_SLAB is not set
CONFIG_RT_USING_HEAP
=
y
#
# Kernel Device Object
...
...
@@ -44,7 +48,7 @@ CONFIG_RT_USING_DEVICE=y
# CONFIG_RT_USING_INTERRUPT_INFO is not set
CONFIG_RT_USING_CONSOLE
=
y
CONFIG_RT_CONSOLEBUF_SIZE
=
128
CONFIG_RT_CONSOLE_DEVICE_NAME
=
"uart"
CONFIG_RT_CONSOLE_DEVICE_NAME
=
"uart
2
"
# CONFIG_RT_USING_MODULE is not set
CONFIG_ARCH_MIPS
=
y
CONFIG_ARCH_MIPS_XBURST
=
y
...
...
@@ -80,7 +84,7 @@ CONFIG_FINSH_USING_MSH_DEFAULT=y
#
CONFIG_RT_USING_DFS
=
y
CONFIG_DFS_USING_WORKDIR
=
y
CONFIG_DFS_FILESYSTEMS_MAX
=
2
CONFIG_DFS_FILESYSTEMS_MAX
=
4
CONFIG_DFS_FD_MAX
=
4
CONFIG_RT_USING_DFS_ELMFAT
=
y
...
...
@@ -89,14 +93,14 @@ CONFIG_RT_USING_DFS_ELMFAT=y
#
CONFIG_RT_DFS_ELM_CODE_PAGE
=
437
CONFIG_RT_DFS_ELM_WORD_ACCESS
=
y
CONFIG_RT_DFS_ELM_USE_LFN_0
=
y
# CONFIG_RT_DFS_ELM_USE_LFN_0 is not set
# CONFIG_RT_DFS_ELM_USE_LFN_1 is not set
# CONFIG_RT_DFS_ELM_USE_LFN_2 is not set
# CONFIG_RT_DFS_ELM_USE_LFN_3 is not set
CONFIG_RT_DFS_ELM_USE_LFN
=
0
CONFIG_RT_DFS_ELM_USE_LFN_3
=
y
CONFIG_RT_DFS_ELM_USE_LFN
=
3
CONFIG_RT_DFS_ELM_MAX_LFN
=
255
CONFIG_RT_DFS_ELM_DRIVES
=
2
CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE
=
512
CONFIG_RT_DFS_ELM_DRIVES
=
4
CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE
=
4096
# CONFIG_RT_DFS_ELM_USE_ERASE is not set
CONFIG_RT_DFS_ELM_REENTRANT
=
y
CONFIG_RT_USING_DFS_DEVFS
=
y
...
...
@@ -114,7 +118,7 @@ CONFIG_RT_USING_SERIAL=y
# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_I2C is not set
CONFIG_RT_USING_PIN
=
y
# CONFIG_RT_USING_MTD_NOR is not set
CONFIG_RT_USING_MTD_NOR
=
y
# CONFIG_RT_USING_MTD_NAND is not set
# CONFIG_RT_USING_RTC is not set
# CONFIG_RT_USING_SDIO is not set
...
...
@@ -194,12 +198,14 @@ CONFIG_RT_USING_POSIX=y
#
# multimedia packages
#
# CONFIG_PKG_USING_FASTLZ is not set
#
# tools packages
#
# CONFIG_PKG_USING_CMBACKTRACE is not set
# CONFIG_PKG_USING_EASYLOGGER is not set
# CONFIG_PKG_USING_SYSTEMVIEW is not set
#
# miscellaneous packages
...
...
bsp/x1000/SConstruct
浏览文件 @
dcf175b2
...
...
@@ -29,11 +29,11 @@ Export('rtconfig')
# prepare building environment
objs
=
PrepareBuilding
(
env
,
RTT_ROOT
,
has_libcpu
=
False
)
if
not
GetDepend
(
'RT_USING_HARD_FLOAT'
):
env
[
'CCFLAGS'
]
=
env
[
'CCFLAGS'
].
replace
(
'-m
hard-float'
,
'-msoft
-float'
)
env
[
'ASFLAGS'
]
=
env
[
'ASFLAGS'
].
replace
(
'-m
hard-float'
,
'-msoft
-float'
)
env
[
'CXXFLAGS'
]
=
env
[
'CXXFLAGS'
].
replace
(
'-m
hard-float'
,
'-msoft
-float'
)
env
[
'LINKFLAGS'
]
=
env
[
'LINKFLAGS'
].
replace
(
'-m
hard-float'
,
'-msoft
-float'
)
if
GetDepend
(
'RT_USING_HARD_FLOAT'
):
env
[
'CCFLAGS'
]
=
env
[
'CCFLAGS'
].
replace
(
'-m
soft-float'
,
'-mhard
-float'
)
env
[
'ASFLAGS'
]
=
env
[
'ASFLAGS'
].
replace
(
'-m
soft-float'
,
'-mhard
-float'
)
env
[
'CXXFLAGS'
]
=
env
[
'CXXFLAGS'
].
replace
(
'-m
soft-float'
,
'-mhard
-float'
)
env
[
'LINKFLAGS'
]
=
env
[
'LINKFLAGS'
].
replace
(
'-m
soft-float'
,
'-mhard
-float'
)
# make a building
DoBuilding
(
TARGET
,
objs
)
bsp/x1000/applications/rtgui_demo.c
浏览文件 @
dcf175b2
...
...
@@ -45,42 +45,42 @@ struct rtgui_win *main_win;
rt_bool_t
dc_event_handler
(
struct
rtgui_object
*
object
,
rtgui_event_t
*
event
);
static
void
rt_gui_demo_entry
(
void
*
parameter
)
{
{
struct
rtgui_app
*
app
;
DEBUG_PRINTF
(
"gui demo entry
\n
"
);
/* create gui app */
/* create gui app */
app
=
rtgui_app_create
(
"gui_demo"
);
if
(
app
==
RT_NULL
)
{
DEBUG_PRINTF
(
"rtgui_app_create faild
\n
"
);
return
;
return
;
}
/* create main window */
main_win
=
rtgui_mainwin_create
(
RT_NULL
,
"UiWindow"
,
RTGUI_WIN_STYLE_NO_TITLE
|
RTGUI_WIN_STYLE_NO_BORDER
);
/* create main window */
main_win
=
rtgui_mainwin_create
(
RT_NULL
,
"UiWindow"
,
RTGUI_WIN_STYLE_NO_TITLE
|
RTGUI_WIN_STYLE_NO_BORDER
);
if
(
main_win
==
RT_NULL
)
{
DEBUG_PRINTF
(
"main_win is null
\n
"
);
rtgui_app_destroy
(
app
);
return
;
}
rtgui_object_set_event_handler
(
RTGUI_OBJECT
(
main_win
),
dc_event_handler
);
rtgui_object_set_event_handler
(
RTGUI_OBJECT
(
main_win
),
dc_event_handler
);
DEBUG_PRINTF
(
"rtgui_win_show
\n
"
);
rtgui_win_show
(
main_win
,
RT_FALSE
);
rtgui_win_show
(
main_win
,
RT_FALSE
);
DEBUG_PRINTF
(
"rtgui_app_run
\n
"
);
rtgui_app_run
(
app
);
rtgui_app_run
(
app
);
DEBUG_PRINTF
(
"rtgui_win_destroy
\n
"
);
rtgui_win_destroy
(
main_win
);
rtgui_win_destroy
(
main_win
);
DEBUG_PRINTF
(
"rtgui_app_destroy
\n
"
);
rtgui_app_destroy
(
app
);
rtgui_app_destroy
(
app
);
}
rt_bool_t
dc_event_handler
(
struct
rtgui_object
*
object
,
rtgui_event_t
*
event
)
...
...
@@ -91,31 +91,31 @@ rt_bool_t dc_event_handler(struct rtgui_object *object, rtgui_event_t *event)
{
struct
rtgui_dc
*
dc
;
rtgui_rect_t
rect
;
rt_kprintf
(
"
\r\n
RTGUI_EVENT_PAINT
\r\n
"
);
rtgui_win_event_handler
(
RTGUI_OBJECT
(
widget
),
event
);
DEBUG_PRINTF
(
"
\r\n
RTGUI_EVENT_PAINT
\r\n
"
);
rtgui_win_event_handler
(
RTGUI_OBJECT
(
widget
),
event
);
rtgui_widget_get_rect
(
widget
,
&
rect
);
DEBUG_PRINTF
(
"widget react x1: %d, y1: %d, x2: %d, y2: %d
\r\n
"
,
rect
.
x1
,
rect
.
y1
,
rect
.
x2
,
rect
.
y2
);
dc
=
rtgui_dc_begin_drawing
(
widget
);
if
(
dc
==
RT_NULL
)
{
DEBUG_PRINTF
(
"
\r\n
dc is null
\r\n
"
);
return
RT_FALSE
;
}
dc
=
rtgui_dc_begin_drawing
(
widget
);
if
(
dc
==
RT_NULL
)
{
DEBUG_PRINTF
(
"
\r\n
dc is null
\r\n
"
);
return
RT_FALSE
;
}
rtgui_dc_draw_line
(
dc
,
rect
.
x1
,
rect
.
y1
,
rect
.
x2
,
rect
.
y2
);
rtgui_dc_draw_line
(
dc
,
rect
.
x1
,
rect
.
y2
,
rect
.
x2
,
rect
.
y1
);
rtgui_dc_draw_line
(
dc
,
rect
.
x1
,
rect
.
y1
,
rect
.
x2
,
rect
.
y2
);
rtgui_dc_draw_line
(
dc
,
rect
.
x1
,
rect
.
y2
,
rect
.
x2
,
rect
.
y1
);
rect
.
x1
+=
(
rect
.
x2
-
rect
.
x1
)
/
2
;
rect
.
y1
+=
(
rect
.
y2
-
rect
.
y1
)
/
2
;
rtgui_dc_draw_text_stroke
(
dc
,
__DATE__
"--"
__TIME__
,
&
rect
,
HIGH_LIGHT
,
BLUE
);
rtgui_dc_end_drawing
(
dc
,
RT_TRUE
);
rtgui_dc_end_drawing
(
dc
,
RT_TRUE
);
}
return
RT_FALSE
;
return
RT_FALSE
;
}
int
rt_gui_demo_init
(
void
)
...
...
@@ -125,7 +125,7 @@ int rt_gui_demo_init(void)
rt_err_t
err
;
device
=
rt_device_find
(
"lcd"
);
if
(
device
==
RT_NULL
)
if
(
device
==
RT_NULL
)
{
rt_kprintf
(
"Not found LCD driver
\n
"
);
return
RT_ERROR
;
...
...
bsp/x1000/drivers/Kconfig
浏览文件 @
dcf175b2
...
...
@@ -46,6 +46,20 @@ if RT_USING_SDIO
default 2048
endif
if RT_USING_I2C
config RT_USING_I2C0
bool "Using iic0 bus"
default y
config RT_USING_I2C1
bool "Using iic1 bus"
default n
config RT_USING_I2C2
bool "Using iic2 bus"
default n
endif
if RT_USING_GUIENGINE
config RT_USING_SLCD
bool "Using LCD display"
...
...
@@ -70,9 +84,9 @@ if RT_USING_GUIENGINE
endchoice
endif
if RT_USING_I2C
if RT_USING_I2C
0
config RT_USING_TOUCH
bool "Using touch"
bool "Using
LCD
touch"
default y
if RT_USING_TOUCH
...
...
@@ -89,25 +103,13 @@ if RT_USING_GUIENGINE
config RT_TOUCH_THREAD_PRIORITY
int "Set touch thread priority"
range 2 3
2
range 2 3
0
default 10
endif
endif
endif
if RT_USING_I2C
config RT_USING_I2C0
bool "Using iic0 bus"
default y
config RT_USING_I2C1
bool "Using iic1 bus"
default n
config RT_USING_I2C2
bool "Using iic2 bus"
default n
endif
config RT_USING_ICODEC
default n
...
...
bsp/x1000/rtconfig.h
浏览文件 @
dcf175b2
...
...
@@ -7,15 +7,18 @@
/* RT-Thread Kernel */
#define RT_NAME_MAX 8
#define RT_ALIGN_SIZE 4
#define RT_ALIGN_SIZE 8
/* RT_THREAD_PRIORITY_8 is not set */
#define RT_THREAD_PRIORITY_32
/* RT_THREAD_PRIORITY_256 is not set */
#define RT_THREAD_PRIORITY_MAX 32
#define RT_TICK_PER_SECOND 100
#define RT_TICK_PER_SECOND 100
0
#define RT_DEBUG
#define RT_USING_OVERFLOW_CHECK
#define RT_DEBUG_INIT 0
#define RT_DEBUG_THREAD 0
#define RT_USING_HOOK
#define IDLE_THREAD_STACK_SIZE
256
#define IDLE_THREAD_STACK_SIZE
512
/* RT_USING_TIMER_SOFT is not set */
/* Inter-Thread communication */
...
...
@@ -31,9 +34,10 @@
#define RT_USING_MEMPOOL
/* RT_USING_MEMHEAP is not set */
#define RT_USING_HEAP
/* RT_USING_NOHEAP is not set */
#define RT_USING_SMALL_MEM
/* RT_USING_SLAB is not set */
#define RT_USING_HEAP
/* Kernel Device Object */
...
...
@@ -41,7 +45,7 @@
/* RT_USING_INTERRUPT_INFO is not set */
#define RT_USING_CONSOLE
#define RT_CONSOLEBUF_SIZE 128
#define RT_CONSOLE_DEVICE_NAME "uart"
#define RT_CONSOLE_DEVICE_NAME "uart
2
"
/* RT_USING_MODULE is not set */
#define ARCH_MIPS
#define ARCH_MIPS_XBURST
...
...
@@ -73,7 +77,7 @@
#define RT_USING_DFS
#define DFS_USING_WORKDIR
#define DFS_FILESYSTEMS_MAX
2
#define DFS_FILESYSTEMS_MAX
4
#define DFS_FD_MAX 4
#define RT_USING_DFS_ELMFAT
...
...
@@ -81,14 +85,14 @@
#define RT_DFS_ELM_CODE_PAGE 437
#define RT_DFS_ELM_WORD_ACCESS
#define RT_DFS_ELM_USE_LFN_0
/* RT_DFS_ELM_USE_LFN_0 is not set */
/* RT_DFS_ELM_USE_LFN_1 is not set */
/* RT_DFS_ELM_USE_LFN_2 is not set */
/* RT_DFS_ELM_USE_LFN_3 is not set */
#define RT_DFS_ELM_USE_LFN
0
#define RT_DFS_ELM_USE_LFN_3
#define RT_DFS_ELM_USE_LFN
3
#define RT_DFS_ELM_MAX_LFN 255
#define RT_DFS_ELM_DRIVES
2
#define RT_DFS_ELM_MAX_SECTOR_SIZE
512
#define RT_DFS_ELM_DRIVES
4
#define RT_DFS_ELM_MAX_SECTOR_SIZE
4096
/* RT_DFS_ELM_USE_ERASE is not set */
#define RT_DFS_ELM_REENTRANT
#define RT_USING_DFS_DEVFS
...
...
@@ -105,7 +109,7 @@
/* RT_USING_HWTIMER is not set */
/* RT_USING_I2C is not set */
#define RT_USING_PIN
/* RT_USING_MTD_NOR is not set */
#define RT_USING_MTD_NOR
/* RT_USING_MTD_NAND is not set */
/* RT_USING_RTC is not set */
/* RT_USING_SDIO is not set */
...
...
@@ -170,10 +174,13 @@
/* multimedia packages */
/* PKG_USING_FASTLZ is not set */
/* tools packages */
/* PKG_USING_CMBACKTRACE is not set */
/* PKG_USING_EASYLOGGER is not set */
/* PKG_USING_SYSTEMVIEW is not set */
/* miscellaneous packages */
...
...
bsp/x1000/rtconfig.py
浏览文件 @
dcf175b2
...
...
@@ -18,13 +18,8 @@ else:
if
os
.
getenv
(
'RTT_EXEC_PATH'
):
EXEC_PATH
=
os
.
getenv
(
'RTT_EXEC_PATH'
)
# BUILD = 'debug'
# BUILD = 'release'
BUILD
=
'release_O3'
# FLOAT = 'soft'
FLOAT
=
'hard'
BUILD
=
'release'
if
PLATFORM
==
'gcc'
:
# toolchains
...
...
@@ -40,11 +35,7 @@ if PLATFORM == 'gcc':
OBJCPY
=
PREFIX
+
'objcopy'
STRIP
=
PREFIX
+
'strip'
if
FLOAT
==
'soft'
:
DEVICE
=
' -mips32r2 -msoft-float -mfp32'
else
:
DEVICE
=
' -mips32r2 -mhard-float -mfp32'
DEVICE
=
' -mips32r2 -msoft-float -mfp32'
CFLAGS
=
DEVICE
+
' -EL -G0 -mno-abicalls -fno-pic -fno-builtin -fno-exceptions -ffunction-sections -fno-omit-frame-pointer'
AFLAGS
=
' -c'
+
DEVICE
+
' -EL -x assembler-with-cpp'
LFLAGS
=
DEVICE
+
' -EL -Wl,--gc-sections,-Map=rtthread_x1000.map,-cref,-u,Reset_Handler -T x1000_ram.lds'
...
...
@@ -54,8 +45,6 @@ if PLATFORM == 'gcc':
if
BUILD
==
'debug'
:
CFLAGS
+=
' -O0 -gdwarf-2'
AFLAGS
+=
' -gdwarf-2'
elif
BUILD
==
'release_O3'
:
CFLAGS
+=
' -O3'
else
:
CFLAGS
+=
' -O2'
...
...
components/drivers/audio/audio_pipe.h
浏览文件 @
dcf175b2
...
...
@@ -59,7 +59,10 @@ rt_err_t rt_audio_pipe_init(struct rt_audio_pipe *pipe,
enum
rt_audio_pipe_flag
flag
,
rt_uint8_t
*
buf
,
rt_size_t
size
);
rt_err_t
rt_audio_pipe_detach
(
struct
rt_audio_pipe
*
pipe
);
#ifdef RT_USING_HEAP
rt_err_t
rt_audio_pipe_create
(
const
char
*
name
,
enum
rt_audio_pipe_flag
flag
,
rt_size_t
size
);
void
rt_audio_pipe_destroy
(
struct
rt_audio_pipe
*
pipe
);
#endif
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录