Merge branch 'master' into tz
This commit is contained in:
commit
2589d24532
Binary file not shown.
|
@ -21,6 +21,12 @@ CONFIG_RT_USING_IDLE_HOOK=y
|
|||
CONFIG_RT_IDLE_HOOK_LIST_SIZE=4
|
||||
CONFIG_IDLE_THREAD_STACK_SIZE=1024
|
||||
# CONFIG_RT_USING_TIMER_SOFT is not set
|
||||
|
||||
#
|
||||
# kservice optimization
|
||||
#
|
||||
# CONFIG_RT_KSERVICE_USING_STDLIB is not set
|
||||
# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set
|
||||
CONFIG_RT_DEBUG=y
|
||||
CONFIG_RT_DEBUG_COLOR=y
|
||||
# CONFIG_RT_DEBUG_INIT_CONFIG is not set
|
||||
|
@ -52,6 +58,7 @@ CONFIG_RT_USING_MEMPOOL=y
|
|||
# CONFIG_RT_USING_NOHEAP is not set
|
||||
CONFIG_RT_USING_SMALL_MEM=y
|
||||
# CONFIG_RT_USING_SLAB is not set
|
||||
# CONFIG_RT_USING_USERHEAP is not set
|
||||
# CONFIG_RT_USING_MEMTRACE is not set
|
||||
CONFIG_RT_USING_HEAP=y
|
||||
|
||||
|
@ -64,7 +71,8 @@ CONFIG_RT_USING_DEVICE=y
|
|||
CONFIG_RT_USING_CONSOLE=y
|
||||
CONFIG_RT_CONSOLEBUF_SIZE=128
|
||||
CONFIG_RT_CONSOLE_DEVICE_NAME="uart1"
|
||||
CONFIG_RT_VER_NUM=0x40002
|
||||
# CONFIG_RT_PRINTF_LONGLONG is not set
|
||||
CONFIG_RT_VER_NUM=0x40004
|
||||
CONFIG_ARCH_ARM=y
|
||||
CONFIG_RT_USING_CPU_FFS=y
|
||||
CONFIG_ARCH_ARM_CORTEX_M=y
|
||||
|
@ -115,18 +123,21 @@ CONFIG_RT_USING_DEVICE_IPC=y
|
|||
CONFIG_RT_PIPE_BUFSZ=512
|
||||
# CONFIG_RT_USING_SYSTEM_WORKQUEUE is not set
|
||||
CONFIG_RT_USING_SERIAL=y
|
||||
CONFIG_RT_USING_SERIAL_V1=y
|
||||
# CONFIG_RT_USING_SERIAL_V2 is not set
|
||||
CONFIG_RT_SERIAL_USING_DMA=y
|
||||
CONFIG_RT_SERIAL_RB_BUFSZ=64
|
||||
# CONFIG_RT_USING_CAN is not set
|
||||
# CONFIG_RT_USING_HWTIMER is not set
|
||||
# CONFIG_RT_USING_CPUTIME is not set
|
||||
# CONFIG_RT_USING_I2C is not set
|
||||
# CONFIG_RT_USING_PHY is not set
|
||||
CONFIG_RT_USING_PIN=y
|
||||
# CONFIG_RT_USING_ADC is not set
|
||||
# CONFIG_RT_USING_DAC is not set
|
||||
# CONFIG_RT_USING_PWM is not set
|
||||
# CONFIG_RT_USING_MTD_NOR is not set
|
||||
# CONFIG_RT_USING_MTD_NAND is not set
|
||||
# CONFIG_RT_USING_MTD is not set
|
||||
# CONFIG_RT_USING_PM is not set
|
||||
# CONFIG_RT_USING_RTC is not set
|
||||
# CONFIG_RT_USING_SDIO is not set
|
||||
|
@ -134,15 +145,10 @@ CONFIG_RT_USING_PIN=y
|
|||
# CONFIG_RT_USING_WDT is not set
|
||||
# CONFIG_RT_USING_AUDIO is not set
|
||||
# CONFIG_RT_USING_SENSOR is not set
|
||||
|
||||
#
|
||||
# Using Hardware Crypto drivers
|
||||
#
|
||||
# CONFIG_RT_USING_TOUCH is not set
|
||||
# CONFIG_RT_USING_HWCRYPTO is not set
|
||||
|
||||
#
|
||||
# Using WiFi
|
||||
#
|
||||
# CONFIG_RT_USING_PULSE_ENCODER is not set
|
||||
# CONFIG_RT_USING_INPUT_CAPTURE is not set
|
||||
# CONFIG_RT_USING_WIFI is not set
|
||||
|
||||
#
|
||||
|
@ -156,6 +162,8 @@ CONFIG_RT_USING_PIN=y
|
|||
#
|
||||
# CONFIG_RT_USING_LIBC is not set
|
||||
# CONFIG_RT_USING_PTHREADS is not set
|
||||
CONFIG_RT_LIBC_USING_TIME=y
|
||||
CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
|
||||
|
||||
#
|
||||
# Network
|
||||
|
@ -176,11 +184,6 @@ CONFIG_RT_USING_PIN=y
|
|||
#
|
||||
# CONFIG_RT_USING_LWIP is not set
|
||||
|
||||
#
|
||||
# Modbus master and slave stack
|
||||
#
|
||||
# CONFIG_RT_USING_MODBUS is not set
|
||||
|
||||
#
|
||||
# AT commands
|
||||
#
|
||||
|
@ -197,8 +200,14 @@ CONFIG_RT_USING_PIN=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_RT_LINK is not set
|
||||
# CONFIG_RT_USING_LWP is not set
|
||||
|
||||
#
|
||||
# RT-Thread Utestcases
|
||||
#
|
||||
# CONFIG_RT_USING_UTESTCASES is not set
|
||||
|
||||
#
|
||||
# RT-Thread online packages
|
||||
#
|
||||
|
@ -206,14 +215,20 @@ CONFIG_RT_USING_PIN=y
|
|||
#
|
||||
# IoT - internet of things
|
||||
#
|
||||
# CONFIG_PKG_USING_LORAWAN_DRIVER is not set
|
||||
# CONFIG_PKG_USING_PAHOMQTT is not set
|
||||
# CONFIG_PKG_USING_UMQTT is not set
|
||||
# CONFIG_PKG_USING_WEBCLIENT is not set
|
||||
# CONFIG_PKG_USING_WEBNET is not set
|
||||
# CONFIG_PKG_USING_MONGOOSE is not set
|
||||
# CONFIG_PKG_USING_MYMQTT is not set
|
||||
# CONFIG_PKG_USING_KAWAII_MQTT is not set
|
||||
# CONFIG_PKG_USING_BC28_MQTT is not set
|
||||
# CONFIG_PKG_USING_WEBTERMINAL is not set
|
||||
# CONFIG_PKG_USING_CJSON is not set
|
||||
# CONFIG_PKG_USING_JSMN is not set
|
||||
# CONFIG_PKG_USING_LIBMODBUS is not set
|
||||
# CONFIG_PKG_USING_FREEMODBUS is not set
|
||||
# CONFIG_PKG_USING_LJSON is not set
|
||||
# CONFIG_PKG_USING_EZXML is not set
|
||||
# CONFIG_PKG_USING_NANOPB is not set
|
||||
|
@ -235,6 +250,8 @@ CONFIG_RT_USING_PIN=y
|
|||
# CONFIG_PKG_USING_COAP is not set
|
||||
# CONFIG_PKG_USING_NOPOLL is not set
|
||||
# CONFIG_PKG_USING_NETUTILS is not set
|
||||
# CONFIG_PKG_USING_CMUX is not set
|
||||
# CONFIG_PKG_USING_PPP_DEVICE is not set
|
||||
# CONFIG_PKG_USING_AT_DEVICE is not set
|
||||
# CONFIG_PKG_USING_ATSRV_SOCKET is not set
|
||||
# CONFIG_PKG_USING_WIZNET is not set
|
||||
|
@ -246,12 +263,38 @@ CONFIG_RT_USING_PIN=y
|
|||
# CONFIG_PKG_USING_GAGENT_CLOUD is not set
|
||||
# CONFIG_PKG_USING_ALI_IOTKIT is not set
|
||||
# CONFIG_PKG_USING_AZURE is not set
|
||||
# CONFIG_PKG_USING_TENCENT_IOTKIT is not set
|
||||
# CONFIG_PKG_USING_TENCENT_IOT_EXPLORER is not set
|
||||
# CONFIG_PKG_USING_JIOT-C-SDK is not set
|
||||
# CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set
|
||||
# CONFIG_PKG_USING_JOYLINK is not set
|
||||
# CONFIG_PKG_USING_NIMBLE is not set
|
||||
# CONFIG_PKG_USING_OTA_DOWNLOADER is not set
|
||||
# CONFIG_PKG_USING_IPMSG is not set
|
||||
# CONFIG_PKG_USING_LSSDP is not set
|
||||
# CONFIG_PKG_USING_AIRKISS_OPEN is not set
|
||||
# CONFIG_PKG_USING_LIBRWS is not set
|
||||
# CONFIG_PKG_USING_TCPSERVER is not set
|
||||
# CONFIG_PKG_USING_PROTOBUF_C is not set
|
||||
# CONFIG_PKG_USING_DLT645 is not set
|
||||
# CONFIG_PKG_USING_QXWZ is not set
|
||||
# CONFIG_PKG_USING_SMTP_CLIENT is not set
|
||||
# CONFIG_PKG_USING_ABUP_FOTA is not set
|
||||
# CONFIG_PKG_USING_LIBCURL2RTT is not set
|
||||
# CONFIG_PKG_USING_CAPNP is not set
|
||||
# CONFIG_PKG_USING_RT_CJSON_TOOLS is not set
|
||||
# CONFIG_PKG_USING_AGILE_TELNET is not set
|
||||
# CONFIG_PKG_USING_NMEALIB is not set
|
||||
# CONFIG_PKG_USING_AGILE_JSMN is not set
|
||||
# CONFIG_PKG_USING_PDULIB is not set
|
||||
# CONFIG_PKG_USING_BTSTACK is not set
|
||||
# CONFIG_PKG_USING_LORAWAN_ED_STACK is not set
|
||||
# CONFIG_PKG_USING_WAYZ_IOTKIT is not set
|
||||
# CONFIG_PKG_USING_MAVLINK is not set
|
||||
# CONFIG_PKG_USING_RAPIDJSON is not set
|
||||
# CONFIG_PKG_USING_BSAL is not set
|
||||
# CONFIG_PKG_USING_AGILE_MODBUS is not set
|
||||
# CONFIG_PKG_USING_AGILE_FTP is not set
|
||||
# CONFIG_PKG_USING_EMBEDDEDPROTO is not set
|
||||
|
||||
#
|
||||
# security packages
|
||||
|
@ -259,6 +302,8 @@ CONFIG_RT_USING_PIN=y
|
|||
# CONFIG_PKG_USING_MBEDTLS is not set
|
||||
# CONFIG_PKG_USING_libsodium is not set
|
||||
# CONFIG_PKG_USING_TINYCRYPT is not set
|
||||
# CONFIG_PKG_USING_TFM is not set
|
||||
# CONFIG_PKG_USING_YD_CRYPTO is not set
|
||||
|
||||
#
|
||||
# language packages
|
||||
|
@ -273,6 +318,13 @@ CONFIG_RT_USING_PIN=y
|
|||
# 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
|
||||
# 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
|
||||
|
||||
#
|
||||
# tools packages
|
||||
|
@ -284,7 +336,36 @@ CONFIG_RT_USING_PIN=y
|
|||
# CONFIG_PKG_USING_RDB is not set
|
||||
# CONFIG_PKG_USING_QRCODE is not set
|
||||
# CONFIG_PKG_USING_ULOG_EASYFLASH is not set
|
||||
# CONFIG_PKG_USING_ULOG_FILE is not set
|
||||
# CONFIG_PKG_USING_LOGMGR is not set
|
||||
# CONFIG_PKG_USING_ADBD is not set
|
||||
# CONFIG_PKG_USING_COREMARK is not set
|
||||
# CONFIG_PKG_USING_DHRYSTONE is not set
|
||||
# CONFIG_PKG_USING_MEMORYPERF is not set
|
||||
# CONFIG_PKG_USING_NR_MICRO_SHELL is not set
|
||||
# CONFIG_PKG_USING_CHINESE_FONT_LIBRARY is not set
|
||||
# CONFIG_PKG_USING_LUNAR_CALENDAR is not set
|
||||
# CONFIG_PKG_USING_BS8116A is not set
|
||||
# CONFIG_PKG_USING_GPS_RMC is not set
|
||||
# CONFIG_PKG_USING_URLENCODE is not set
|
||||
# CONFIG_PKG_USING_UMCN is not set
|
||||
# CONFIG_PKG_USING_LWRB2RTT is not set
|
||||
# CONFIG_PKG_USING_CPU_USAGE is not set
|
||||
# CONFIG_PKG_USING_GBK2UTF8 is not set
|
||||
# CONFIG_PKG_USING_VCONSOLE is not set
|
||||
# CONFIG_PKG_USING_KDB is not set
|
||||
# CONFIG_PKG_USING_WAMR is not set
|
||||
# CONFIG_PKG_USING_MICRO_XRCE_DDS_CLIENT is not set
|
||||
# CONFIG_PKG_USING_LWLOG is not set
|
||||
# CONFIG_PKG_USING_ANV_TRACE is not set
|
||||
# CONFIG_PKG_USING_ANV_MEMLEAK is not set
|
||||
# CONFIG_PKG_USING_ANV_TESTSUIT is not set
|
||||
# CONFIG_PKG_USING_ANV_BENCH is not set
|
||||
# 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
|
||||
|
||||
#
|
||||
# system packages
|
||||
|
@ -293,16 +374,47 @@ CONFIG_RT_USING_PIN=y
|
|||
# CONFIG_PKG_USING_PERSIMMON is not set
|
||||
# CONFIG_PKG_USING_CAIRO is not set
|
||||
# CONFIG_PKG_USING_PIXMAN is not set
|
||||
# CONFIG_PKG_USING_LWEXT4 is not set
|
||||
# CONFIG_PKG_USING_PARTITION is not set
|
||||
# CONFIG_PKG_USING_FAL is not set
|
||||
# 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
|
||||
# CONFIG_PKG_USING_DFS_UFFS is not set
|
||||
# CONFIG_PKG_USING_LWEXT4 is not set
|
||||
# CONFIG_PKG_USING_THREAD_POOL is not set
|
||||
# CONFIG_PKG_USING_ROBOTS is not set
|
||||
# CONFIG_PKG_USING_EV is not set
|
||||
# CONFIG_PKG_USING_SYSWATCH is not set
|
||||
# CONFIG_PKG_USING_SYS_LOAD_MONITOR is not set
|
||||
# CONFIG_PKG_USING_PLCCORE is not set
|
||||
# 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_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
|
||||
|
||||
#
|
||||
# peripheral libraries and drivers
|
||||
|
@ -310,7 +422,8 @@ CONFIG_RT_USING_PIN=y
|
|||
# CONFIG_PKG_USING_SENSORS_DRIVERS is not set
|
||||
# CONFIG_PKG_USING_REALTEK_AMEBA is not set
|
||||
# CONFIG_PKG_USING_SHT2X is not set
|
||||
# CONFIG_PKG_USING_AP3216C is not set
|
||||
# CONFIG_PKG_USING_SHT3X is not set
|
||||
# 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
|
||||
|
@ -319,15 +432,70 @@ CONFIG_RT_USING_PIN=y
|
|||
# CONFIG_PKG_USING_SX12XX is not set
|
||||
# CONFIG_PKG_USING_SIGNAL_LED is not set
|
||||
# CONFIG_PKG_USING_LEDBLINK is not set
|
||||
# CONFIG_PKG_USING_LITTLED is not set
|
||||
# CONFIG_PKG_USING_LKDGUI is not set
|
||||
# CONFIG_PKG_USING_NRF5X_SDK is not set
|
||||
# CONFIG_PKG_USING_NRFX is not set
|
||||
# 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
|
||||
# CONFIG_PKG_USING_MOTIONDRIVER2RTT is not set
|
||||
# CONFIG_PKG_USING_AD7746 is not set
|
||||
# CONFIG_PKG_USING_PCA9685 is not set
|
||||
# CONFIG_PKG_USING_I2C_TOOLS is not set
|
||||
# CONFIG_PKG_USING_NRF24L01 is not set
|
||||
# CONFIG_PKG_USING_TOUCH_DRIVERS is not set
|
||||
# CONFIG_PKG_USING_MAX17048 is not set
|
||||
# CONFIG_PKG_USING_RPLIDAR is not set
|
||||
# CONFIG_PKG_USING_AS608 is not set
|
||||
# CONFIG_PKG_USING_RC522 is not set
|
||||
# CONFIG_PKG_USING_WS2812B is not set
|
||||
# CONFIG_PKG_USING_EMBARC_BSP is not set
|
||||
# CONFIG_PKG_USING_EXTERN_RTC_DRIVERS is not set
|
||||
# CONFIG_PKG_USING_MULTI_RTIMER is not set
|
||||
# CONFIG_PKG_USING_MAX7219 is not set
|
||||
# CONFIG_PKG_USING_BEEP is not set
|
||||
# CONFIG_PKG_USING_EASYBLINK is not set
|
||||
# CONFIG_PKG_USING_PMS_SERIES is not set
|
||||
# CONFIG_PKG_USING_CAN_YMODEM is not set
|
||||
# CONFIG_PKG_USING_LORA_RADIO_DRIVER is not set
|
||||
# CONFIG_PKG_USING_QLED is not set
|
||||
# CONFIG_PKG_USING_PAJ7620 is not set
|
||||
# CONFIG_PKG_USING_AGILE_CONSOLE is not set
|
||||
# CONFIG_PKG_USING_LD3320 is not set
|
||||
# CONFIG_PKG_USING_WK2124 is not set
|
||||
# CONFIG_PKG_USING_LY68L6400 is not set
|
||||
# CONFIG_PKG_USING_DM9051 is not set
|
||||
# CONFIG_PKG_USING_SSD1306 is not set
|
||||
# CONFIG_PKG_USING_QKEY is not set
|
||||
# CONFIG_PKG_USING_RS485 is not set
|
||||
# CONFIG_PKG_USING_NES is not set
|
||||
# CONFIG_PKG_USING_VIRTUAL_SENSOR is not set
|
||||
# CONFIG_PKG_USING_VDEVICE is not set
|
||||
# CONFIG_PKG_USING_SGM706 is not set
|
||||
# CONFIG_PKG_USING_STM32WB55_SDK is not set
|
||||
# CONFIG_PKG_USING_RDA58XX is not set
|
||||
# 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
|
||||
|
||||
#
|
||||
# AI packages
|
||||
#
|
||||
# CONFIG_PKG_USING_LIBANN is not set
|
||||
# CONFIG_PKG_USING_NNOM is not set
|
||||
# CONFIG_PKG_USING_ONNX_BACKEND is not set
|
||||
# CONFIG_PKG_USING_ONNX_PARSER is not set
|
||||
# CONFIG_PKG_USING_TENSORFLOWLITEMICRO is not set
|
||||
# CONFIG_PKG_USING_ELAPACK is not set
|
||||
# CONFIG_PKG_USING_ULAPACK is not set
|
||||
# CONFIG_PKG_USING_QUEST is not set
|
||||
# CONFIG_PKG_USING_NAXOS is not set
|
||||
|
||||
#
|
||||
# miscellaneous packages
|
||||
|
@ -337,13 +505,18 @@ CONFIG_RT_USING_PIN=y
|
|||
# CONFIG_PKG_USING_FASTLZ is not set
|
||||
# CONFIG_PKG_USING_MINILZO is not set
|
||||
# CONFIG_PKG_USING_QUICKLZ is not set
|
||||
# CONFIG_PKG_USING_LZMA is not set
|
||||
# CONFIG_PKG_USING_MULTIBUTTON is not set
|
||||
# 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
|
||||
|
@ -354,7 +527,25 @@ CONFIG_RT_USING_PIN=y
|
|||
# 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_NNOM is not set
|
||||
# CONFIG_PKG_USING_KI is not set
|
||||
# CONFIG_PKG_USING_ARMv7M_DWT is not set
|
||||
# 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_SOC_FAMILY_STM32=y
|
||||
CONFIG_SOC_SERIES_STM32F4=y
|
||||
|
||||
|
@ -369,11 +560,12 @@ CONFIG_SOC_STM32F407ZG=y
|
|||
CONFIG_BSP_USING_USB_TO_USART=y
|
||||
# CONFIG_BSP_USING_COM2 is not set
|
||||
# CONFIG_BSP_USING_COM3 is not set
|
||||
# CONFIG_BSP_USING_SRAM is not set
|
||||
# CONFIG_BSP_USING_SPI_FLASH is not set
|
||||
# CONFIG_BSP_USING_EEPROM is not set
|
||||
# CONFIG_BSP_USING_ETH is not set
|
||||
# CONFIG_BSP_USING_MPU6050 is not set
|
||||
# CONFIG_BSP_USING_SDCARD is not set
|
||||
# CONFIG_BSP_USING_FS is not set
|
||||
|
||||
#
|
||||
# On-chip Peripheral Drivers
|
||||
|
@ -394,9 +586,17 @@ CONFIG_BSP_USING_UART1=y
|
|||
# CONFIG_BSP_USING_SPI is not set
|
||||
# CONFIG_BSP_USING_ADC is not set
|
||||
# CONFIG_BSP_USING_I2C1 is not set
|
||||
# CONFIG_BSP_USING_DAC is not set
|
||||
# CONFIG_BSP_USING_ONCHIP_RTC is not set
|
||||
# CONFIG_BSP_USING_WDT is not set
|
||||
# CONFIG_BSP_USING_SDIO is not set
|
||||
# CONFIG_BSP_USING_USBD is not set
|
||||
# CONFIG_BSP_USING_USBH is not set
|
||||
# CONFIG_BSP_USING_PULSE_ENCODER is not set
|
||||
# CONFIG_BSP_USING_EXT_FMC_IO is not set
|
||||
# CONFIG_BSP_USING_FMC is not set
|
||||
# CONFIG_BSP_USING_RNG is not set
|
||||
# CONFIG_BSP_USING_UDID is not set
|
||||
|
||||
#
|
||||
# Board extended module Drivers
|
||||
|
|
|
@ -71,8 +71,15 @@ menu "Onboard Peripheral Drivers"
|
|||
select BSP_USING_I2C1
|
||||
select PKG_USING_MPU6XXX
|
||||
|
||||
menuconfig BSP_USING_FS
|
||||
bool "Enable filesystem"
|
||||
select RT_USING_DFS
|
||||
select RT_USING_DFS_ROMFS
|
||||
default n
|
||||
|
||||
if BSP_USING_FS
|
||||
config BSP_USING_SDCARD
|
||||
bool "Enable SDCARD (sdio)"
|
||||
bool "Enable SDCARD (FATFS)"
|
||||
select BSP_USING_SDIO
|
||||
select RT_USING_DFS
|
||||
select RT_USING_DFS_ELMFAT
|
||||
|
@ -83,6 +90,7 @@ menu "Onboard Peripheral Drivers"
|
|||
range 0 24000000
|
||||
depends on BSP_USING_SDCARD
|
||||
default 1000000
|
||||
endif
|
||||
|
||||
endmenu
|
||||
|
||||
|
|
|
@ -18,8 +18,8 @@ if GetDepend(['BSP_USING_ETH']):
|
|||
if GetDepend(['BSP_USING_SPI_FLASH']):
|
||||
src += Glob('ports/spi_flash_init.c')
|
||||
|
||||
if GetDepend(['BSP_USING_SDCARD']):
|
||||
src += Glob('ports/drv_sdcard.c')
|
||||
if GetDepend(['BSP_USING_FS']):
|
||||
src += Glob('ports/drv_filesystem.c')
|
||||
|
||||
if GetDepend(['BSP_USING_SRAM']):
|
||||
src += Glob('ports/drv_sram.c')
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2018-12-13 balanceTWK add sdcard port file
|
||||
* 2021-05-10 Meco Man fix a bug that cannot use fatfs in the main thread at starting up
|
||||
* 2021-07-28 Meco Man implement romfs as the root filesystem
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
|
||||
#ifdef BSP_USING_FS
|
||||
#include <dfs_romfs.h>
|
||||
#include <dfs_fs.h>
|
||||
#include <dfs_posix.h>
|
||||
|
||||
#if DFS_FILESYSTEMS_MAX < 4
|
||||
#error "Please define DFS_FILESYSTEMS_MAX more than 4"
|
||||
#endif
|
||||
#if DFS_FILESYSTEM_TYPES_MAX < 4
|
||||
#error "Please define DFS_FILESYSTEM_TYPES_MAX more than 4"
|
||||
#endif
|
||||
|
||||
#define DBG_TAG "app.filesystem"
|
||||
#define DBG_LVL DBG_INFO
|
||||
#include <rtdbg.h>
|
||||
|
||||
#ifdef BSP_USING_SDCARD
|
||||
static void sd_mount(void *parameter)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
rt_thread_mdelay(500);
|
||||
if(rt_device_find("sd0") != RT_NULL)
|
||||
{
|
||||
if (dfs_mount("sd0", "/sdcard", "elm", 0, 0) == RT_EOK)
|
||||
{
|
||||
LOG_I("sd card mount to '/sdcard'");
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_W("sd card mount to '/sdcard' failed!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int onboard_sdcard_mount(void)
|
||||
{
|
||||
rt_thread_t tid;
|
||||
|
||||
if (dfs_mount("sd0", "/sdcard", "elm", 0, 0) == RT_EOK)
|
||||
{
|
||||
LOG_I("sd card mount to '/sdcard'");
|
||||
}
|
||||
else
|
||||
{
|
||||
tid = rt_thread_create("sd_mount", sd_mount, RT_NULL,
|
||||
1024, RT_THREAD_PRIORITY_MAX - 2, 20);
|
||||
if (tid != RT_NULL)
|
||||
{
|
||||
rt_thread_startup(tid);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_E("create sd_mount thread err!");
|
||||
}
|
||||
}
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct romfs_dirent _romfs_root[] =
|
||||
{
|
||||
#ifdef BSP_USING_SDCARD
|
||||
{ROMFS_DIRENT_DIR, "sdcard", RT_NULL, 0},
|
||||
#endif
|
||||
// {ROMFS_DIRENT_DIR, "flash", RT_NULL, 0},
|
||||
};
|
||||
|
||||
const struct romfs_dirent romfs_root =
|
||||
{
|
||||
ROMFS_DIRENT_DIR, "/", (rt_uint8_t *)_romfs_root, sizeof(_romfs_root) / sizeof(_romfs_root[0])
|
||||
};
|
||||
|
||||
static int filesystem_mount(void)
|
||||
{
|
||||
if (dfs_mount(RT_NULL, "/", "rom", 0, &(romfs_root)) != 0)
|
||||
{
|
||||
LOG_E("rom mount to '/' failed!");
|
||||
}
|
||||
#ifdef BSP_USING_SDCARD
|
||||
onboard_sdcard_mount();
|
||||
#endif
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
INIT_APP_EXPORT(filesystem_mount);
|
||||
|
||||
#endif /* BSP_USING_FS */
|
|
@ -1,70 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2018-12-13 balanceTWK add sdcard port file
|
||||
* 2021-05-10 Meco Man fix a bug that cannot use fatfs in the main thread at starting up
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
|
||||
#ifdef BSP_USING_SDCARD
|
||||
|
||||
#include <dfs_elm.h>
|
||||
#include <dfs_fs.h>
|
||||
#include <dfs_posix.h>
|
||||
|
||||
#define DBG_TAG "app.card"
|
||||
#define DBG_LVL DBG_INFO
|
||||
#include <rtdbg.h>
|
||||
|
||||
static void sd_mount(void *parameter)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
rt_thread_mdelay(500);
|
||||
if(rt_device_find("sd0") != RT_NULL)
|
||||
{
|
||||
if (dfs_mount("sd0", "/", "elm", 0, 0) == RT_EOK)
|
||||
{
|
||||
LOG_I("sd card mount to '/'");
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_W("sd card mount to '/' failed!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int onboard_sdcard_mount(void)
|
||||
{
|
||||
rt_thread_t tid;
|
||||
|
||||
if (dfs_mount("sd0", "/", "elm", 0, 0) == RT_EOK)
|
||||
{
|
||||
LOG_I("sd card mount to '/'");
|
||||
}
|
||||
else
|
||||
{
|
||||
tid = rt_thread_create("sd_mount", sd_mount, RT_NULL,
|
||||
1024, RT_THREAD_PRIORITY_MAX - 2, 20);
|
||||
if (tid != RT_NULL)
|
||||
{
|
||||
rt_thread_startup(tid);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_E("create sd_mount thread err!");
|
||||
}
|
||||
}
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
INIT_APP_EXPORT(onboard_sdcard_mount);
|
||||
|
||||
#endif /* BSP_USING_SDCARD */
|
|
@ -16,6 +16,9 @@
|
|||
#define RT_USING_IDLE_HOOK
|
||||
#define RT_IDLE_HOOK_LIST_SIZE 4
|
||||
#define IDLE_THREAD_STACK_SIZE 1024
|
||||
|
||||
/* kservice optimization */
|
||||
|
||||
#define RT_DEBUG
|
||||
#define RT_DEBUG_COLOR
|
||||
|
||||
|
@ -39,7 +42,7 @@
|
|||
#define RT_USING_CONSOLE
|
||||
#define RT_CONSOLEBUF_SIZE 128
|
||||
#define RT_CONSOLE_DEVICE_NAME "uart1"
|
||||
#define RT_VER_NUM 0x40002
|
||||
#define RT_VER_NUM 0x40004
|
||||
#define ARCH_ARM
|
||||
#define RT_USING_CPU_FFS
|
||||
#define ARCH_ARM_CORTEX_M
|
||||
|
@ -79,21 +82,18 @@
|
|||
#define RT_USING_DEVICE_IPC
|
||||
#define RT_PIPE_BUFSZ 512
|
||||
#define RT_USING_SERIAL
|
||||
#define RT_USING_SERIAL_V1
|
||||
#define RT_SERIAL_USING_DMA
|
||||
#define RT_SERIAL_RB_BUFSZ 64
|
||||
#define RT_USING_PIN
|
||||
|
||||
/* Using Hardware Crypto drivers */
|
||||
|
||||
|
||||
/* Using WiFi */
|
||||
|
||||
|
||||
/* Using USB */
|
||||
|
||||
|
||||
/* POSIX layer and C standard library */
|
||||
|
||||
#define RT_LIBC_USING_TIME
|
||||
#define RT_LIBC_DEFAULT_TIMEZONE 8
|
||||
|
||||
/* Network */
|
||||
|
||||
|
@ -106,9 +106,6 @@
|
|||
/* light weight TCP/IP stack */
|
||||
|
||||
|
||||
/* Modbus master and slave stack */
|
||||
|
||||
|
||||
/* AT commands */
|
||||
|
||||
|
||||
|
@ -118,6 +115,9 @@
|
|||
/* Utilities */
|
||||
|
||||
|
||||
/* RT-Thread Utestcases */
|
||||
|
||||
|
||||
/* RT-Thread online packages */
|
||||
|
||||
/* IoT - internet of things */
|
||||
|
@ -149,14 +149,23 @@
|
|||
/* system packages */
|
||||
|
||||
|
||||
/* Micrium: Micrium software products porting for RT-Thread */
|
||||
|
||||
|
||||
/* peripheral libraries and drivers */
|
||||
|
||||
|
||||
/* AI packages */
|
||||
|
||||
|
||||
/* miscellaneous packages */
|
||||
|
||||
|
||||
/* samples: kernel and components samples */
|
||||
|
||||
|
||||
/* entertainment: terminal games and other interesting software packages */
|
||||
|
||||
#define SOC_FAMILY_STM32
|
||||
#define SOC_SERIES_STM32F4
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#ifndef DFS_SELECT_H__
|
||||
#define DFS_SELECT_H__
|
||||
|
||||
#include <libc/libc_fdset.h>
|
||||
#include <sys/select.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
@ -69,7 +69,7 @@ rt_err_t rt_workqueue_critical_work(struct rt_workqueue *queue, struct rt_work *
|
|||
#ifdef RT_USING_SYSTEM_WORKQUEUE
|
||||
rt_err_t rt_work_submit(struct rt_work *work, rt_tick_t time);
|
||||
rt_err_t rt_work_cancel(struct rt_work *work);
|
||||
#endif
|
||||
#endif /* RT_USING_SYSTEM_WORKQUEUE */
|
||||
|
||||
rt_inline void rt_work_init(struct rt_work *work, void (*work_func)(struct rt_work *work, void *work_data),
|
||||
void *work_data)
|
||||
|
@ -85,7 +85,6 @@ rt_inline void rt_work_init(struct rt_work *work, void (*work_func)(struct rt_wo
|
|||
void rt_delayed_work_init(struct rt_delayed_work *work, void (*work_func)(struct rt_work *work,
|
||||
void *work_data), void *work_data);
|
||||
|
||||
int rt_work_sys_workqueue_init(void);
|
||||
#endif
|
||||
#endif /* RT_USING_HEAP */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -358,7 +358,7 @@ rt_err_t rt_work_cancel(struct rt_work *work)
|
|||
return rt_workqueue_cancel_work(sys_workq, work);
|
||||
}
|
||||
|
||||
int rt_work_sys_workqueue_init(void)
|
||||
static int rt_work_sys_workqueue_init(void)
|
||||
{
|
||||
if (sys_workq != RT_NULL)
|
||||
return RT_EOK;
|
||||
|
@ -370,5 +370,5 @@ int rt_work_sys_workqueue_init(void)
|
|||
return RT_EOK;
|
||||
}
|
||||
INIT_PREV_EXPORT(rt_work_sys_workqueue_init);
|
||||
#endif
|
||||
#endif
|
||||
#endif /* RT_USING_SYSTEM_WORKQUEUE */
|
||||
#endif /* RT_USING_HEAP */
|
||||
|
|
|
@ -9,14 +9,8 @@
|
|||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <rthw.h>
|
||||
#include <rtdevice.h>
|
||||
#include <rtthread.h>
|
||||
|
||||
#include <dfs_posix.h>
|
||||
|
||||
#include "posix_aio.h"
|
||||
|
||||
struct rt_workqueue* aio_queue = NULL;
|
||||
|
|
|
@ -11,6 +11,10 @@
|
|||
#ifndef POSIX_AIO_H__
|
||||
#define POSIX_AIO_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/signal.h>
|
||||
#include <rtdevice.h>
|
||||
|
||||
struct aiocb
|
||||
{
|
||||
int aio_fildes; /* File descriptor. */
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
* Date Author Notes
|
||||
* 2021-05-22 Meco Man The first version.
|
||||
*/
|
||||
#ifndef _SYS_ERRNO_H
|
||||
#define _SYS_ERRNO_H
|
||||
#ifndef __SYS_ERRNO_H__
|
||||
#define __SYS_ERRNO_H__
|
||||
|
||||
#if defined(__ARMCC_VERSION)
|
||||
/*
|
||||
|
|
|
@ -6,3 +6,8 @@
|
|||
* Change Logs:
|
||||
* Date Author Notes
|
||||
*/
|
||||
|
||||
#ifndef __SYS_STAT_H__
|
||||
#define __SYS_STAT_H__
|
||||
|
||||
#endif
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
* 2020-09-05 Meco Man fix bugs
|
||||
* 2020-12-16 Meco Man add useconds_t
|
||||
*/
|
||||
#ifndef __TYPES_H__
|
||||
#define __TYPES_H__
|
||||
#ifndef __SYS_TYPES_H__
|
||||
#define __SYS_TYPES_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
* Date Author Notes
|
||||
* 2020-12-16 Meco Man add usleep
|
||||
*/
|
||||
#ifndef _SYS_UNISTD_H
|
||||
#define _SYS_UNISTD_H
|
||||
#ifndef __SYS_UNISTD_H__
|
||||
#define __SYS_UNISTD_H__
|
||||
|
||||
#include <rtconfig.h>
|
||||
#include "types.h"
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2021-07-21 Meco Man The first version
|
||||
*/
|
||||
|
||||
#ifndef __SYS_SELECT_H__
|
||||
#define __SYS_SELECT_H__
|
||||
|
||||
#include <rtconfig.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef FD_SETSIZE
|
||||
#define FD_SETSIZE 32
|
||||
#endif
|
||||
|
||||
#ifdef SAL_USING_POSIX
|
||||
#ifdef FD_SETSIZE
|
||||
#undef FD_SETSIZE
|
||||
#endif
|
||||
#define FD_SETSIZE DFS_FD_MAX
|
||||
#endif /* SAL_USING_POSIX */
|
||||
|
||||
#define NBBY 8 /* number of bits in a byte */
|
||||
|
||||
typedef long fd_mask;
|
||||
|
||||
#define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */
|
||||
#ifndef howmany
|
||||
#define howmany(x,y) (((x)+((y)-1))/(y))
|
||||
#endif
|
||||
|
||||
#ifndef _SYS_TYPES_FD_SET /* MIPS */
|
||||
typedef struct _types_fd_set {
|
||||
fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
|
||||
} _types_fd_set;
|
||||
#define fd_set _types_fd_set
|
||||
|
||||
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
|
||||
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
|
||||
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
|
||||
#define FD_ZERO(p) memset((void*)(p), 0, sizeof(*(p)))
|
||||
#endif /* _SYS_TYPES_FD_SET */
|
||||
|
||||
#endif /* __SYS_SELECT_H__ */
|
|
@ -6,33 +6,27 @@
|
|||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2017-09-12 Bernard The first version
|
||||
* 2021-07-21 Meco Man move to libc/common
|
||||
*/
|
||||
|
||||
#ifndef LIBC_SIGNAL_H__
|
||||
#define LIBC_SIGNAL_H__
|
||||
#ifndef __SYS_SIGNAL_H__
|
||||
#define __SYS_SIGNAL_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#ifdef HAVE_CCONFIG_H
|
||||
#include <cconfig.h>
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SIGVAL
|
||||
/* Signal Generation and Delivery, P1003.1b-1993, p. 63
|
||||
NOTE: P1003.1c/D10, p. 34 adds sigev_notify_function and
|
||||
sigev_notify_attributes to the sigevent structure. */
|
||||
|
||||
union sigval
|
||||
{
|
||||
int sival_int; /* Integer signal value */
|
||||
void *sival_ptr; /* Pointer signal value */
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SIGEVENT
|
||||
struct sigevent
|
||||
{
|
||||
int sigev_notify; /* Notification type */
|
||||
|
@ -42,9 +36,7 @@ struct sigevent
|
|||
/* Notification function */
|
||||
void *sigev_notify_attributes; /* Notification Attributes, really pthread_attr_t */
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SIGINFO
|
||||
struct siginfo
|
||||
{
|
||||
uint16_t si_signo;
|
||||
|
@ -53,26 +45,37 @@ struct siginfo
|
|||
union sigval si_value;
|
||||
};
|
||||
typedef struct siginfo siginfo_t;
|
||||
#endif
|
||||
|
||||
#define SI_USER 0x01 /* Signal sent by kill(). */
|
||||
#define SI_QUEUE 0x02 /* Signal sent by sigqueue(). */
|
||||
#define SI_TIMER 0x03 /* Signal generated by expiration of a
|
||||
timer set by timer_settime(). */
|
||||
#define SI_ASYNCIO 0x04 /* Signal generated by completion of an
|
||||
asynchronous I/O request. */
|
||||
#define SI_MESGQ 0x05 /* Signal generated by arrival of a
|
||||
message on an empty message queue. */
|
||||
#define SI_TIMER 0x03 /* Signal generated by expiration of a timer set by timer_settime(). */
|
||||
#define SI_ASYNCIO 0x04 /* Signal generated by completion of an asynchronous I/O request. */
|
||||
#define SI_MESGQ 0x05 /* Signal generated by arrival of a message on an empty message queue. */
|
||||
|
||||
#if !defined(RT_USING_NEWLIB)
|
||||
typedef void (*_sig_func_ptr)(int);
|
||||
typedef unsigned long sigset_t;
|
||||
#endif
|
||||
|
||||
#include <signal.h>
|
||||
struct sigaction
|
||||
{
|
||||
_sig_func_ptr sa_handler;
|
||||
sigset_t sa_mask;
|
||||
int sa_flags;
|
||||
};
|
||||
|
||||
#define SIG_SETMASK 0 /* set mask with sigprocmask() */
|
||||
#define SIG_BLOCK 1 /* set of signals to block */
|
||||
#define SIG_UNBLOCK 2 /* set of signals to, well, unblock */
|
||||
|
||||
#define sigaddset(what,sig) (*(what) |= (1<<(sig)), 0)
|
||||
#define sigdelset(what,sig) (*(what) &= ~(1<<(sig)), 0)
|
||||
#define sigemptyset(what) (*(what) = 0, 0)
|
||||
#define sigfillset(what) (*(what) = ~(0), 0)
|
||||
#define sigismember(what,sig) (((*(what)) & (1<<(sig))) != 0)
|
||||
|
||||
int sigprocmask (int how, const sigset_t *set, sigset_t *oset);
|
||||
int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
|
||||
|
||||
#ifdef __ARMCC_VERSION
|
||||
|
||||
#define SIGHUP 1
|
||||
/* #define SIGINT 2 */
|
||||
#define SIGQUIT 3
|
||||
|
@ -103,28 +106,9 @@ typedef unsigned long sigset_t;
|
|||
#define SIGRTMAX 31
|
||||
#define NSIG 32
|
||||
|
||||
#define SIG_SETMASK 0 /* set mask with sigprocmask() */
|
||||
#define SIG_BLOCK 1 /* set of signals to block */
|
||||
#define SIG_UNBLOCK 2 /* set of signals to, well, unblock */
|
||||
|
||||
struct sigaction
|
||||
{
|
||||
_sig_func_ptr sa_handler;
|
||||
sigset_t sa_mask;
|
||||
int sa_flags;
|
||||
};
|
||||
|
||||
#define sigaddset(what,sig) (*(what) |= (1<<(sig)), 0)
|
||||
#define sigdelset(what,sig) (*(what) &= ~(1<<(sig)), 0)
|
||||
#define sigemptyset(what) (*(what) = 0, 0)
|
||||
#define sigfillset(what) (*(what) = ~(0), 0)
|
||||
#define sigismember(what,sig) (((*(what)) & (1<<(sig))) != 0)
|
||||
|
||||
int sigprocmask (int how, const sigset_t *set, sigset_t *oset);
|
||||
int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
|
||||
#include <signal.h>
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__)
|
||||
|
||||
#define SIGHUP 1
|
||||
#define SIGINT 2
|
||||
#define SIGQUIT 3
|
||||
|
@ -155,25 +139,51 @@ int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact)
|
|||
#define SIGRTMAX 31
|
||||
#define NSIG 32
|
||||
|
||||
#define SIG_SETMASK 0 /* set mask with sigprocmask() */
|
||||
#define SIG_BLOCK 1 /* set of signals to block */
|
||||
#define SIG_UNBLOCK 2 /* set of signals to, well, unblock */
|
||||
#include <signal.h>
|
||||
|
||||
struct sigaction
|
||||
{
|
||||
_sig_func_ptr sa_handler;
|
||||
sigset_t sa_mask;
|
||||
int sa_flags;
|
||||
};
|
||||
#elif defined(__GNUC__)
|
||||
#define SIGHUP 1 /* hangup */
|
||||
#define SIGINT 2 /* interrupt */
|
||||
#define SIGQUIT 3 /* quit */
|
||||
#define SIGILL 4 /* illegal instruction (not reset when caught) */
|
||||
#define SIGTRAP 5 /* trace trap (not reset when caught) */
|
||||
#define SIGIOT 6 /* IOT instruction */
|
||||
#define SIGABRT 6 /* used by abort, replace SIGIOT in the future */
|
||||
#define SIGEMT 7 /* EMT instruction */
|
||||
#define SIGFPE 8 /* floating point exception */
|
||||
#define SIGKILL 9 /* kill (cannot be caught or ignored) */
|
||||
#define SIGBUS 10 /* bus error */
|
||||
#define SIGSEGV 11 /* segmentation violation */
|
||||
#define SIGSYS 12 /* bad argument to system call */
|
||||
#define SIGPIPE 13 /* write on a pipe with no one to read it */
|
||||
#define SIGALRM 14 /* alarm clock */
|
||||
#define SIGTERM 15 /* software termination signal from kill */
|
||||
#define SIGURG 16 /* urgent condition on IO channel */
|
||||
#define SIGSTOP 17 /* sendable stop signal not from tty */
|
||||
#define SIGTSTP 18 /* stop signal from tty */
|
||||
#define SIGCONT 19 /* continue a stopped process */
|
||||
#define SIGCHLD 20 /* to parent on child stop or exit */
|
||||
#define SIGCLD 20 /* System V name for SIGCHLD */
|
||||
#define SIGTTIN 21 /* to readers pgrp upon background tty read */
|
||||
#define SIGTTOU 22 /* like TTIN for output if (tp->t_local<OSTOP) */
|
||||
#define SIGIO 23 /* input/output possible signal */
|
||||
#define SIGPOLL SIGIO /* System V name for SIGIO */
|
||||
#define SIGXCPU 24 /* exceeded CPU time limit */
|
||||
#define SIGXFSZ 25 /* exceeded file size limit */
|
||||
#define SIGVTALRM 26 /* virtual time alarm */
|
||||
#define SIGPROF 27 /* profiling time alarm */
|
||||
#define SIGWINCH 28 /* window changed */
|
||||
#define SIGLOST 29 /* resource lost (eg, record-lock lost) */
|
||||
#define SIGUSR1 30 /* user defined signal 1 */
|
||||
#define SIGUSR2 31 /* user defined signal 2 */
|
||||
#define NSIG 32 /* signal 0 implied */
|
||||
|
||||
#define sigaddset(what,sig) (*(what) |= (1<<(sig)), 0)
|
||||
#define sigdelset(what,sig) (*(what) &= ~(1<<(sig)), 0)
|
||||
#define sigemptyset(what) (*(what) = 0, 0)
|
||||
#define sigfillset(what) (*(what) = ~(0), 0)
|
||||
#define sigismember(what,sig) (((*(what)) & (1<<(sig))) != 0)
|
||||
#ifndef _SIGNAL_H_
|
||||
/* Some applications take advantage of the fact that <sys/signal.h>
|
||||
* and <signal.h> are equivalent in glibc. Allow for that here. */
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
int sigprocmask (int how, const sigset_t *set, sigset_t *oset);
|
||||
int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
|
@ -8,6 +8,7 @@
|
|||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <sys/signal.h>
|
||||
#include "mqueue.h"
|
||||
#include "pthread_internal.h"
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
* Date Author Notes
|
||||
* 2017/10/1 Bernard The first version
|
||||
*/
|
||||
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
|
||||
|
@ -14,6 +15,7 @@
|
|||
#include <sys/errno.h>
|
||||
|
||||
#include "posix_signal.h"
|
||||
|
||||
#define sig_valid(sig_no) (sig_no >= 0 && sig_no < RT_SIG_MAX)
|
||||
|
||||
void (*signal(int sig, void (*func)(int))) (int)
|
||||
|
@ -79,13 +81,10 @@ int sigtimedwait(const sigset_t *set, siginfo_t *info,
|
|||
int ret = 0;
|
||||
int tick = RT_WAITING_FOREVER;
|
||||
|
||||
#ifdef RT_USING_PTHREADS
|
||||
if (timeout)
|
||||
{
|
||||
extern int clock_time_to_tick(const struct timespec *time);
|
||||
tick = rt_timespec_to_tick(timeout);
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = rt_signal_wait(set, info, tick);
|
||||
if (ret == 0) return 0;
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <sys/signal.h>
|
||||
|
||||
enum rt_signal_value{
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/errno.h>
|
||||
|
||||
#include <at_socket.h>
|
||||
#include <at_device.h>
|
||||
|
@ -78,7 +79,7 @@ struct at_socket *at_get_socket(int socket)
|
|||
}
|
||||
|
||||
/* get a block to the AT socket receive list*/
|
||||
static size_t at_recvpkt_put(rt_slist_t *rlist, const char *ptr, size_t length)
|
||||
static rt_err_t at_recvpkt_put(rt_slist_t *rlist, const char *ptr, size_t length)
|
||||
{
|
||||
at_recv_pkt_t pkt = RT_NULL;
|
||||
|
||||
|
@ -86,7 +87,7 @@ static size_t at_recvpkt_put(rt_slist_t *rlist, const char *ptr, size_t length)
|
|||
if (pkt == RT_NULL)
|
||||
{
|
||||
LOG_E("No memory for receive packet table!");
|
||||
return 0;
|
||||
return -RT_ENOMEM;
|
||||
}
|
||||
|
||||
pkt->bfsz_totle = length;
|
||||
|
@ -95,7 +96,7 @@ static size_t at_recvpkt_put(rt_slist_t *rlist, const char *ptr, size_t length)
|
|||
|
||||
rt_slist_append(rlist, &pkt->list);
|
||||
|
||||
return length;
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
/* delete and free all receive buffer list */
|
||||
|
@ -651,14 +652,20 @@ static void at_recv_notice_cb(struct at_socket *sock, at_socket_evt_t event, con
|
|||
RT_ASSERT(event == AT_SOCKET_EVT_RECV);
|
||||
|
||||
/* check the socket object status */
|
||||
if (sock->magic != AT_SOCKET_MAGIC)
|
||||
if (sock->magic != AT_SOCKET_MAGIC || sock->state == AT_SOCKET_CLOSED)
|
||||
{
|
||||
rt_free((void *)buff);
|
||||
return;
|
||||
}
|
||||
|
||||
/* put receive buffer to receiver packet list */
|
||||
rt_mutex_take(sock->recv_lock, RT_WAITING_FOREVER);
|
||||
at_recvpkt_put(&(sock->recvpkt_list), buff, bfsz);
|
||||
if (at_recvpkt_put(&(sock->recvpkt_list), buff, bfsz) != RT_EOK)
|
||||
{
|
||||
rt_free((void *)buff);
|
||||
rt_mutex_release(sock->recv_lock);
|
||||
return;
|
||||
}
|
||||
rt_mutex_release(sock->recv_lock);
|
||||
|
||||
rt_sem_release(sock->recv_notice);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
* 2018-04-12 chenyong add client implement
|
||||
* 2018-08-17 chenyong multiple client support
|
||||
* 2021-03-17 Meco Man fix a buf of leaking memory
|
||||
* 2021-07-14 Sszl fix a buf of leaking memory
|
||||
*/
|
||||
|
||||
#include <at.h>
|
||||
|
@ -571,30 +572,19 @@ int at_obj_set_urc_table(at_client_t client, const struct at_urc *urc_table, rt_
|
|||
}
|
||||
else
|
||||
{
|
||||
struct at_urc_table *old_urc_table = RT_NULL;
|
||||
size_t old_table_size = client->urc_table_size * sizeof(struct at_urc_table);
|
||||
|
||||
old_urc_table = (struct at_urc_table *) rt_malloc(old_table_size);
|
||||
if (old_urc_table == RT_NULL)
|
||||
{
|
||||
return -RT_ENOMEM;
|
||||
}
|
||||
rt_memcpy(old_urc_table, client->urc_table, old_table_size);
|
||||
struct at_urc_table *new_urc_table = RT_NULL;
|
||||
|
||||
/* realloc urc table space */
|
||||
client->urc_table = (struct at_urc_table *) rt_realloc(client->urc_table,
|
||||
old_table_size + sizeof(struct at_urc_table));
|
||||
if (client->urc_table == RT_NULL)
|
||||
new_urc_table = (struct at_urc_table *) rt_realloc(client->urc_table,client->urc_table_size * sizeof(struct at_urc_table) + sizeof(struct at_urc_table));
|
||||
if (new_urc_table == RT_NULL)
|
||||
{
|
||||
rt_free(old_urc_table);
|
||||
return -RT_ENOMEM;
|
||||
}
|
||||
rt_memcpy(client->urc_table, old_urc_table, old_table_size);
|
||||
client->urc_table = new_urc_table;
|
||||
client->urc_table[client->urc_table_size].urc = urc_table;
|
||||
client->urc_table[client->urc_table_size].urc_size = table_sz;
|
||||
client->urc_table_size++;
|
||||
|
||||
rt_free(old_urc_table);
|
||||
}
|
||||
|
||||
return RT_EOK;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2015-02-17 Bernard First version
|
||||
* 2108-05-24 ChenYong Add socket abstraction layer
|
||||
* 2018-05-24 ChenYong Add socket abstraction layer
|
||||
*/
|
||||
|
||||
#ifndef NETDB_H__
|
||||
|
|
|
@ -83,7 +83,7 @@ static void thread3_entry(void *param)
|
|||
int event_simple_init()
|
||||
{
|
||||
/* 初始化事件对象 */
|
||||
rt_event_init(&event, "event", RT_IPC_FLAG_FIFO);
|
||||
rt_event_init(&event, "event", RT_IPC_FLAG_PRIO);
|
||||
|
||||
/* 创建线程1 */
|
||||
tid1 = rt_thread_create("t1",
|
||||
|
|
|
@ -82,7 +82,7 @@ int mbox_send_wait_init()
|
|||
"mbt", /* 名称是mbt */
|
||||
&mb_pool[0], /* 邮箱用到的内存池是mb_pool */
|
||||
sizeof(mb_pool)/4, /* 大小是mb_pool大小除以4,因为一封邮件的大小是4字节 */
|
||||
RT_IPC_FLAG_FIFO); /* 采用FIFO方式进行线程等待 */
|
||||
RT_IPC_FLAG_PRIO); /* 采用PRIO方式进行线程等待 */
|
||||
|
||||
/* 创建线程1 */
|
||||
tid1 = rt_thread_create("t1",
|
||||
|
|
|
@ -80,7 +80,7 @@ int mbox_simple_init()
|
|||
"mbt", /* 名称是mbt */
|
||||
&mb_pool[0], /* 邮箱用到的内存池是mb_pool */
|
||||
sizeof(mb_pool)/4, /* 大小是mb_pool大小除以4,因为一封邮件的大小是4字节 */
|
||||
RT_IPC_FLAG_FIFO); /* 采用FIFO方式进行线程等待 */
|
||||
RT_IPC_FLAG_PRIO); /* 采用PRIO方式进行线程等待 */
|
||||
|
||||
/* 创建线程1 */
|
||||
tid1 = rt_thread_create("t1",
|
||||
|
|
|
@ -98,7 +98,7 @@ int messageq_simple_init()
|
|||
&msg_pool[0], /* 内存池指向msg_pool */
|
||||
128 - sizeof(void*), /* 每个消息的大小是 128 - void* */
|
||||
sizeof(msg_pool), /* 内存池的大小是msg_pool的大小 */
|
||||
RT_IPC_FLAG_FIFO); /* 如果有多个线程等待,按照先来先得到的方法分配消息 */
|
||||
RT_IPC_FLAG_PRIO); /* 如果有多个线程等待,按照优先级由高到低的方法分配消息 */
|
||||
|
||||
/* 创建线程1 */
|
||||
tid1 = rt_thread_create("t1",
|
||||
|
|
|
@ -281,7 +281,7 @@ static void thread29_entry(void* parameter)
|
|||
static int mutex_simple_init()
|
||||
{
|
||||
/* 创建互斥锁 */
|
||||
mutex = rt_mutex_create("mutex", RT_IPC_FLAG_FIFO);
|
||||
mutex = rt_mutex_create("mutex", RT_IPC_FLAG_PRIO);
|
||||
if (mutex == RT_NULL)
|
||||
{
|
||||
tc_stat(TC_STAT_END | TC_STAT_FAILED);
|
||||
|
|
|
@ -87,7 +87,7 @@ static void thread3_entry(void* parameter)
|
|||
int mutex_simple_init()
|
||||
{
|
||||
/* 创建互斥锁 */
|
||||
mutex = rt_mutex_create("mutex", RT_IPC_FLAG_FIFO);
|
||||
mutex = rt_mutex_create("mutex", RT_IPC_FLAG_PRIO);
|
||||
if (mutex == RT_NULL)
|
||||
{
|
||||
tc_stat(TC_STAT_END | TC_STAT_FAILED);
|
||||
|
|
|
@ -209,7 +209,7 @@ int semaphore_buffer_worker_init()
|
|||
rb_init(&working_rb, working_buffer, BUFFER_SIZE);
|
||||
|
||||
/* 创建信号量 */
|
||||
sem = rt_sem_create("sem", 1, RT_IPC_FLAG_FIFO);
|
||||
sem = rt_sem_create("sem", 1, RT_IPC_FLAG_PRIO);
|
||||
if (sem == RT_NULL)
|
||||
{
|
||||
tc_stat(TC_STAT_END | TC_STAT_FAILED);
|
||||
|
|
|
@ -78,7 +78,7 @@ static void thread_entry(void* parameter)
|
|||
int semaphore_dynamic_init()
|
||||
{
|
||||
/* 创建一个信号量,初始值是0 */
|
||||
sem = rt_sem_create("sem", 0, RT_IPC_FLAG_FIFO);
|
||||
sem = rt_sem_create("sem", 0, RT_IPC_FLAG_PRIO);
|
||||
if (sem == RT_NULL)
|
||||
{
|
||||
tc_stat(TC_STAT_END | TC_STAT_FAILED);
|
||||
|
|
|
@ -98,9 +98,9 @@ void consumer_thread_entry(void* parameter)
|
|||
int semaphore_producer_consumer_init()
|
||||
{
|
||||
/* 初始化3个信号量 */
|
||||
rt_sem_init(&sem_lock , "lock", 1, RT_IPC_FLAG_FIFO);
|
||||
rt_sem_init(&sem_empty, "empty", MAXSEM, RT_IPC_FLAG_FIFO);
|
||||
rt_sem_init(&sem_full , "full", 0, RT_IPC_FLAG_FIFO);
|
||||
rt_sem_init(&sem_lock , "lock", 1, RT_IPC_FLAG_PRIO);
|
||||
rt_sem_init(&sem_empty, "empty", MAXSEM, RT_IPC_FLAG_PRIO);
|
||||
rt_sem_init(&sem_full , "full", 0, RT_IPC_FLAG_PRIO);
|
||||
|
||||
/* 创建线程1 */
|
||||
producer_tid = rt_thread_create("producer",
|
||||
|
|
|
@ -81,7 +81,7 @@ int semaphore_static_init(void)
|
|||
rt_err_t result;
|
||||
|
||||
/* 初始化信号量,初始值是0 */
|
||||
result = rt_sem_init(&sem, "sem", 0, RT_IPC_FLAG_FIFO);
|
||||
result = rt_sem_init(&sem, "sem", 0, RT_IPC_FLAG_PRIO);
|
||||
if (result != RT_EOK)
|
||||
{
|
||||
tc_stat(TC_STAT_END | TC_STAT_FAILED);
|
||||
|
|
|
@ -35,7 +35,7 @@ void tc_thread_entry(void* parameter)
|
|||
struct finsh_syscall* index;
|
||||
|
||||
/* create tc semaphore */
|
||||
rt_sem_init(&_tc_sem, "tc", 0, RT_IPC_FLAG_FIFO);
|
||||
rt_sem_init(&_tc_sem, "tc", 0, RT_IPC_FLAG_PRIO);
|
||||
|
||||
do {
|
||||
for (index = _syscall_table_begin; index < _syscall_table_end; FINSH_NEXT_SYSCALL(index))
|
||||
|
|
|
@ -73,7 +73,7 @@ int timer_timeout_init()
|
|||
&msg_pool[0], /* 内存池指向msg_pool */
|
||||
128 - sizeof(void*), /* 每个消息的大小是 128 - void* */
|
||||
sizeof(msg_pool), /* 内存池的大小是msg_pool的大小 */
|
||||
RT_IPC_FLAG_FIFO); /* 如果有多个线程等待,按照先来先得到的方法分配消息 */
|
||||
RT_IPC_FLAG_PRIO); /* 如果有多个线程等待,按照优先级由高到低的方法分配消息 */
|
||||
|
||||
/* 创建线程 */
|
||||
tid = rt_thread_create("t",
|
||||
|
|
|
@ -61,7 +61,7 @@ static int wakeup_app(void)
|
|||
{
|
||||
rt_thread_t tid;
|
||||
|
||||
wakeup_event = rt_event_create("wakup", RT_IPC_FLAG_FIFO);
|
||||
wakeup_event = rt_event_create("wakup", RT_IPC_FLAG_PRIO);
|
||||
RT_ASSERT(wakeup_event != RT_NULL);
|
||||
|
||||
tid = rt_thread_create("wakeup_app", wakeup_app_entry, RT_NULL,
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2017-10-30 Bernard The first version
|
||||
*/
|
||||
|
||||
#ifndef LIBC_FDSET_H__
|
||||
#define LIBC_FDSET_H__
|
||||
|
||||
#include <rtconfig.h>
|
||||
|
||||
#if defined(RT_USING_NEWLIB) || defined(_WIN32) || (defined( __GNUC__ ) && !defined(__ARMCC_VERSION))
|
||||
#include <sys/types.h>
|
||||
#if defined(HAVE_SYS_SELECT_H)
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#ifdef SAL_USING_POSIX
|
||||
|
||||
#ifdef FD_SETSIZE
|
||||
#undef FD_SETSIZE
|
||||
#endif
|
||||
|
||||
#define FD_SETSIZE DFS_FD_MAX
|
||||
#endif
|
||||
|
||||
# ifndef FD_SETSIZE
|
||||
# define FD_SETSIZE 32
|
||||
# endif
|
||||
|
||||
# define NBBY 8 /* number of bits in a byte */
|
||||
|
||||
typedef long fd_mask;
|
||||
# define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */
|
||||
# ifndef howmany
|
||||
# define howmany(x,y) (((x)+((y)-1))/(y))
|
||||
# endif
|
||||
|
||||
/* We use a macro for fd_set so that including Sockets.h afterwards
|
||||
can work. */
|
||||
typedef struct _types_fd_set {
|
||||
fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)];
|
||||
} _types_fd_set;
|
||||
|
||||
#define fd_set _types_fd_set
|
||||
|
||||
# define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
|
||||
# define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
|
||||
# define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
|
||||
# define FD_ZERO(p) memset((void*)(p), 0, sizeof(*(p)))
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -510,7 +510,7 @@ typedef struct rt_timer *rt_timer_t;
|
|||
* @addtogroup Signal
|
||||
*/
|
||||
#ifdef RT_USING_SIGNALS
|
||||
#include <libc/libc_signal.h>
|
||||
#include <sys/signal.h>
|
||||
typedef unsigned long rt_sigset_t;
|
||||
typedef void (*rt_sighandler_t)(int signo);
|
||||
typedef siginfo_t rt_siginfo_t;
|
||||
|
|
|
@ -13,11 +13,8 @@
|
|||
|
||||
/* definitions for libc if toolchain has no these definitions */
|
||||
#include "libc/libc_stat.h"
|
||||
|
||||
#include "libc/libc_fcntl.h"
|
||||
#include "libc/libc_dirent.h"
|
||||
#include "libc/libc_signal.h"
|
||||
#include "libc/libc_fdset.h"
|
||||
|
||||
#ifndef RT_USING_LIBC
|
||||
#if defined(__ARMCC_VERSION) || defined(__IAR_SYSTEMS_ICC__)
|
||||
|
|
Loading…
Reference in New Issue