Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaobo07
rt-thread
提交
838d1087
R
rt-thread
项目概览
Xiaobo07
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
838d1087
编写于
11月 30, 2021
作者:
G
guo
提交者:
GitHub
11月 30, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5311 from mysterywolf/PSE
[PSE分支] 增加RT_USING_POSIX_FS
上级
4e9744c0
7973ede5
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
46 addition
and
45 deletion
+46
-45
components/drivers/serial/serial.c
components/drivers/serial/serial.c
+4
-3
components/libc/Kconfig
components/libc/Kconfig
+25
-26
components/libc/compilers/common/sys/time.h
components/libc/compilers/common/sys/time.h
+1
-2
components/libc/compilers/common/time.c
components/libc/compilers/common/time.c
+0
-5
components/libc/posix/getline/SConscript
components/libc/posix/getline/SConscript
+2
-4
components/libc/posix/getline/posix_getline.c
components/libc/posix/getline/posix_getline.c
+0
-1
components/libc/posix/src/SConscript
components/libc/posix/src/SConscript
+12
-2
components/lwp/Kconfig
components/lwp/Kconfig
+1
-1
components/net/Kconfig
components/net/Kconfig
+1
-1
未找到文件。
components/drivers/serial/serial.c
浏览文件 @
838d1087
...
...
@@ -362,7 +362,7 @@ static void _serial_check_buffer_size(void)
}
}
#if defined(RT_USING_POSIX) || defined(RT_SERIAL_USING_DMA)
#if defined(RT_USING_POSIX
_DEVIO
) || defined(RT_SERIAL_USING_DMA)
static
rt_size_t
_serial_fifo_calc_recved_len
(
struct
rt_serial_device
*
serial
)
{
struct
rt_serial_rx_fifo
*
rx_fifo
=
(
struct
rt_serial_rx_fifo
*
)
serial
->
serial_rx
;
...
...
@@ -385,7 +385,7 @@ static rt_size_t _serial_fifo_calc_recved_len(struct rt_serial_device *serial)
}
}
}
#endif
/* RT_USING_POSIX || RT_SERIAL_USING_DMA */
#endif
/* RT_USING_POSIX
_DEVIO
|| RT_SERIAL_USING_DMA */
#ifdef RT_SERIAL_USING_DMA
/**
...
...
@@ -1133,6 +1133,7 @@ static rt_err_t rt_serial_control(struct rt_device *dev,
}
else
{
#include <shell.h>
#define _TIO_BUFLEN 20
char
_tio_buf
[
_TIO_BUFLEN
];
unsigned
char
cnt1
,
cnt2
,
cnt3
,
i
;
...
...
@@ -1148,7 +1149,7 @@ static rt_err_t rt_serial_control(struct rt_device *dev,
i
=
0
;
while
(
i
<
_TIO_BUFLEN
)
{
_tio_buf
[
i
]
=
getchar
();
_tio_buf
[
i
]
=
finsh_
getchar
();
if
(
_tio_buf
[
i
]
!=
't'
)
{
i
++
;
...
...
components/libc/Kconfig
浏览文件 @
838d1087
...
...
@@ -2,7 +2,6 @@ menu "POSIX layer and C standard library"
config RT_USING_LIBC
bool "Enable libc APIs from toolchain"
select RT_USING_HEAP
default n
if RT_USING_LIBC
...
...
@@ -10,8 +9,8 @@ if RT_USING_LIBC
default y
config RT_LIBC_USING_FILEIO
bool "Enable libc with file operation, eg.fopen/fwrite/fread/getchar"
select RT_USING_POSIX
bool "Enable libc with file operation, eg.fopen/fwrite/fread/getchar
/STDIO
"
select RT_USING_POSIX
_FS
select RT_USING_POSIX_DEVIO
default n
...
...
@@ -38,50 +37,50 @@ config RT_LIBC_DEFAULT_TIMEZONE
range -12 12
default 8
config RT_USING_POSIX
bool "Enable
basic POSIX layer
, open()/read()/write()/close() etc"
config RT_USING_POSIX
_FS
bool "Enable
POSIX file system
, open()/read()/write()/close() etc"
select RT_USING_DFS
select DFS_USING_POSIX
default n
if RT_USING_POSIX
if RT_USING_POSIX
_FS
config RT_USING_POSIX_DEVIO
bool "Enable devices as file descriptors"
select RT_USING_DFS
select RT_USING_DFS_DEVFS
default n
config RT_USING_POSIX_POLL
bool "Enable poll()"
select RT_USING_DFS
default n
config RT_USING_POSIX_SELECT
bool "Enable select()"
select RT_USING_DFS
select RT_USING_POSIX_POLL
default n
endif
config RT_USING_POSIX_DELAY
config RT_USING_POSIX_DELAY
bool "Enable delay APIs, sleep()/usleep()/msleep() etc"
default n
config RT_USING_POSIX_GETLINE
config RT_USING_POSIX_GETLINE
bool "Enable getline()/getdelim()"
select RT_USING_LIBC
select RT_LIBC_USING_FILEIO
default n
config RT_USING_POSIX_MMAP
config RT_USING_POSIX_MMAP
bool "Enable mmap()"
select RT_USING_D
FS
select RT_USING_POSIX_
FS
default n
config RT_USING_POSIX_TERMIOS
config RT_USING_POSIX_TERMIOS
bool "Enable termios APIs"
default n
config RT_USING_POSIX_AIO
config RT_USING_POSIX_AIO
bool "Enable AIO APIs"
default n
endif
config RT_USING_PTHREADS
bool "Enable pthreads APIs"
...
...
components/libc/compilers/common/sys/time.h
浏览文件 @
838d1087
...
...
@@ -72,7 +72,6 @@ int settimeofday(const struct timeval *tv, const struct timezone *tz);
struct
tm
*
gmtime_r
(
const
time_t
*
timep
,
struct
tm
*
r
);
#endif
#ifdef RT_USING_POSIX
/* POSIX clock and timer */
#define MILLISECOND_PER_SECOND 1000UL
#define MICROSECOND_PER_SECOND 1000000UL
...
...
@@ -103,8 +102,8 @@ int clock_getres (clockid_t clockid, struct timespec *res);
int
clock_gettime
(
clockid_t
clockid
,
struct
timespec
*
tp
);
int
clock_settime
(
clockid_t
clockid
,
const
struct
timespec
*
tp
);
int
rt_timespec_to_tick
(
const
struct
timespec
*
time
);
#endif
/* RT_USING_POSIX */
/* timezone */
void
tz_set
(
int8_t
tz
);
int8_t
tz_get
(
void
);
int8_t
tz_is_dst
(
void
);
...
...
components/libc/compilers/common/time.c
浏览文件 @
838d1087
...
...
@@ -486,8 +486,6 @@ RTM_EXPORT(settimeofday);
RTM_EXPORT
(
difftime
);
RTM_EXPORT
(
strftime
);
#ifdef RT_USING_POSIX
#ifdef RT_USING_RTC
static
volatile
struct
timeval
_timevalue
;
static
int
_rt_clock_time_system_init
()
...
...
@@ -690,9 +688,6 @@ int rt_timespec_to_tick(const struct timespec *time)
}
RTM_EXPORT
(
rt_timespec_to_tick
);
#endif
/* RT_USING_POSIX */
/* timezone */
#ifndef RT_LIBC_DEFAULT_TIMEZONE
#define RT_LIBC_DEFAULT_TIMEZONE 8
...
...
components/libc/posix/getline/SConscript
浏览文件 @
838d1087
...
...
@@ -3,11 +3,9 @@
from
building
import
*
cwd
=
GetCurrentDir
()
src
=
Glob
(
'*.c'
)
+
Glob
(
'*.cpp'
)
src
=
Glob
(
'*.c'
)
CPPPATH
=
[
cwd
]
group
=
DefineGroup
(
'POSIX'
,
src
,
depend
=
[
'RT_USING_LIBC'
,
'RT_USING_POSIX'
,
'RT_USING_POSIX_GETLINE'
],
CPPPATH
=
CPPPATH
)
group
=
DefineGroup
(
'POSIX'
,
src
,
depend
=
[
'RT_USING_POSIX_GETLINE'
],
CPPPATH
=
CPPPATH
)
Return
(
'group'
)
components/libc/posix/getline/posix_getline.c
浏览文件 @
838d1087
...
...
@@ -75,4 +75,3 @@ ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream) {
ssize_t
getline
(
char
**
lineptr
,
size_t
*
n
,
FILE
*
stream
)
{
return
getdelim
(
lineptr
,
n
,
'\n'
,
stream
);
}
components/libc/posix/src/SConscript
浏览文件 @
838d1087
...
...
@@ -2,25 +2,35 @@
from
building
import
*
src
=
[
'unistd.c'
]
src
=
[]
cwd
=
GetCurrentDir
()
CPPPATH
=
[
cwd
]
group
=
[]
flag
=
False
src
+=
[
'unistd.c'
]
#TODO
if
GetDepend
(
'RT_USING_POSIX_DEVIO'
):
src
+=
[
'libc.c'
]
flag
=
True
if
GetDepend
(
'RT_USING_POSIX_DELAY'
):
src
+=
[
'delay.c'
]
flag
=
True
if
GetDepend
(
'RT_USING_POSIX_POLL'
):
src
+=
[
'poll.c'
]
flag
=
True
if
GetDepend
(
'RT_USING_POSIX_SELECT'
):
src
+=
[
'select.c'
]
flag
=
True
if
GetDepend
(
'RT_USING_POSIX_MMAP'
):
src
+=
[
'mmap.c'
]
flag
=
True
group
=
DefineGroup
(
'POSIX'
,
src
,
depend
=
[
'RT_USING_POSIX'
],
CPPPATH
=
CPPPATH
)
if
flag
==
True
:
group
=
DefineGroup
(
'POSIX'
,
src
,
depend
=
[],
CPPPATH
=
CPPPATH
)
Return
(
'group'
)
components/lwp/Kconfig
浏览文件 @
838d1087
config RT_USING_LWP
bool "Using light-weight process"
select RT_USING_POSIX
select RT_USING_POSIX
_FS
select RT_USING_POSIX_SELECT
select RT_USING_LIBC
depends on ARCH_ARM_CORTEX_M || ARCH_ARM_ARM9 || ARCH_ARM_CORTEX_A
...
...
components/net/Kconfig
浏览文件 @
838d1087
...
...
@@ -41,7 +41,7 @@ config RT_USING_SAL
config SAL_USING_POSIX
bool "Enable BSD socket operated by file system API"
default n
select RT_USING_POSIX
select RT_USING_POSIX
_FS
select RT_USING_POSIX_SELECT
help
Let BSD socket operated by file system API, such as read/write and involveed in select/poll POSIX APIs.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录