Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
天中雨水
rt-thread
提交
67e14adc
R
rt-thread
项目概览
天中雨水
/
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,发现更多精彩内容 >>
提交
67e14adc
编写于
12月 05, 2021
作者:
mysterywolf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[posix] 按照高级unix环境编程整理IO类别
上级
3dd1aa75
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
240 addition
and
125 deletion
+240
-125
bsp/raspberry-pi/raspi4-32/.config
bsp/raspberry-pi/raspi4-32/.config
+131
-50
bsp/raspberry-pi/raspi4-32/rtconfig.h
bsp/raspberry-pi/raspi4-32/rtconfig.h
+29
-8
components/drivers/serial/serial.c
components/drivers/serial/serial.c
+1
-1
components/libc/compilers/common/sys/termios.h
components/libc/compilers/common/sys/termios.h
+0
-8
components/libc/compilers/common/termios.h
components/libc/compilers/common/termios.h
+0
-19
components/libc/posix/Kconfig
components/libc/posix/Kconfig
+16
-16
components/libc/posix/io/SConscript
components/libc/posix/io/SConscript
+34
-0
components/libc/posix/io/aio/SConscript
components/libc/posix/io/aio/SConscript
+1
-1
components/libc/posix/io/aio/aio.c
components/libc/posix/io/aio/aio.c
+1
-1
components/libc/posix/io/aio/aio.h
components/libc/posix/io/aio/aio.h
+2
-2
components/libc/posix/io/libc.c
components/libc/posix/io/libc.c
+0
-0
components/libc/posix/io/libc.h
components/libc/posix/io/libc.h
+0
-0
components/libc/posix/io/mmap.c
components/libc/posix/io/mmap.c
+0
-0
components/libc/posix/io/poll/SConscript
components/libc/posix/io/poll/SConscript
+11
-0
components/libc/posix/io/poll/poll.c
components/libc/posix/io/poll/poll.c
+0
-0
components/libc/posix/io/poll/poll.h
components/libc/posix/io/poll/poll.h
+0
-0
components/libc/posix/io/select.c
components/libc/posix/io/select.c
+0
-0
components/libc/posix/io/termios/SConscript
components/libc/posix/io/termios/SConscript
+11
-0
components/libc/posix/io/termios/termios.c
components/libc/posix/io/termios/termios.c
+1
-1
components/libc/posix/io/termios/termios.h
components/libc/posix/io/termios/termios.h
+2
-2
components/libc/posix/src/SConscript
components/libc/posix/src/SConscript
+0
-16
未找到文件。
bsp/raspberry-pi/raspi4-32/.config
浏览文件 @
67e14adc
...
...
@@ -7,6 +7,7 @@
# RT-Thread Kernel
#
CONFIG_RT_NAME_MAX
=
8
# CONFIG_RT_USING_BIG_ENDIAN is not set
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
# CONFIG_RT_USING_SMP is not set
CONFIG_RT_ALIGN_SIZE
=
4
...
...
@@ -29,6 +30,10 @@ CONFIG_RT_TIMER_THREAD_STACK_SIZE=2048
#
# CONFIG_RT_KSERVICE_USING_STDLIB is not set
# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set
# CONFIG_RT_USING_ASM_MEMCPY is not set
# CONFIG_RT_USING_ASM_MEMSET is not set
# CONFIG_RT_USING_TINY_FFS is not set
# CONFIG_RT_PRINTF_LONGLONG is not set
CONFIG_RT_DEBUG
=
y
# CONFIG_RT_DEBUG_COLOR is not set
# CONFIG_RT_DEBUG_INIT_CONFIG is not set
...
...
@@ -73,8 +78,7 @@ CONFIG_RT_USING_DEVICE=y
CONFIG_RT_USING_CONSOLE
=
y
CONFIG_RT_CONSOLEBUF_SIZE
=
128
CONFIG_RT_CONSOLE_DEVICE_NAME
=
"uart1"
# CONFIG_RT_PRINTF_LONGLONG is not set
CONFIG_RT_VER_NUM
=
0
x40004
CONFIG_RT_VER_NUM
=
0
x40100
# CONFIG_RT_USING_CPU_FFS is not set
CONFIG_RT_USING_GIC_V2
=
y
CONFIG_ARCH_ARMV8
=
y
...
...
@@ -87,6 +91,7 @@ CONFIG_RT_USING_COMPONENTS_INIT=y
CONFIG_RT_USING_USER_MAIN
=
y
CONFIG_RT_MAIN_THREAD_STACK_SIZE
=
2048
CONFIG_RT_MAIN_THREAD_PRIORITY
=
10
# CONFIG_RT_USING_LEGACY is not set
#
# C++ features
...
...
@@ -97,25 +102,26 @@ CONFIG_RT_MAIN_THREAD_PRIORITY=10
# Command shell
#
CONFIG_RT_USING_FINSH
=
y
CONFIG_RT_USING_MSH
=
y
CONFIG_FINSH_USING_MSH
=
y
CONFIG_FINSH_THREAD_NAME
=
"tshell"
CONFIG_FINSH_THREAD_PRIORITY
=
20
CONFIG_FINSH_THREAD_STACK_SIZE
=
4096
CONFIG_FINSH_USING_HISTORY
=
y
CONFIG_FINSH_HISTORY_LINES
=
5
CONFIG_FINSH_USING_SYMTAB
=
y
CONFIG_FINSH_CMD_SIZE
=
80
CONFIG_MSH_USING_BUILT_IN_COMMANDS
=
y
CONFIG_FINSH_USING_DESCRIPTION
=
y
# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set
CONFIG_FINSH_THREAD_PRIORITY
=
20
CONFIG_FINSH_THREAD_STACK_SIZE
=
4096
CONFIG_FINSH_CMD_SIZE
=
80
# CONFIG_FINSH_USING_AUTH is not set
CONFIG_FINSH_USING_MSH
=
y
CONFIG_FINSH_USING_MSH_DEFAULT
=
y
# CONFIG_FINSH_USING_MSH_ONLY is not set
CONFIG_FINSH_ARG_MAX
=
10
#
# Device virtual file system
#
CONFIG_RT_USING_DFS
=
y
CONFIG_DFS_USING_POSIX
=
y
CONFIG_DFS_USING_WORKDIR
=
y
CONFIG_DFS_FILESYSTEMS_MAX
=
2
CONFIG_DFS_FILESYSTEM_TYPES_MAX
=
2
...
...
@@ -143,6 +149,7 @@ CONFIG_RT_DFS_ELM_DRIVES=2
CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE
=
512
# CONFIG_RT_DFS_ELM_USE_ERASE is not set
CONFIG_RT_DFS_ELM_REENTRANT
=
y
CONFIG_RT_DFS_ELM_MUTEX_TIMEOUT
=
3000
CONFIG_RT_USING_DFS_DEVFS
=
y
# CONFIG_RT_USING_DFS_ROMFS is not set
# CONFIG_RT_USING_DFS_RAMFS is not set
...
...
@@ -203,6 +210,7 @@ CONFIG_RT_USING_TOUCH=y
#
# Using USB
#
# CONFIG_RT_USING_USB is not set
# CONFIG_RT_USING_USB_HOST is not set
# CONFIG_RT_USING_USB_DEVICE is not set
...
...
@@ -210,15 +218,25 @@ CONFIG_RT_USING_TOUCH=y
# POSIX layer and C standard library
#
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_GETLINE is not set
# CONFIG_RT_USING_POSIX_AIO is not set
CONFIG_RT_LIBC_USING_TIME
=
y
# CONFIG_RT_LIBC_USING_FILEIO is not set
# CONFIG_RT_USING_MODULE is not set
CONFIG_RT_LIBC_DEFAULT_TIMEZONE
=
8
#
# POSIX (Portable Operating System Interface) layer
#
CONFIG_RT_USING_POSIX_FS
=
y
# CONFIG_RT_USING_POSIX_DEVIO is not set
CONFIG_RT_USING_POSIX_POLL
=
y
CONFIG_RT_USING_POSIX_SELECT
=
y
# CONFIG_RT_USING_POSIX_TERMIOS is not set
# CONFIG_RT_USING_POSIX_AIO is not set
# CONFIG_RT_USING_POSIX_MMAP is not set
# CONFIG_RT_USING_POSIX_DELAY is not set
# CONFIG_RT_USING_POSIX_GETLINE is not set
# CONFIG_RT_USING_PTHREADS is not set
#
# Network
#
...
...
@@ -324,6 +342,7 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_RT_USING_RYM is not set
# CONFIG_RT_USING_ULOG is not set
# CONFIG_RT_USING_UTEST is not set
# CONFIG_RT_USING_VAR_EXPORT is not set
# CONFIG_RT_USING_RT_LINK is not set
#
...
...
@@ -378,6 +397,7 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_PKG_USING_AT_DEVICE is not set
# CONFIG_PKG_USING_ATSRV_SOCKET is not set
# CONFIG_PKG_USING_WIZNET is not set
# CONFIG_PKG_USING_ZB_COORDINATOR is not set
#
# IoT Cloud
...
...
@@ -418,6 +438,12 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_PKG_USING_AGILE_MODBUS is not set
# CONFIG_PKG_USING_AGILE_FTP is not set
# CONFIG_PKG_USING_EMBEDDEDPROTO is not set
# CONFIG_PKG_USING_RT_LINK_HW is not set
# CONFIG_PKG_USING_LORA_PKT_FWD is not set
# CONFIG_PKG_USING_LORA_GW_DRIVER_LIB is not set
# CONFIG_PKG_USING_LORA_PKT_SNIFFER is not set
# CONFIG_PKG_USING_HM is not set
# CONFIG_PKG_USING_SMALL_MODBUS is not set
#
# security packages
...
...
@@ -434,10 +460,17 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_PKG_USING_LUA is not set
# CONFIG_PKG_USING_JERRYSCRIPT is not set
# CONFIG_PKG_USING_MICROPYTHON is not set
# CONFIG_PKG_USING_PIKASCRIPT is not set
#
# multimedia packages
#
#
# LVGL: powerful and easy-to-use embedded GUI library
#
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
# CONFIG_PKG_USING_LVGL is not set
# CONFIG_PKG_USING_OPENMV is not set
# CONFIG_PKG_USING_MUPDF is not set
# CONFIG_PKG_USING_STEMWIN is not set
...
...
@@ -447,6 +480,22 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_PKG_USING_HELIX is not set
# CONFIG_PKG_USING_AZUREGUIX is not set
# CONFIG_PKG_USING_TOUCHGFX2RTT is not set
# CONFIG_PKG_USING_NUEMWIN is not set
# CONFIG_PKG_USING_MP3PLAYER is not set
# CONFIG_PKG_USING_TINYJPEG is not set
# CONFIG_PKG_USING_UGUI is not set
#
# u8g2: a monochrome graphic library
#
# CONFIG_PKG_USING_U8G2_OFFICIAL is not set
# CONFIG_PKG_USING_U8G2 is not set
#
# PainterEngine: A cross-platform graphics application framework written in C language
#
# CONFIG_PKG_USING_PAINTERENGINE is not set
# CONFIG_PKG_USING_PAINTERENGINE_AUX is not set
#
# tools packages
...
...
@@ -455,6 +504,7 @@ CONFIG_RT_LWIP_USING_PING=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_SEGGER_RTT is not set
# CONFIG_PKG_USING_RDB is not set
# CONFIG_PKG_USING_QRCODE is not set
# CONFIG_PKG_USING_ULOG_EASYFLASH is not set
...
...
@@ -486,10 +536,38 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_PKG_USING_DEVMEM is not set
# CONFIG_PKG_USING_REGEX is not set
# CONFIG_PKG_USING_MEM_SANDBOX is not set
# CONFIG_PKG_USING_SOLAR_TERMS is not set
# CONFIG_PKG_USING_GAN_ZHI is not set
# CONFIG_PKG_USING_FDT is not set
#
# system packages
#
#
# acceleration: Assembly language or algorithmic acceleration packages
#
# CONFIG_PKG_USING_RT_MEMCPY_CM is not set
# CONFIG_PKG_USING_QFPLIB_M0_FULL is not set
# CONFIG_PKG_USING_QFPLIB_M0_TINY is not set
# CONFIG_PKG_USING_QFPLIB_M3 is not set
#
# CMSIS: ARM Cortex-M Microcontroller Software Interface Standard
#
# CONFIG_PKG_USING_CMSIS_5 is not set
# CONFIG_PKG_USING_CMSIS_5_AUX is not set
# CONFIG_PKG_USING_CMSIS_RTOS2 is not set
#
# Micrium: Micrium software products porting for RT-Thread
#
# CONFIG_PKG_USING_UCOSIII_WRAPPER is not set
# CONFIG_PKG_USING_UCOSII_WRAPPER is not set
# CONFIG_PKG_USING_UC_CRC is not set
# CONFIG_PKG_USING_UC_CLK is not set
# CONFIG_PKG_USING_UC_COMMON is not set
# CONFIG_PKG_USING_UC_MODBUS is not set
# CONFIG_PKG_USING_GUIENGINE is not set
# CONFIG_PKG_USING_CAIRO is not set
# CONFIG_PKG_USING_PIXMAN is not set
...
...
@@ -498,8 +576,6 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_PKG_USING_FLASHDB is not set
# CONFIG_PKG_USING_SQLITE is not set
# CONFIG_PKG_USING_RTI is not set
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
# CONFIG_PKG_USING_CMSIS is not set
# CONFIG_PKG_USING_DFS_YAFFS is not set
# CONFIG_PKG_USING_LITTLEFS is not set
# CONFIG_PKG_USING_DFS_JFFS2 is not set
...
...
@@ -514,26 +590,17 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_PKG_USING_RAMDISK is not set
# CONFIG_PKG_USING_MININI is not set
# CONFIG_PKG_USING_QBOOT is not set
#
# Micrium: Micrium software products porting for RT-Thread
#
# CONFIG_PKG_USING_UCOSIII_WRAPPER is not set
# CONFIG_PKG_USING_UCOSII_WRAPPER is not set
# CONFIG_PKG_USING_UC_CRC is not set
# CONFIG_PKG_USING_UC_CLK is not set
# CONFIG_PKG_USING_UC_COMMON is not set
# CONFIG_PKG_USING_UC_MODBUS is not set
# CONFIG_PKG_USING_PPOOL is not set
# CONFIG_PKG_USING_OPENAMP is not set
# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set
# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set
# CONFIG_PKG_USING_RT_MEMCPY_CM is not set
# CONFIG_PKG_USING_QFPLIB_M0_FULL is not set
# CONFIG_PKG_USING_QFPLIB_M0_TINY is not set
# CONFIG_PKG_USING_QFPLIB_M3 is not set
# CONFIG_PKG_USING_LPM is not set
# CONFIG_PKG_USING_TLSF is not set
# CONFIG_PKG_USING_EVENT_RECORDER is not set
# CONFIG_PKG_USING_ARM_2D is not set
# CONFIG_PKG_USING_WCWIDTH is not set
# CONFIG_PKG_USING_MCUBOOT is not set
# CONFIG_PKG_USING_TINYUSB is not set
#
# peripheral libraries and drivers
...
...
@@ -545,7 +612,6 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_PKG_USING_AS7341 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
# CONFIG_PKG_USING_BUTTON is not set
# CONFIG_PKG_USING_PCF8574 is not set
# CONFIG_PKG_USING_SX12XX is not set
...
...
@@ -558,7 +624,6 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_PKG_USING_WM_LIBRARIES is not set
# CONFIG_PKG_USING_KENDRYTE_SDK is not set
# CONFIG_PKG_USING_INFRARED is not set
# CONFIG_PKG_USING_ROSSERIAL is not set
# CONFIG_PKG_USING_AGILE_BUTTON is not set
# CONFIG_PKG_USING_AGILE_LED is not set
# CONFIG_PKG_USING_AT24CXX is not set
...
...
@@ -601,6 +666,17 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_PKG_USING_LIBNFC is not set
# CONFIG_PKG_USING_MFOC is not set
# CONFIG_PKG_USING_TMC51XX is not set
# CONFIG_PKG_USING_TCA9534 is not set
# CONFIG_PKG_USING_KOBUKI is not set
# CONFIG_PKG_USING_ROSSERIAL is not set
# CONFIG_PKG_USING_MICRO_ROS is not set
# CONFIG_PKG_USING_MCP23008 is not set
# CONFIG_PKG_USING_BLUETRUM_SDK is not set
# CONFIG_PKG_USING_MISAKA_AT24CXX is not set
# CONFIG_PKG_USING_MISAKA_RGB_BLING is not set
# CONFIG_PKG_USING_BL_MCU_SDK is not set
# CONFIG_PKG_USING_SOFT_SERIAL is not set
# CONFIG_PKG_USING_MB85RS16 is not set
#
# AI packages
...
...
@@ -618,6 +694,27 @@ CONFIG_RT_LWIP_USING_PING=y
#
# miscellaneous packages
#
#
# samples: kernel and components samples
#
# CONFIG_PKG_USING_KERNEL_SAMPLES is not set
# CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set
# CONFIG_PKG_USING_NETWORK_SAMPLES is not set
# CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set
#
# entertainment: terminal games and other interesting software packages
#
# CONFIG_PKG_USING_CMATRIX is not set
# CONFIG_PKG_USING_SL is not set
# CONFIG_PKG_USING_CAL is not set
# CONFIG_PKG_USING_ACLOCK is not set
# CONFIG_PKG_USING_THREES is not set
# CONFIG_PKG_USING_2048 is not set
# CONFIG_PKG_USING_SNAKE is not set
# CONFIG_PKG_USING_TETRIS is not set
# CONFIG_PKG_USING_DONUT is not set
# CONFIG_PKG_USING_LIBCSV is not set
# CONFIG_PKG_USING_OPTPARSE is not set
# CONFIG_PKG_USING_FASTLZ is not set
...
...
@@ -628,20 +725,13 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_PKG_USING_FLEXIBLE_BUTTON is not set
# CONFIG_PKG_USING_CANFESTIVAL is not set
# CONFIG_PKG_USING_ZLIB is not set
# CONFIG_PKG_USING_MINIZIP is not set
# CONFIG_PKG_USING_DSTR is not set
# CONFIG_PKG_USING_TINYFRAME is not set
# CONFIG_PKG_USING_KENDRYTE_DEMO is not set
# CONFIG_PKG_USING_DIGITALCTRL is not set
# CONFIG_PKG_USING_UPACKER is not set
# CONFIG_PKG_USING_UPARAM is not set
#
# samples: kernel and components samples
#
# CONFIG_PKG_USING_KERNEL_SAMPLES is not set
# CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set
# CONFIG_PKG_USING_NETWORK_SAMPLES is not set
# CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set
# CONFIG_PKG_USING_HELLO is not set
# CONFIG_PKG_USING_VI is not set
# CONFIG_PKG_USING_KI is not set
...
...
@@ -649,20 +739,11 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_PKG_USING_VT100 is not set
# CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_CRCLIB is not set
#
# entertainment: terminal games and other interesting software packages
#
# CONFIG_PKG_USING_THREES is not set
# CONFIG_PKG_USING_2048 is not set
# CONFIG_PKG_USING_SNAKE is not set
# CONFIG_PKG_USING_TETRIS is not set
# CONFIG_PKG_USING_DONUT is not set
# CONFIG_PKG_USING_ACLOCK is not set
# CONFIG_PKG_USING_LWGPS is not set
# CONFIG_PKG_USING_STATE_MACHINE is not set
# CONFIG_PKG_USING_MCURSES is not set
# CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_TERMBOX is not set
CONFIG_BCM2711_SOC
=
y
# CONFIG_BSP_SUPPORT_FPU is not set
...
...
bsp/raspberry-pi/raspi4-32/rtconfig.h
浏览文件 @
67e14adc
...
...
@@ -44,7 +44,7 @@
#define RT_USING_CONSOLE
#define RT_CONSOLEBUF_SIZE 128
#define RT_CONSOLE_DEVICE_NAME "uart1"
#define RT_VER_NUM 0x40
004
#define RT_VER_NUM 0x40
100
#define RT_USING_GIC_V2
#define ARCH_ARMV8
...
...
@@ -61,21 +61,23 @@
/* Command shell */
#define RT_USING_FINSH
#define RT_USING_MSH
#define FINSH_USING_MSH
#define FINSH_THREAD_NAME "tshell"
#define FINSH_THREAD_PRIORITY 20
#define FINSH_THREAD_STACK_SIZE 4096
#define FINSH_USING_HISTORY
#define FINSH_HISTORY_LINES 5
#define FINSH_USING_SYMTAB
#define FINSH_USING_DESCRIPTION
#define FINSH_THREAD_PRIORITY 20
#define FINSH_THREAD_STACK_SIZE 4096
#define FINSH_CMD_SIZE 80
#define
FINSH_USING_MSH
#define FINSH_USING_
MSH_DEFAULT
#define
MSH_USING_BUILT_IN_COMMANDS
#define FINSH_USING_
DESCRIPTION
#define FINSH_ARG_MAX 10
/* Device virtual file system */
#define RT_USING_DFS
#define DFS_USING_POSIX
#define DFS_USING_WORKDIR
#define DFS_FILESYSTEMS_MAX 2
#define DFS_FILESYSTEM_TYPES_MAX 2
...
...
@@ -94,6 +96,7 @@
#define RT_DFS_ELM_DRIVES 2
#define RT_DFS_ELM_MAX_SECTOR_SIZE 512
#define RT_DFS_ELM_REENTRANT
#define RT_DFS_ELM_MUTEX_TIMEOUT 3000
#define RT_USING_DFS_DEVFS
/* Device Drivers */
...
...
@@ -126,9 +129,15 @@
/* POSIX layer and C standard library */
#define RT_USING_LIBC
#define RT_
USING_POSIX
#define RT_
LIBC_USING_TIME
#define RT_LIBC_DEFAULT_TIMEZONE 8
/* POSIX (Portable Operating System Interface) layer */
#define RT_USING_POSIX_FS
#define RT_USING_POSIX_POLL
#define RT_USING_POSIX_SELECT
/* Network */
/* Socket abstraction layer */
...
...
@@ -231,12 +240,25 @@
/* multimedia packages */
/* LVGL: powerful and easy-to-use embedded GUI library */
/* u8g2: a monochrome graphic library */
/* PainterEngine: A cross-platform graphics application framework written in C language */
/* tools packages */
/* system packages */
/* acceleration: Assembly language or algorithmic acceleration packages */
/* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
/* Micrium: Micrium software products porting for RT-Thread */
...
...
@@ -249,7 +271,6 @@
/* miscellaneous packages */
/* samples: kernel and components samples */
...
...
components/drivers/serial/serial.c
浏览文件 @
67e14adc
...
...
@@ -42,7 +42,7 @@
#include <sys/ioctl.h>
#ifdef RT_USING_POSIX_TERMIOS
#include <
posix_
termios.h>
#include <termios.h>
#endif
/* it's possible the 'getc/putc' is defined by stdio.h in gcc/newlib. */
...
...
components/libc/compilers/common/sys/termios.h
已删除
100644 → 0
浏览文件 @
3dd1aa75
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
*/
components/libc/compilers/common/termios.h
已删除
100644 → 0
浏览文件 @
3dd1aa75
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
*/
#ifndef _TERMIOS_H__
#define _TERMIOS_H__
#include <rtconfig.h>
#ifdef RT_USING_POSIX_TERMIOS
#include <sys/types.h>
#include <posix_termios.h>
#endif
#endif
components/libc/posix/Kconfig
浏览文件 @
67e14adc
menu "POSIX (Portable Operating System Interface) layer"
config RT_USING_POSIX_FS
bool "Enable POSIX file system
, open()/read()/write()/close() etc
"
bool "Enable POSIX file system
and I/O
"
select RT_USING_DFS
select DFS_USING_POSIX
default n
...
...
@@ -13,13 +13,26 @@ if RT_USING_POSIX_FS
default n
config RT_USING_POSIX_POLL
bool "Enable
poll()
"
bool "Enable
I/O Multiplexing poll() <poll.h>
"
default n
config RT_USING_POSIX_SELECT
bool "Enable
select()
"
bool "Enable
I/O Multiplexing select() <sys/select.h>
"
select RT_USING_POSIX_POLL
default n
config RT_USING_POSIX_TERMIOS
bool "Enable Terminal I/O <termios.h>"
select RT_USING_POSIX_DEVIO
default n
config RT_USING_POSIX_AIO
bool "Enable Asynchronous I/O <aio.h>"
default n
config RT_USING_POSIX_MMAP
bool "Enable Memory-Mapped I/O <sys/mman.h>"
default n
endif
config RT_USING_POSIX_DELAY
...
...
@@ -32,19 +45,6 @@ config RT_USING_POSIX_GETLINE
select RT_LIBC_USING_FILEIO
default n
config RT_USING_POSIX_MMAP
bool "Enable mmap()"
select RT_USING_POSIX_FS
default n
config RT_USING_POSIX_TERMIOS
bool "Enable termios APIs"
default n
config RT_USING_POSIX_AIO
bool "Enable AIO APIs"
default n
config RT_USING_PTHREADS
bool "Enable pthreads APIs"
default n
...
...
components/libc/posix/io/SConscript
0 → 100644
浏览文件 @
67e14adc
# RT-Thread building script for component
import
os
from
building
import
*
src
=
[]
cwd
=
GetCurrentDir
()
CPPPATH
=
[
cwd
]
group
=
[]
flag
=
False
if
GetDepend
(
'RT_USING_POSIX_DEVIO'
):
src
+=
[
'libc.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
if
flag
==
True
:
group
=
DefineGroup
(
'POSIX'
,
src
,
depend
=
[],
CPPPATH
=
CPPPATH
)
list
=
os
.
listdir
(
cwd
)
for
d
in
list
:
path
=
os
.
path
.
join
(
cwd
,
d
)
if
os
.
path
.
isfile
(
os
.
path
.
join
(
path
,
'SConscript'
)):
group
=
group
+
SConscript
(
os
.
path
.
join
(
d
,
'SConscript'
))
Return
(
'group'
)
components/libc/posix/aio/SConscript
→
components/libc/posix/
io/
aio/SConscript
浏览文件 @
67e14adc
...
...
@@ -3,7 +3,7 @@
from
building
import
*
cwd
=
GetCurrentDir
()
src
=
Glob
(
'*.c'
)
src
=
[
'aio.c'
]
CPPPATH
=
[
cwd
]
group
=
DefineGroup
(
'POSIX'
,
src
,
depend
=
[
'RT_USING_POSIX_AIO'
],
CPPPATH
=
CPPPATH
)
...
...
components/libc/posix/
aio/posix_
aio.c
→
components/libc/posix/
io/aio/
aio.c
浏览文件 @
67e14adc
...
...
@@ -11,7 +11,7 @@
#include <stdint.h>
#include <rthw.h>
#include <dfs_posix.h>
#include "
posix_
aio.h"
#include "aio.h"
struct
rt_workqueue
*
aio_queue
=
NULL
;
...
...
components/libc/posix/
aio/posix_
aio.h
→
components/libc/posix/
io/aio/
aio.h
浏览文件 @
67e14adc
...
...
@@ -8,8 +8,8 @@
* 2017/12/30 Bernard The first version.
*/
#ifndef
POSIX
_AIO_H__
#define
POSIX
_AIO_H__
#ifndef
_
_AIO_H__
#define
_
_AIO_H__
#include <stdio.h>
#include <sys/signal.h>
...
...
components/libc/posix/
src
/libc.c
→
components/libc/posix/
io
/libc.c
浏览文件 @
67e14adc
文件已移动
components/libc/posix/
src
/libc.h
→
components/libc/posix/
io
/libc.h
浏览文件 @
67e14adc
文件已移动
components/libc/posix/
src
/mmap.c
→
components/libc/posix/
io
/mmap.c
浏览文件 @
67e14adc
文件已移动
components/libc/posix/io/poll/SConscript
0 → 100644
浏览文件 @
67e14adc
# RT-Thread building script for component
from
building
import
*
cwd
=
GetCurrentDir
()
src
=
[
'poll.c'
]
CPPPATH
=
[
cwd
]
group
=
DefineGroup
(
'POSIX'
,
src
,
depend
=
[
'RT_USING_POSIX_POLL'
],
CPPPATH
=
CPPPATH
)
Return
(
'group'
)
components/libc/posix/
src
/poll.c
→
components/libc/posix/
io/poll
/poll.c
浏览文件 @
67e14adc
文件已移动
components/libc/
compilers/common
/poll.h
→
components/libc/
posix/io/poll
/poll.h
浏览文件 @
67e14adc
文件已移动
components/libc/posix/
src
/select.c
→
components/libc/posix/
io
/select.c
浏览文件 @
67e14adc
文件已移动
components/libc/posix/termios/SConscript
→
components/libc/posix/
io/
termios/SConscript
浏览文件 @
67e14adc
...
...
@@ -3,9 +3,9 @@
from
building
import
*
cwd
=
GetCurrentDir
()
src
=
Glob
(
'*.c'
)
+
Glob
(
'*.cpp'
)
src
=
[
'termios.c'
]
CPPPATH
=
[
cwd
]
group
=
DefineGroup
(
'POSIX'
,
src
,
depend
=
[
'RT_USING_
LIBC'
,
'RT_USING_
POSIX_TERMIOS'
],
CPPPATH
=
CPPPATH
)
group
=
DefineGroup
(
'POSIX'
,
src
,
depend
=
[
'RT_USING_POSIX_TERMIOS'
],
CPPPATH
=
CPPPATH
)
Return
(
'group'
)
components/libc/posix/
termios/posix_
termios.c
→
components/libc/posix/
io/termios/
termios.c
浏览文件 @
67e14adc
...
...
@@ -11,7 +11,7 @@
#include <string.h>
#include <dfs_posix.h>
#include <sys/errno.h>
#include
<termios.h>
#include
"termios.h"
int
tcgetattr
(
int
fd
,
struct
termios
*
tio
)
{
...
...
components/libc/posix/
termios/posix_
termios.h
→
components/libc/posix/
io/termios/
termios.h
浏览文件 @
67e14adc
...
...
@@ -7,8 +7,8 @@
* Date Author Notes
* 2017/08/30 Bernard The first version
*/
#ifndef TERMIOS_H__
#define TERMIOS_H__
#ifndef
__
TERMIOS_H__
#define
__
TERMIOS_H__
#include <sys/types.h>
#include <sys/ioctl.h>
...
...
components/libc/posix/src/SConscript
浏览文件 @
67e14adc
...
...
@@ -10,26 +10,10 @@ 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
if
flag
==
True
:
group
=
DefineGroup
(
'POSIX'
,
src
,
depend
=
[],
CPPPATH
=
CPPPATH
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录