[posix] implement delay functions as RT_USING_POSIX_DELAY

This commit is contained in:
Meco Man 2021-11-10 13:44:35 -05:00
parent e6ae01e332
commit 52bbd9d715
4 changed files with 50 additions and 21 deletions

View File

@ -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=y
CONFIG_RT_CPUS_NR=2
@ -203,6 +204,7 @@ CONFIG_RT_DEBUG_SFUD=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 +212,20 @@ CONFIG_RT_DEBUG_SFUD=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
CONFIG_RT_USING_POSIX=y
# CONFIG_RT_USING_POSIX_STDIO is not set
# CONFIG_RT_USING_POSIX_POLL is not set
# CONFIG_RT_USING_POSIX_SELECT is not set
CONFIG_RT_USING_POSIX_DELAY=y
# CONFIG_RT_USING_POSIX_GETLINE is not set
# CONFIG_RT_USING_POSIX_MMAP is not set
# CONFIG_RT_USING_POSIX_TERMIOS is not set
# CONFIG_RT_USING_POSIX_AIO is not set
# CONFIG_RT_USING_PTHREADS is not set
#
# Network
@ -380,6 +387,7 @@ CONFIG_ULOG_BACKEND_USING_CONSOLE=y
# 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
@ -401,15 +409,15 @@ CONFIG_ULOG_BACKEND_USING_CONSOLE=y
#
# multimedia packages
#
# CONFIG_PKG_USING_OPENMV is not set
# CONFIG_PKG_USING_MUPDF is not set
# CONFIG_PKG_USING_STEMWIN is not set
#
# lvgl: powerful and easy-to-use embedded GUI library
# 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
# CONFIG_PKG_USING_WAVPLAYER is not set
# CONFIG_PKG_USING_TJPGD is not set
# CONFIG_PKG_USING_PDFGEN is not set
@ -481,6 +489,13 @@ CONFIG_ULOG_BACKEND_USING_CONSOLE=y
# 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
#
@ -498,7 +513,6 @@ CONFIG_ULOG_BACKEND_USING_CONSOLE=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_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
@ -604,6 +618,7 @@ CONFIG_PKG_KENDRYTE_SDK_VERNUM=0x0057
# 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
@ -672,6 +687,10 @@ CONFIG_PKG_KENDRYTE_SDK_VERNUM=0x0057
# CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_TERMBOX is not set
CONFIG_BOARD_K210_EVB=y
#
# Hardware Drivers Config
#
CONFIG_BSP_USING_UART_HS=y
#
@ -704,6 +723,7 @@ CONFIG_BSP_LCD_BACKLIGHT_ACTIVE_LOW=y
CONFIG_BSP_LCD_CLK_FREQ=15000000
# CONFIG_BSP_BOARD_KD233 is not set
CONFIG_BSP_BOARD_K210_OPENMV_TEST=y
# CONFIG_BSP_BOARD_K210_DRACO is not set
# CONFIG_BSP_BOARD_USER is not set
CONFIG_BSP_LCD_X_MAX=240
CONFIG_BSP_LCD_Y_MAX=320

View File

@ -130,9 +130,10 @@
/* 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
#define RT_USING_POSIX
#define RT_USING_POSIX_DELAY
/* Network */
@ -194,8 +195,7 @@
/* multimedia packages */
/* lvgl: powerful and easy-to-use embedded GUI library */
/* LVGL: powerful and easy-to-use embedded GUI library */
/* u8g2: a monochrome graphic library */
@ -209,6 +209,9 @@
/* acceleration: Assembly language or algorithmic acceleration packages */
/* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
/* Micrium: Micrium software products porting for RT-Thread */
@ -229,6 +232,9 @@
/* entertainment: terminal games and other interesting software packages */
#define BOARD_K210_EVB
/* Hardware Drivers Config */
#define BSP_USING_UART_HS
/* General Purpose UARTs */

View File

@ -38,13 +38,13 @@ config RT_LIBC_DEFAULT_TIMEZONE
default 8
config RT_USING_POSIX
bool "Enable basic POSIX layer, open/read/write/close etc"
bool "Enable basic POSIX layer, open()/read()/write()/close() etc"
select RT_USING_DFS
default n
if RT_USING_POSIX
config RT_USING_POSIX_STDIO
bool "Enable standard I/O"
bool "Enable standard I/O, STDOUT_FILENO/STDIN_FILENO/STDERR_FILENO"
select RT_USING_DFS
select RT_USING_DFS_DEVFS
default n
@ -61,15 +61,15 @@ if RT_USING_POSIX
default n
config RT_USING_POSIX_DELAY
bool "Enable delay functions"
bool "Enable delay APIs, sleep()/usleep()/msleep() etc"
default n
config RT_USING_POSIX_GETLINE
bool "Enable getline()/getdelim() APIs"
bool "Enable getline()/getdelim()"
default n
config RT_USING_POSIX_MMAP
bool "Enable mmap() API"
bool "Enable mmap()"
select RT_USING_DFS
default n
@ -78,7 +78,7 @@ if RT_USING_POSIX
default n
config RT_USING_POSIX_AIO
bool "Enable AIO"
bool "Enable AIO APIs"
default n
endif

View File

@ -2,13 +2,16 @@
from building import *
src = ['unistd.c', 'delay.c']
src = ['unistd.c']
cwd = GetCurrentDir()
CPPPATH = [cwd]
if GetDepend('RT_USING_POSIX_STDIO'):
src += ['libc.c']
if GetDepend('RT_USING_POSIX_DELAY'):
src += ['delay.c']
if GetDepend('RT_USING_POSIX_POLL'):
src += ['poll.c']