Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
a124e7bd
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a124e7bd
编写于
7月 24, 2013
作者:
B
bernard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add initialization debug code
上级
b96b3561
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
53 addition
and
9 deletion
+53
-9
components/dfs/filesystems/elmfat/option/ccfile.c
components/dfs/filesystems/elmfat/option/ccfile.c
+2
-1
components/dfs/src/dfs_fs.c
components/dfs/src/dfs_fs.c
+2
-2
components/drivers/i2c/i2c_core.c
components/drivers/i2c/i2c_core.c
+2
-2
components/drivers/include/drivers/i2c.h
components/drivers/include/drivers/i2c.h
+1
-1
components/drivers/usb/usbhost/core/usbhost.c
components/drivers/usb/usbhost/core/usbhost.c
+4
-1
components/init/components.c
components/init/components.c
+24
-0
include/rtdebug.h
include/rtdebug.h
+4
-0
include/rtdef.h
include/rtdef.h
+14
-2
未找到文件。
components/dfs/filesystems/elmfat/option/ccfile.c
浏览文件 @
a124e7bd
...
...
@@ -13,7 +13,7 @@
#ifdef RT_DFS_ELM_USE_LFN
static
int
gbk2uni_fd
=
-
1
;
static
int
uni2gbk_fd
=
-
1
;
void
ff_convert_init
()
int
ff_convert_init
()
{
gbk2uni_fd
=
open
(
GBK2UNI_FILE
,
O_RDONLY
,
0
);
if
(
gbk2uni_fd
<
0
)
...
...
@@ -22,6 +22,7 @@ void ff_convert_init()
uni2gbk_fd
=
open
(
UNI2GBK_FILE
,
O_RDONLY
,
0
);
if
(
uni2gbk_fd
<
0
)
rt_kprintf
(
"Unable to open Unicode to GBK look up table.
\r\n
"
);
return
0
;
}
INIT_APP_EXPORT
(
ff_convert_init
);
...
...
components/dfs/src/dfs_fs.c
浏览文件 @
a124e7bd
...
...
@@ -500,12 +500,12 @@ int dfs_statfs(const char *path, struct statfs *buffer)
#ifdef RT_USING_DFS_MNTTABLE
int
dfs_mount_table
(
void
)
{
int
index
;
int
index
=
0
;
while
(
1
)
{
if
(
mount_table
[
index
].
path
==
RT_NULL
)
break
;
if
(
dfs_mount
(
mount_table
[
index
].
device_name
,
mount_table
[
index
].
path
,
mount_table
[
index
].
filesystemtype
,
...
...
components/drivers/i2c/i2c_core.c
浏览文件 @
a124e7bd
...
...
@@ -134,8 +134,8 @@ rt_size_t rt_i2c_master_recv(struct rt_i2c_bus_device *bus,
return
(
ret
>
0
)
?
count
:
ret
;
}
rt_err_
t
rt_i2c_core_init
(
void
)
in
t
rt_i2c_core_init
(
void
)
{
return
rt_mutex_init
(
&
i2c_core_lock
,
"i2c_core_lock"
,
RT_IPC_FLAG_FIFO
);
}
INIT_COMPONENT_EXPORT
(
rt_i2c_core_init
);
components/drivers/include/drivers/i2c.h
浏览文件 @
a124e7bd
...
...
@@ -96,7 +96,7 @@ rt_size_t rt_i2c_master_recv(struct rt_i2c_bus_device *bus,
rt_uint16_t
flags
,
rt_uint8_t
*
buf
,
rt_uint32_t
count
);
rt_err_
t
rt_i2c_core_init
(
void
);
in
t
rt_i2c_core_init
(
void
);
#ifdef __cplusplus
}
...
...
components/drivers/usb/usbhost/core/usbhost.c
浏览文件 @
a124e7bd
...
...
@@ -34,7 +34,7 @@
*
* @return none.
*/
void
rt_usb_host_init
(
void
)
int
rt_usb_host_init
(
void
)
{
ucd_t
drv
;
#ifdef RT_USB_CLASS_HID
...
...
@@ -80,5 +80,8 @@ void rt_usb_host_init(void)
/* register hub class driver */
drv
=
rt_usb_class_driver_hub
();
rt_usb_class_driver_register
(
drv
);
return
0
;
}
INIT_COMPONENT_EXPORT
(
rt_usb_host_init
);
components/init/components.c
浏览文件 @
a124e7bd
...
...
@@ -52,6 +52,16 @@ INIT_EXPORT(rti_end,"7");
void
rt_components_board_init
(
void
)
{
#ifndef _MSC_VER
#if RT_DEBUG_INIT
int
result
;
const
struct
rt_init_desc
*
desc
;
for
(
desc
=
&
__rt_init_desc_rti_start
;
desc
<
&
__rt_init_desc_rti_board_end
;
desc
++
)
{
rt_kprintf
(
"initialize %s"
,
desc
->
fn_name
);
result
=
desc
->
fn
();
rt_kprintf
(
":%d done
\n
"
,
result
);
}
#else
const
init_fn_t
*
fn_ptr
;
for
(
fn_ptr
=
&
__rt_init_rti_start
;
fn_ptr
<
&
__rt_init_rti_board_end
;
fn_ptr
++
)
...
...
@@ -59,6 +69,7 @@ void rt_components_board_init(void)
(
*
fn_ptr
)();
}
#endif
#endif
}
/**
...
...
@@ -67,12 +78,25 @@ void rt_components_board_init(void)
void
rt_components_init
(
void
)
{
#ifndef _MSC_VER
#if RT_DEBUG_INIT
int
result
;
const
struct
rt_init_desc
*
desc
;
rt_kprintf
(
"do components intialization.
\n
"
);
for
(
desc
=
&
__rt_init_desc_rti_board_end
;
desc
<
&
__rt_init_desc_rti_end
;
desc
++
)
{
rt_kprintf
(
"initialize %s"
,
desc
->
fn_name
);
result
=
desc
->
fn
();
rt_kprintf
(
":%d done
\n
"
,
result
);
}
#else
const
init_fn_t
*
fn_ptr
;
for
(
fn_ptr
=
&
__rt_init_rti_board_end
;
fn_ptr
<
&
__rt_init_rti_end
;
fn_ptr
++
)
{
(
*
fn_ptr
)();
}
#endif
#else
#ifdef RT_USING_MODULE
rt_system_module_init
();
...
...
include/rtdebug.h
浏览文件 @
a124e7bd
...
...
@@ -63,6 +63,10 @@
#define RT_DEBUG_IPC 0
#endif
#ifndef RT_DEBUG_INIT
#define RT_DEBUG_INIT 0
#endif
/* Turn on this to enable context check */
#ifndef RT_DEBUG_CONTEXT_CHECK
#define RT_DEBUG_CONTEXT_CHECK 1
...
...
include/rtdef.h
浏览文件 @
a124e7bd
...
...
@@ -181,8 +181,20 @@ typedef int (*init_fn_t)(void);
#ifdef _MSC_VER
/* we do not support MS VC++ compiler */
#define INIT_EXPORT(fn, level)
#else
#define INIT_EXPORT(fn, level) \
const init_fn_t __rt_init_##fn SECTION(".rti_fn."level) = fn
#if RT_DEBUG_INIT
struct
rt_init_desc
{
const
char
*
fn_name
;
const
init_fn_t
fn
;
};
#define INIT_EXPORT(fn, level) \
const char __rti_##fn##_name[] = #fn; \
const struct rt_init_desc __rt_init_desc_##fn SECTION(".rti_fn."level) = \
{ __rti_##fn##_name, fn};
#else
#define INIT_EXPORT(fn, level) \
const init_fn_t __rt_init_##fn SECTION(".rti_fn."level) = fn
#endif
#endif
#else
#define INIT_EXPORT(fn, level)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录