Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
逆着光、寻觅
rt-thread
提交
2e71b8a7
R
rt-thread
项目概览
逆着光、寻觅
/
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,发现更多精彩内容 >>
未验证
提交
2e71b8a7
编写于
2月 11, 2018
作者:
B
Bernard Xiong
提交者:
GitHub
2月 11, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1221 from BernardXiong/master
merge O_CREAT issue
上级
915ba043
43cc0174
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
13 addition
and
12 deletion
+13
-12
components/cplusplus/Thread.cpp
components/cplusplus/Thread.cpp
+2
-2
components/dfs/filesystems/devfs/devfs.c
components/dfs/filesystems/devfs/devfs.c
+1
-3
components/libc/compilers/dlib/libc.c
components/libc/compilers/dlib/libc.c
+3
-2
components/libc/compilers/newlib/stdio.c
components/libc/compilers/newlib/stdio.c
+3
-1
include/rtdbg.h
include/rtdbg.h
+4
-4
未找到文件。
components/cplusplus/Thread.cpp
浏览文件 @
2e71b8a7
...
...
@@ -6,7 +6,7 @@ Thread::Thread(rt_uint32_t stack_size,
rt_uint8_t
priority
,
rt_uint32_t
tick
,
const
char
*
name
)
:
_entry
(
RT_NULL
),
started
(
false
)
:
_entry
(
RT_NULL
),
_param
(
RT_NULL
),
started
(
false
)
{
rt_event_init
(
&
_event
,
name
,
0
);
...
...
@@ -24,7 +24,7 @@ Thread::Thread(void (*entry)(void *p),
rt_uint8_t
priority
,
rt_uint32_t
tick
,
const
char
*
name
)
:
_entry
(
RT_NULL
),
started
(
false
),
_param
(
p
)
:
_entry
(
RT_NULL
),
_param
(
p
),
started
(
false
)
{
rt_event_init
(
&
_event
,
name
,
0
);
...
...
components/dfs/filesystems/devfs/devfs.c
浏览文件 @
2e71b8a7
...
...
@@ -19,6 +19,7 @@
*
* Change Logs:
* Date Author Notes
* 2018-02-11 Bernard Ignore O_CREAT flag in open.
*/
#include <rtthread.h>
...
...
@@ -137,9 +138,6 @@ int dfs_device_fs_open(struct dfs_fd *file)
rt_err_t
result
;
rt_device_t
device
;
if
(
file
->
flags
&
O_CREAT
)
return
-
EINVAL
;
/* open root directory */
if
((
file
->
path
[
0
]
==
'/'
)
&&
(
file
->
path
[
1
]
==
'\0'
)
&&
(
file
->
flags
&
O_DIRECTORY
))
...
...
components/libc/compilers/dlib/libc.c
浏览文件 @
2e71b8a7
...
...
@@ -36,7 +36,7 @@
int
libc_system_init
(
void
)
{
#if defined(RT_USING_DFS) & defined(RT_USING_DFS_DEVFS)
#if defined(RT_USING_DFS) &
&
defined(RT_USING_DFS_DEVFS)
rt_device_t
dev_console
;
dev_console
=
rt_console_get_device
();
...
...
@@ -50,10 +50,11 @@ int libc_system_init(void)
}
#endif
#if defined
RT_USING_PTHREADS && !defined RT_USING_COMPONENTS_INIT
#if defined
(RT_USING_PTHREADS) && !defined (RT_USING_COMPONENTS_INIT)
pthread_system_init
();
#endif
return
0
;
}
INIT_COMPONENT_EXPORT
(
libc_system_init
);
components/libc/compilers/newlib/stdio.c
浏览文件 @
2e71b8a7
...
...
@@ -81,7 +81,9 @@ int libc_stdio_set_console(const char* device_name, int mode)
_GLOBAL_REENT
->
__sdidinit
=
1
;
}
return
fileno
(
std_console
);
if
(
std_console
)
return
fileno
(
std_console
);
return
-
1
;
}
int
libc_stdio_get_console
(
void
)
{
...
...
include/rtdbg.h
浏览文件 @
2e71b8a7
...
...
@@ -32,15 +32,15 @@
* header file.
*
* #define DBG_SECTION_NAME "[ MOD]"
* #define D
EBUG_ENABLE
// enable debug macro
* #define D
EBUG_LEVEL
DBG_INFO
* #define D
BG_ENABLE
// enable debug macro
* #define D
BG_LEVEL
DBG_INFO
* #include <rtdbg.h> // must after of DEBUG_ENABLE or some other options
*
* Then in your C/C++ file, you can use dbg_log macro to print out logs:
* dbg_log(DBG_INFO, "this is a log!\n");
*
* Or if you want to use different color for different kinds log, you can
* #define D
EBU
G_COLOR
* #define D
B
G_COLOR
*/
#ifndef RT_DBG_H__
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录