diff options
| author | Bernard Xiong <[email protected]> | 2021-03-31 14:15:21 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-03-31 14:15:21 +0800 |
| commit | 259144b2e658d6bdc543afb6b2e88f5461a070b4 (patch) | |
| tree | 7e4e1a241a70330b4f6a4e78d6549c9e68d4873d /include | |
| parent | 28ec21671cfd8992b3ad2d6ea48989968ad23e7c (diff) | |
| parent | a15040d3a9175b13486d756eafe0dd03645368da (diff) | |
Merge branch 'master' into master
Diffstat (limited to 'include')
| -rw-r--r-- | include/libc/libc_dirent.h | 5 | ||||
| -rw-r--r-- | include/libc/libc_errno.h | 4 | ||||
| -rw-r--r-- | include/libc/libc_fcntl.h | 4 | ||||
| -rw-r--r-- | include/libc/libc_fdset.h | 2 | ||||
| -rw-r--r-- | include/libc/libc_ioctl.h | 4 | ||||
| -rw-r--r-- | include/libc/libc_limits.h | 6 | ||||
| -rw-r--r-- | include/libc/libc_signal.h | 8 | ||||
| -rw-r--r-- | include/libc/libc_stat.h | 5 | ||||
| -rw-r--r-- | include/libc/libc_stdio.h | 6 | ||||
| -rw-r--r-- | include/rtdbg.h | 4 | ||||
| -rw-r--r-- | include/rtdebug.h | 5 | ||||
| -rw-r--r-- | include/rtdef.h | 41 | ||||
| -rw-r--r-- | include/rthw.h | 4 | ||||
| -rw-r--r-- | include/rtlibc.h | 2 | ||||
| -rw-r--r-- | include/rtm.h | 9 | ||||
| -rw-r--r-- | include/rtservice.h | 2 | ||||
| -rw-r--r-- | include/rtthread.h | 4 |
17 files changed, 71 insertions, 44 deletions
diff --git a/include/libc/libc_dirent.h b/include/libc/libc_dirent.h index c3a19878ec..a86332e633 100644 --- a/include/libc/libc_dirent.h +++ b/include/libc/libc_dirent.h @@ -1,7 +1,10 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes */ #ifndef LIBC_DIRENT_H__ diff --git a/include/libc/libc_errno.h b/include/libc/libc_errno.h index 9143c841f2..30d6092e33 100644 --- a/include/libc/libc_errno.h +++ b/include/libc/libc_errno.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -161,7 +161,7 @@ defined in armcc/errno.h #define EPROTONOSUPPORT (ERROR_BASE_NO + 93) #define ESOCKTNOSUPPORT (ERROR_BASE_NO + 94) #define EOPNOTSUPP (ERROR_BASE_NO + 95) -#define ENOTSUP EOPNOTSUPP +#define ENOTSUP EOPNOTSUPP #define EPFNOSUPPORT (ERROR_BASE_NO + 96) #define EAFNOSUPPORT (ERROR_BASE_NO + 97) #define EADDRINUSE (ERROR_BASE_NO + 98) diff --git a/include/libc/libc_fcntl.h b/include/libc/libc_fcntl.h index d149d86964..945e674d35 100644 --- a/include/libc/libc_fcntl.h +++ b/include/libc/libc_fcntl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -38,7 +38,7 @@ #ifdef _O_BINARY #define O_BINARY _O_BINARY #else -#define O_BINARY 0 +#define O_BINARY 0 #endif #endif diff --git a/include/libc/libc_fdset.h b/include/libc/libc_fdset.h index 9700c7e83e..c542e6855c 100644 --- a/include/libc/libc_fdset.h +++ b/include/libc/libc_fdset.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * diff --git a/include/libc/libc_ioctl.h b/include/libc/libc_ioctl.h index 812a119507..05f0daa238 100644 --- a/include/libc/libc_ioctl.h +++ b/include/libc/libc_ioctl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -16,7 +16,7 @@ #define _IOC_WRITE 1U #define _IOC_READ 2U -#ifndef _WIN32 +#if !defined (_WIN32) && !defined (__TASKING__) #define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0) #define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c)) #define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c)) diff --git a/include/libc/libc_limits.h b/include/libc/libc_limits.h index b8368160df..36b8dbb202 100644 --- a/include/libc/libc_limits.h +++ b/include/libc/libc_limits.h @@ -1,11 +1,11 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: - * Date Author Notes - * 2020-09-05 Meco Manthe first version + * Date Author Notes + * 2020-09-05 Meco Man the first version */ #ifndef LIBC_LIMITS_H__ diff --git a/include/libc/libc_signal.h b/include/libc/libc_signal.h index 539685de3e..8a4cc0d738 100644 --- a/include/libc/libc_signal.h +++ b/include/libc/libc_signal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -57,11 +57,11 @@ typedef struct siginfo siginfo_t; #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 +#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 +#define SI_ASYNCIO 0x04 /* Signal generated by completion of an asynchronous I/O request. */ -#define SI_MESGQ 0x05 /* Signal generated by arrival of a +#define SI_MESGQ 0x05 /* Signal generated by arrival of a message on an empty message queue. */ #if !defined(RT_USING_NEWLIB) diff --git a/include/libc/libc_stat.h b/include/libc/libc_stat.h index 6497cfe12c..f680de4e06 100644 --- a/include/libc/libc_stat.h +++ b/include/libc/libc_stat.h @@ -1,7 +1,10 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes */ #ifndef LIBC_STAT_H__ diff --git a/include/libc/libc_stdio.h b/include/libc/libc_stdio.h index 85ba509852..565e1bfd32 100644 --- a/include/libc/libc_stdio.h +++ b/include/libc/libc_stdio.h @@ -1,11 +1,11 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: - * Date Author Notes - * 2020-09-05 Meco Manthe first version + * Date Author Notes + * 2020-09-05 Meco Man the first version */ #ifndef LIBC_STDIO_H__ diff --git a/include/rtdbg.h b/include/rtdbg.h index be5a57f312..6a6ea3d670 100644 --- a/include/rtdbg.h +++ b/include/rtdbg.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -178,6 +178,8 @@ extern "C" { #define LOG_RAW(...) dbg_raw(__VA_ARGS__) +#define LOG_HEX(name, width, buf, size) + #endif /* defined(RT_USING_ULOG) && define(DBG_ENABLE) */ #ifdef __cplusplus diff --git a/include/rtdebug.h b/include/rtdebug.h index b66cd6fc69..8c7d450ad4 100644 --- a/include/rtdebug.h +++ b/include/rtdebug.h @@ -1,7 +1,10 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes */ #ifndef __RTDEBUG_H__ diff --git a/include/rtdef.h b/include/rtdef.h index e4ddbd37d3..b936a33455 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -117,7 +117,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ /* Compiler Related Definitions */ #if defined(__CC_ARM) || defined(__CLANG_ARM) /* ARM Compiler */ #include <stdarg.h> - #define SECTION(x) __attribute__((section(x))) + #define RT_SECTION(x) __attribute__((section(x))) #define RT_UNUSED __attribute__((unused)) #define RT_USED __attribute__((used)) #define ALIGN(n) __attribute__((aligned(n))) @@ -133,7 +133,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #elif defined (__IAR_SYSTEMS_ICC__) /* for IAR Compiler */ #include <stdarg.h> - #define SECTION(x) @ x + #define RT_SECTION(x) @ x #define RT_UNUSED #define RT_USED __root #define PRAGMA(x) _Pragma(#x) @@ -154,7 +154,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define va_arg(v,l) __builtin_va_arg(v,l) #endif - #define SECTION(x) __attribute__((section(x))) + #define RT_SECTION(x) __attribute__((section(x))) #define RT_UNUSED __attribute__((unused)) #define RT_USED __attribute__((used)) #define ALIGN(n) __attribute__((aligned(n))) @@ -163,7 +163,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RTT_API #elif defined (__ADSPBLACKFIN__) /* for VisualDSP++ Compiler */ #include <stdarg.h> - #define SECTION(x) __attribute__((section(x))) + #define RT_SECTION(x) __attribute__((section(x))) #define RT_UNUSED __attribute__((unused)) #define RT_USED __attribute__((used)) #define ALIGN(n) __attribute__((aligned(n))) @@ -172,7 +172,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RTT_API #elif defined (_MSC_VER) #include <stdarg.h> - #define SECTION(x) + #define RT_SECTION(x) #define RT_UNUSED #define RT_USED #define ALIGN(n) __declspec(align(n)) @@ -184,7 +184,7 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ /* The way that TI compiler set section is different from other(at least * GCC and MDK) compilers. See ARM Optimizing C/C++ Compiler 5.9.3 for more * details. */ - #define SECTION(x) + #define RT_SECTION(x) #define RT_UNUSED #define RT_USED #define PRAGMA(x) _Pragma(#x) @@ -192,6 +192,16 @@ typedef rt_base_t rt_off_t; /**< Type for offset */ #define RT_WEAK #define rt_inline static inline #define RTT_API +#elif defined (__TASKING__) + #include <stdarg.h> + #define RT_SECTION(x) __attribute__((section(x))) + #define RT_UNUSED __attribute__((unused)) + #define RT_USED __attribute__((used, protect)) + #define PRAGMA(x) _Pragma(#x) + #define ALIGN(n) __attribute__((__align(n))) + #define RT_WEAK __attribute__((weak)) + #define rt_inline static inline + #define RTT_API #else #error not supported tool chain #endif @@ -210,11 +220,11 @@ typedef int (*init_fn_t)(void); }; #define INIT_EXPORT(fn, level) \ const char __rti_##fn##_name[] = #fn; \ - RT_USED const struct rt_init_desc __rt_init_desc_##fn SECTION(".rti_fn." level) = \ + RT_USED const struct rt_init_desc __rt_init_desc_##fn RT_SECTION(".rti_fn." level) = \ { __rti_##fn##_name, fn}; #else #define INIT_EXPORT(fn, level) \ - RT_USED const init_fn_t __rt_init_##fn SECTION(".rti_fn." level) = fn + RT_USED const init_fn_t __rt_init_##fn RT_SECTION(".rti_fn." level) = fn #endif #endif #else @@ -790,6 +800,9 @@ struct rt_memheap_item struct rt_memheap_item *next_free; /**< next free memheap item */ struct rt_memheap_item *prev_free; /**< prev free memheap item */ +#ifdef RT_USING_MEMTRACE + rt_uint8_t owner_thread_name[4]; /**< owner thread name */ +#endif }; /** @@ -1029,6 +1042,10 @@ struct rt_device_blk_sectors #define RTGRAPHIC_CTRL_GET_INFO 3 #define RTGRAPHIC_CTRL_SET_MODE 4 #define RTGRAPHIC_CTRL_GET_EXT 5 +#define RTGRAPHIC_CTRL_SET_BRIGHTNESS 6 +#define RTGRAPHIC_CTRL_GET_BRIGHTNESS 7 +#define RTGRAPHIC_CTRL_GET_MODE 8 +#define RTGRAPHIC_CTRL_GET_STATUS 9 /* graphic deice */ enum @@ -1045,9 +1062,7 @@ enum RTGRAPHIC_PIXEL_FORMAT_RGB888, RTGRAPHIC_PIXEL_FORMAT_ARGB888, RTGRAPHIC_PIXEL_FORMAT_ABGR888, - RTGRAPHIC_PIXEL_FORMAT_ARGB565, - RTGRAPHIC_PIXEL_FORMAT_ALPHA, - RTGRAPHIC_PIXEL_FORMAT_COLOR, + RTGRAPHIC_PIXEL_FORMAT_RESERVED, }; /** @@ -1062,7 +1077,7 @@ struct rt_device_graphic_info { rt_uint8_t pixel_format; /**< graphic format */ rt_uint8_t bits_per_pixel; /**< bits per pixel */ - rt_uint16_t reserved; /**< reserved field */ + rt_uint16_t pitch; /**< bytes per line */ rt_uint16_t width; /**< width of graphic device */ rt_uint16_t height; /**< height of graphic device */ diff --git a/include/rthw.h b/include/rthw.h index 89877faf90..5672a8f992 100644 --- a/include/rthw.h +++ b/include/rthw.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -181,7 +181,7 @@ void rt_hw_secondary_cpu_up(void); void rt_hw_secondary_cpu_idle_exec(void); #else -#define RT_DEFINE_SPINLOCK(x) +#define RT_DEFINE_SPINLOCK(x) #define RT_DECLARE_SPINLOCK(x) rt_ubase_t x #define rt_hw_spin_lock(lock) *(lock) = rt_hw_interrupt_disable() diff --git a/include/rtlibc.h b/include/rtlibc.h index fb8c782095..5a260d250d 100644 --- a/include/rtlibc.h +++ b/include/rtlibc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * diff --git a/include/rtm.h b/include/rtm.h index 7e07a2239c..ec05662416 100644 --- a/include/rtm.h +++ b/include/rtm.h @@ -1,7 +1,10 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes */ #ifndef __RTM_H__ @@ -28,8 +31,8 @@ __declspec(allocate("RTMSymTab$f"))const char __rtmsym_##symbol##_name[] = "__vs #else #define RTM_EXPORT(symbol) \ -const char __rtmsym_##symbol##_name[] SECTION(".rodata.name") = #symbol; \ -const struct rt_module_symtab __rtmsym_##symbol SECTION("RTMSymTab")= \ +const char __rtmsym_##symbol##_name[] RT_SECTION(".rodata.name") = #symbol; \ +const struct rt_module_symtab __rtmsym_##symbol RT_SECTION("RTMSymTab")= \ { \ (void *)&symbol, \ __rtmsym_##symbol##_name \ diff --git a/include/rtservice.h b/include/rtservice.h index 5bd2b1c23b..d0bad85de1 100644 --- a/include/rtservice.h +++ b/include/rtservice.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * diff --git a/include/rtthread.h b/include/rtthread.h index 1e0094e73b..e80257a6e5 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018, RT-Thread Development Team + * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * @@ -437,8 +437,6 @@ rt_err_t rt_device_unregister(rt_device_t dev); rt_device_t rt_device_create(int type, int attach_size); void rt_device_destroy(rt_device_t device); -rt_err_t rt_device_init_all(void); - rt_err_t rt_device_set_rx_indicate(rt_device_t dev, rt_err_t (*rx_ind)(rt_device_t dev, rt_size_t size)); |
