RT-Thread RTOS 1.2.0
An open source embedded real-time operating system
载入中...
搜索中...
未找到
rtdef.h 文件参考
#include "rtsched.h"
#include "rttypes.h"
#include "klibc/kerrno.h"
#include "rtcompiler.h"
+ rtdef.h 的引用(Include)关系图:
+ 此图展示该文件被哪些文件直接或间接地引用了:

浏览该文件的源代码.

结构体

struct  rt_object
 
struct  rt_object_information
 
struct  rt_timer
 
struct  rt_cpu_usage_stats
 
struct  rt_cpu
 
struct  rt_interrupt_context
 
struct  rt_thread
 
struct  rt_ipc_object
 
struct  rt_semaphore
 
struct  rt_mutex
 
struct  rt_event
 
struct  rt_mailbox
 
struct  rt_messagequeue
 
struct  rt_memory
 
struct  rt_mempool
 
struct  rt_wqueue
 
struct  rt_device
 
struct  rt_device_notify
 

宏定义

#define RT_VERSION_MAJOR   5
 
#define RT_VERSION_MINOR   2
 
#define RT_VERSION_PATCH   0
 
#define RT_VERSION_CHECK(major, minor, revise)
 
#define RTTHREAD_VERSION   RT_VERSION_CHECK(RT_VERSION_MAJOR, RT_VERSION_MINOR, RT_VERSION_PATCH)
 
#define RT_UINT8_MAX   0xFFU
 
#define RT_UINT16_MAX   0xFFFFU
 
#define RT_UINT32_MAX   0xFFFFFFFFUL
 
#define RT_UINT64_MAX   0xFFFFFFFFFFFFFFFFULL
 
#define RT_TICK_MAX   RT_UINT32_MAX
 
#define RT_SEM_VALUE_MAX   RT_UINT16_MAX
 
#define RT_MUTEX_VALUE_MAX   RT_UINT16_MAX
 
#define RT_MUTEX_HOLD_MAX   RT_UINT8_MAX
 
#define RT_MB_ENTRY_MAX   RT_UINT16_MAX
 
#define RT_MQ_ENTRY_MAX   RT_UINT16_MAX
 
#define RT_UNUSED(x)
 
#define RT_STATIC_ASSERT(name, expn)
 
#define INIT_EXPORT(fn, level)
 
#define INIT_BOARD_EXPORT(fn)
 
#define INIT_CORE_EXPORT(fn)
 
#define INIT_SUBSYS_EXPORT(fn)
 
#define INIT_PLATFORM_EXPORT(fn)
 
#define INIT_PREV_EXPORT(fn)
 
#define INIT_DEVICE_EXPORT(fn)
 
#define INIT_COMPONENT_EXPORT(fn)
 
#define INIT_ENV_EXPORT(fn)
 
#define INIT_APP_EXPORT(fn)
 
#define INIT_FS_EXPORT(fn)
 
#define INIT_SECONDARY_CPU_EXPORT(fn)
 
#define RT_EVENT_LENGTH   32
 
#define RT_MM_PAGE_SIZE   4096
 
#define RT_MM_PAGE_MASK   (RT_MM_PAGE_SIZE - 1)
 
#define RT_MM_PAGE_BITS   12
 
#define RT_KERNEL_MALLOC(sz)
 
#define RT_KERNEL_FREE(ptr)
 
#define RT_KERNEL_REALLOC(ptr, size)
 
#define RT_IS_ALIGN(addr, align)
 
#define RT_ALIGN(size, align)
 
#define RT_ALIGN_DOWN(size, align)
 
#define RT_OBJECT_FLAG_MODULE   0x80
 
#define _RT_OBJECT_HOOK_CALL(func, argv)
 
#define RT_OBJECT_HOOK_CALL(func, argv)
 
#define __ON_HOOK_ARGS(__hook, argv)
 
#define RT_OBJECT_HOOKLIST_DECLARE(handler_type, name)
 
#define RT_OBJECT_HOOKLIST_DEFINE_NODE(hookname, nodename, hooker_handler)
 
#define RT_OBJECT_HOOKLIST_DEFINE(name)
 
#define RT_OBJECT_HOOKLIST_CALL(name, argv)
 
#define RT_TIMER_FLAG_DEACTIVATED   0x0
 
#define RT_TIMER_FLAG_ACTIVATED   0x1
 
#define RT_TIMER_FLAG_ONE_SHOT   0x0
 
#define RT_TIMER_FLAG_PERIODIC   0x2
 
#define RT_TIMER_FLAG_HARD_TIMER   0x0
 
#define RT_TIMER_FLAG_SOFT_TIMER   0x4
 
#define RT_TIMER_FLAG_THREAD_TIMER    (0x8 | RT_TIMER_FLAG_HARD_TIMER)
 
#define RT_TIMER_CTRL_SET_TIME   0x0
 
#define RT_TIMER_CTRL_GET_TIME   0x1
 
#define RT_TIMER_CTRL_SET_ONESHOT   0x2
 
#define RT_TIMER_CTRL_SET_PERIODIC   0x3
 
#define RT_TIMER_CTRL_GET_STATE   0x4
 
#define RT_TIMER_CTRL_GET_REMAIN_TIME   0x5
 
#define RT_TIMER_CTRL_GET_FUNC   0x6
 
#define RT_TIMER_CTRL_SET_FUNC   0x7
 
#define RT_TIMER_CTRL_GET_PARM   0x8
 
#define RT_TIMER_CTRL_SET_PARM   0x9
 
#define RT_TIMER_SKIP_LIST_LEVEL   1
 
#define RT_TIMER_SKIP_LIST_MASK   0x3
 
#define RT_THREAD_INIT   0x00
 
#define RT_THREAD_CLOSE   0x01
 
#define RT_THREAD_READY   0x02
 
#define RT_THREAD_RUNNING   0x03
 
#define RT_THREAD_SUSPEND_MASK   0x04
 
#define RT_SIGNAL_COMMON_WAKEUP_MASK   0x02
 
#define RT_SIGNAL_KILL_WAKEUP_MASK   0x01
 
#define RT_THREAD_SUSPEND_INTERRUPTIBLE   (RT_THREAD_SUSPEND_MASK)
 
#define RT_THREAD_SUSPEND   RT_THREAD_SUSPEND_INTERRUPTIBLE
 
#define RT_THREAD_SUSPEND_KILLABLE   (RT_THREAD_SUSPEND_MASK | RT_SIGNAL_COMMON_WAKEUP_MASK)
 
#define RT_THREAD_SUSPEND_UNINTERRUPTIBLE   (RT_THREAD_SUSPEND_MASK | RT_SIGNAL_COMMON_WAKEUP_MASK | RT_SIGNAL_KILL_WAKEUP_MASK)
 
#define RT_THREAD_STAT_MASK   0x07
 
#define RT_THREAD_STAT_YIELD   0x08
 
#define RT_THREAD_STAT_YIELD_MASK   RT_THREAD_STAT_YIELD
 
#define RT_THREAD_STAT_SIGNAL   0x10
 
#define RT_THREAD_STAT_SIGNAL_READY   (RT_THREAD_STAT_SIGNAL | RT_THREAD_READY)
 
#define RT_THREAD_STAT_SIGNAL_WAIT   0x20
 
#define RT_THREAD_STAT_SIGNAL_PENDING   0x40
 
#define RT_THREAD_STAT_SIGNAL_MASK   0xf0
 
#define RT_THREAD_CTRL_STARTUP   0x00
 
#define RT_THREAD_CTRL_CLOSE   0x01
 
#define RT_THREAD_CTRL_CHANGE_PRIORITY   0x02
 
#define RT_THREAD_CTRL_INFO   0x03
 
#define RT_THREAD_CTRL_BIND_CPU   0x04
 
#define rt_current_thread   rt_thread_self()
 
#define LWP_IS_USER_MODE(t)
 
#define RT_IPC_FLAG_FIFO   0x00
 
#define RT_IPC_FLAG_PRIO   0x01
 
#define RT_IPC_CMD_UNKNOWN   0x00
 
#define RT_IPC_CMD_RESET   0x01
 
#define RT_IPC_CMD_GET_STATE   0x02
 
#define RT_IPC_CMD_SET_VLIMIT   0x03
 
#define RT_WAITING_FOREVER   -1
 
#define RT_WAITING_NO   0
 
#define RT_EVENT_FLAG_AND   0x01
 
#define RT_EVENT_FLAG_OR   0x02
 
#define RT_EVENT_FLAG_CLEAR   0x04
 
#define RT_DEVICE_FLAG_DEACTIVATE   0x000
 
#define RT_DEVICE_FLAG_RDONLY   0x001
 
#define RT_DEVICE_FLAG_WRONLY   0x002
 
#define RT_DEVICE_FLAG_RDWR   0x003
 
#define RT_DEVICE_FLAG_REMOVABLE   0x004
 
#define RT_DEVICE_FLAG_STANDALONE   0x008
 
#define RT_DEVICE_FLAG_ACTIVATED   0x010
 
#define RT_DEVICE_FLAG_SUSPENDED   0x020
 
#define RT_DEVICE_FLAG_STREAM   0x040
 
#define RT_DEVICE_FLAG_DYNAMIC   0x080
 
#define RT_DEVICE_FLAG_INT_RX   0x100
 
#define RT_DEVICE_FLAG_DMA_RX   0x200
 
#define RT_DEVICE_FLAG_INT_TX   0x400
 
#define RT_DEVICE_FLAG_DMA_TX   0x800
 
#define RT_DEVICE_OFLAG_CLOSE   0x000
 
#define RT_DEVICE_OFLAG_RDONLY   0x001
 
#define RT_DEVICE_OFLAG_WRONLY   0x002
 
#define RT_DEVICE_OFLAG_RDWR   0x003
 
#define RT_DEVICE_OFLAG_OPEN   0x008
 
#define RT_DEVICE_OFLAG_MASK   0xf0f
 
#define RT_DEVICE_CTRL_RESUME   0x01
 
#define RT_DEVICE_CTRL_SUSPEND   0x02
 
#define RT_DEVICE_CTRL_CONFIG   0x03
 
#define RT_DEVICE_CTRL_CLOSE   0x04
 
#define RT_DEVICE_CTRL_NOTIFY_SET   0x05
 
#define RT_DEVICE_CTRL_SET_INT   0x06
 
#define RT_DEVICE_CTRL_CLR_INT   0x07
 
#define RT_DEVICE_CTRL_GET_INT   0x08
 
#define RT_DEVICE_CTRL_CONSOLE_OFLAG   0x09
 
#define RT_DEVICE_CTRL_MASK   0x1f
 
#define RT_DEVICE_CTRL_BASE(Type)
 

类型定义

typedef struct rt_objectrt_object_t
 
typedef rt_err_t(* rt_object_iter_t) (rt_object_t object, void *data)
 
typedef void(* rt_timer_func_t) (void *parameter)
 
typedef struct rt_timerrt_timer_t
 
typedef struct rt_cpu_usage_statsrt_cpu_usage_stats_t
 
typedef struct rt_cpurt_cpu_t
 
typedef struct rt_interrupt_contextrt_interrupt_context_t
 
typedef void(* rt_thread_cleanup_t) (struct rt_thread *tid)
 
typedef struct rt_threadrt_thread_t
 
typedef struct rt_semaphorert_sem_t
 
typedef struct rt_mutexrt_mutex_t
 
typedef struct rt_eventrt_event_t
 
typedef struct rt_mailboxrt_mailbox_t
 
typedef struct rt_messagequeuert_mq_t
 
typedef struct rt_memoryrt_mem_t
 
typedef rt_mem_t rt_smem_t
 
typedef struct rt_mempoolrt_mp_t
 
typedef struct rt_driver * rt_driver_t
 
typedef struct rt_devicert_device_t
 
typedef struct rt_wqueue rt_wqueue_t
 

枚举

enum  rt_object_class_type {
  RT_Object_Class_Null = 0x00 , RT_Object_Class_Thread = 0x01 , RT_Object_Class_Semaphore = 0x02 , RT_Object_Class_Mutex = 0x03 ,
  RT_Object_Class_Event = 0x04 , RT_Object_Class_MailBox = 0x05 , RT_Object_Class_MessageQueue = 0x06 , RT_Object_Class_MemHeap = 0x07 ,
  RT_Object_Class_MemPool = 0x08 , RT_Object_Class_Device = 0x09 , RT_Object_Class_Timer = 0x0a , RT_Object_Class_Module = 0x0b ,
  RT_Object_Class_Memory = 0x0c , RT_Object_Class_Channel = 0x0d , RT_Object_Class_ProcessGroup = 0x0e , RT_Object_Class_Session = 0x0f ,
  RT_Object_Class_Custom = 0x10 , RT_Object_Class_Unknown = 0x11 , RT_Object_Class_Static = 0x80
}
 
enum  { RT_INTERRUPTIBLE = 0 , RT_KILLABLE , RT_UNINTERRUPTIBLE }
 
enum  rt_device_class_type {
  RT_Device_Class_Char = 0 , RT_Device_Class_Block , RT_Device_Class_NetIf , RT_Device_Class_MTD ,
  RT_Device_Class_CAN , RT_Device_Class_RTC , RT_Device_Class_Sound , RT_Device_Class_Graphic ,
  RT_Device_Class_I2CBUS , RT_Device_Class_USBDevice , RT_Device_Class_USBHost , RT_Device_Class_USBOTG ,
  RT_Device_Class_SPIBUS , RT_Device_Class_SPIDevice , RT_Device_Class_SDIO , RT_Device_Class_PM ,
  RT_Device_Class_Pipe , RT_Device_Class_Portal , RT_Device_Class_Timer , RT_Device_Class_Miscellaneous ,
  RT_Device_Class_Sensor , RT_Device_Class_Touch , RT_Device_Class_PHY , RT_Device_Class_Security ,
  RT_Device_Class_WLAN , RT_Device_Class_Pin , RT_Device_Class_ADC , RT_Device_Class_DAC ,
  RT_Device_Class_WDT , RT_Device_Class_PWM , RT_Device_Class_Bus , RT_Device_Class_Unknown
}
 

宏定义说明

◆ RT_UINT8_MAX

#define RT_UINT8_MAX   0xFFU

Maximum number of UINT8

在文件 rtdef.h103 行定义.

◆ RT_UINT16_MAX

#define RT_UINT16_MAX   0xFFFFU

Maximum number of UINT16

在文件 rtdef.h104 行定义.

◆ RT_UINT32_MAX

#define RT_UINT32_MAX   0xFFFFFFFFUL

Maximum number of UINT32

在文件 rtdef.h105 行定义.

◆ RT_UINT64_MAX

#define RT_UINT64_MAX   0xFFFFFFFFFFFFFFFFULL

Maximum number of UINT64

在文件 rtdef.h106 行定义.

◆ RT_TICK_MAX

#define RT_TICK_MAX   RT_UINT32_MAX

Maximum number of tick

在文件 rtdef.h109 行定义.

◆ RT_SEM_VALUE_MAX

#define RT_SEM_VALUE_MAX   RT_UINT16_MAX

Maximum number of semaphore .value

在文件 rtdef.h112 行定义.

◆ RT_MUTEX_VALUE_MAX

#define RT_MUTEX_VALUE_MAX   RT_UINT16_MAX

Maximum number of mutex .value

在文件 rtdef.h113 行定义.

◆ RT_MUTEX_HOLD_MAX

#define RT_MUTEX_HOLD_MAX   RT_UINT8_MAX

Maximum number of mutex .hold

在文件 rtdef.h114 行定义.

◆ RT_MB_ENTRY_MAX

#define RT_MB_ENTRY_MAX   RT_UINT16_MAX

Maximum number of mailbox .entry

在文件 rtdef.h115 行定义.

◆ RT_MQ_ENTRY_MAX

#define RT_MQ_ENTRY_MAX   RT_UINT16_MAX

Maximum number of message queue .entry

在文件 rtdef.h116 行定义.

◆ RT_UNUSED

#define RT_UNUSED ( x)
值:
((void)(x))

在文件 rtdef.h120 行定义.

◆ RT_STATIC_ASSERT

#define RT_STATIC_ASSERT ( name,
expn )
值:
typedef char _static_assert_##name[(expn)?1:-1]

在文件 rtdef.h123 行定义.

◆ INIT_EXPORT

#define INIT_EXPORT ( fn,
level )

在文件 rtdef.h175 行定义.

◆ INIT_BOARD_EXPORT

#define INIT_BOARD_EXPORT ( fn)
值:
INIT_EXPORT(fn, "1")
#define INIT_EXPORT(fn, level)

在文件 rtdef.h179 行定义.

◆ INIT_CORE_EXPORT

#define INIT_CORE_EXPORT ( fn)
值:
INIT_EXPORT(fn, "1.0")

在文件 rtdef.h182 行定义.

◆ INIT_SUBSYS_EXPORT

#define INIT_SUBSYS_EXPORT ( fn)
值:
INIT_EXPORT(fn, "1.1")

在文件 rtdef.h184 行定义.

◆ INIT_PLATFORM_EXPORT

#define INIT_PLATFORM_EXPORT ( fn)
值:
INIT_EXPORT(fn, "1.2")

在文件 rtdef.h186 行定义.

◆ INIT_PREV_EXPORT

#define INIT_PREV_EXPORT ( fn)
值:
INIT_EXPORT(fn, "2")

在文件 rtdef.h190 行定义.

◆ INIT_DEVICE_EXPORT

#define INIT_DEVICE_EXPORT ( fn)
值:
INIT_EXPORT(fn, "3")

在文件 rtdef.h192 行定义.

◆ INIT_COMPONENT_EXPORT

#define INIT_COMPONENT_EXPORT ( fn)
值:
INIT_EXPORT(fn, "4")

在文件 rtdef.h194 行定义.

◆ INIT_ENV_EXPORT

#define INIT_ENV_EXPORT ( fn)
值:
INIT_EXPORT(fn, "5")

在文件 rtdef.h196 行定义.

◆ INIT_APP_EXPORT

#define INIT_APP_EXPORT ( fn)
值:
INIT_EXPORT(fn, "6")

在文件 rtdef.h198 行定义.

◆ INIT_FS_EXPORT

#define INIT_FS_EXPORT ( fn)
值:
INIT_EXPORT(fn, "6.0")

在文件 rtdef.h201 行定义.

◆ INIT_SECONDARY_CPU_EXPORT

#define INIT_SECONDARY_CPU_EXPORT ( fn)
值:
INIT_EXPORT(fn, "7")

在文件 rtdef.h203 行定义.

◆ RT_EVENT_LENGTH

#define RT_EVENT_LENGTH   32

在文件 rtdef.h217 行定义.

◆ RT_MM_PAGE_SIZE

#define RT_MM_PAGE_SIZE   4096

在文件 rtdef.h220 行定义.

◆ RT_MM_PAGE_MASK

#define RT_MM_PAGE_MASK   (RT_MM_PAGE_SIZE - 1)

在文件 rtdef.h221 行定义.

◆ RT_MM_PAGE_BITS

#define RT_MM_PAGE_BITS   12

在文件 rtdef.h222 行定义.

◆ RT_KERNEL_MALLOC

#define RT_KERNEL_MALLOC ( sz)
值:
rt_weak void * rt_malloc(rt_size_t size)
Allocate a block of memory with a minimum of 'size' bytes.

在文件 rtdef.h226 行定义.

◆ RT_KERNEL_FREE

#define RT_KERNEL_FREE ( ptr)
值:
rt_free(ptr)
rt_weak void rt_free(void *ptr)
This function will release the previously allocated memory block by rt_malloc. The released memory bl...

在文件 rtdef.h230 行定义.

◆ RT_KERNEL_REALLOC

#define RT_KERNEL_REALLOC ( ptr,
size )
值:
rt_realloc(ptr, size)
rt_weak void * rt_realloc(void *ptr, rt_size_t newsize)
This function will change the size of previously allocated memory block.

在文件 rtdef.h234 行定义.