查看: 3847|回复: 1

[分享] IRD-LPC1768-DEV CMSIS RTOSV2 API -- 7

[复制链接]
  • TA的每日心情
    擦汗
    2021-7-5 15:45
  • 签到天数: 664 天

    连续签到: 1 天

    [LV.9]以坛为家II

    42

    主题

    1594

    帖子

    19

    金牌会员

    Rank: 6Rank: 6

    积分
    5650
    最后登录
    2021-12-22
    发表于 2019-3-31 16:07:26 | 显示全部楼层 |阅读模式
    本帖最后由 okwh 于 2019-3-31 16:10 编辑

    IRD-LPC1768-DEV  CMSIS RTOSV2 API


    Kernel Info and Control
      内核信息和控制

    osKernelGetInfo
    获取RTOS内核信息。
    Get RTOS Kernel Information.
    osKernelGetState
    获取当前的RTOS内核状态。
    Get the current RTOS Kernel state.
    osKernelGetSysTimerCount
    获取RTOS内核系统定时器计数。
    Get the RTOS kernel system timer count.
    osKernelGetSysTimerFreq
    获取RTOS内核系统的定时器频率。
    Get the RTOS kernel system timer frequency.
    osKernelInitialize
    初始化RTOS内核。
    Initialize the RTOS Kernel.
    osKernelLock
    锁定RTOS内核调度程序。
    Lock the RTOS Kernel scheduler.
    osKernelUnlock
    解锁RTOS内核调度程序。
    Unlock the RTOS Kernel scheduler.
    osKernelRestoreLock
    恢复RTOS内核调度器锁定状态。
    Restore the RTOS Kernel scheduler lock state.
    osKernelResume
    恢复RTOS内核调度程序。
    Resume the RTOS Kernel scheduler.
    osKernelStart
    启动RTOS内核调度程序。
    Start the RTOS Kernel scheduler.
    osKernelSuspend
    挂起RTOS内核调度程序。
    Suspend the RTOS Kernel scheduler.
    osKernelGetTickCount
    获取RTOS内核计数。
    Get the RTOS kernel tick count.
    osKernelGetTickFreq
    获取RTOS内核滴答频率。
    Get the RTOS kernel tick frequency.
    Thread Management
      线程管理

    osThreadDetach
    分离线程(线程终止时可以回收线程存储)。
    Detach a thread (thread storage can be reclaimed when thread terminates).
    osThreadEnumerate
    枚举活动线程。
    Enumerate active threads.
    osThreadExit
    终止执行当前正在运行的线程。
    Terminate execution of current running thread.
    osThreadGetCount
    获取活动线程的数量。
    Get number of active threads.
    osThreadGetId
    返回当前正在运行的线程的线程ID
    Return the thread ID of the current running thread.
    osThreadGetName
    获取线程的名称。
    Get name of a thread.
    osThreadGetPriority
    获取线程的当前优先级。
    Get current priority of a thread.
    osThreadGetStackSize
    获取线程的堆栈大小。
    Get stack size of a thread.
    osThreadGetStackSpace
    在执行期间基于堆栈水印记录获取线程的可用堆栈空间。
    Get available stack space of a thread based on stack watermark recording during execution.
    osThreadGetState
    获取当前线程的线程状态。
    Get current thread state of a thread.
    osThreadJoin
    等待指定的线程终止。
    Wait for specified thread to terminate.
    osThreadNew
    创建一个线程并将其添加到Active Threads
    Create a thread and add it to Active Threads.
    osThreadResume
    恢复执行线程。
    Resume execution of a thread.
    osThreadSetPriority
    更改线程的优先级。
    Change priority of a thread.
    osThreadSuspend
    挂起一个线程的执行。
    Suspend execution of a thread.
    osThreadTerminate
    终止线程的执行。
    Terminate execution of a thread.
    osThreadYield
    将控件传递到状态为READY的下一个线程。
    Pass control to next thread that is in state READY.
    Thread Flags
      线程标志

    osThreadFlagsSet
    设置线程的指定线程标志。
    Set the specified Thread Flags of a thread.
    osThreadFlagsClear
    清除当前正在运行的线程的指定线程标志。
    Clear the specified Thread Flags of current running thread.
    osThreadFlagsGet
    获取当前正在运行的线程的当前Thread Flags
    Get the current Thread Flags of current running thread.
    osThreadFlagsWait
    等待当前正在运行的线程的一个或多个线程标志变为信号。
    Wait for one or more Thread Flags of the current running thread to become signaled.
    Event Flags
      事件标志

    osEventFlagsGetName
    获取Event Flags对象的名称。
    Get name of an Event Flags object.
    osEventFlagsNew
    创建并初始化事件标志对象。
    Create and Initialize an Event Flags object.
    osEventFlagsDelete
    删除事件标志对象。
    Delete an Event Flags object.
    osEventFlagsSet
    设置指定的事件标志。
    Set the specified Event Flags.
    osEventFlagsClear
    清除指定的事件标志。
    Clear the specified Event Flags.
    osEventFlagsGet
    获取当前的事件标志。
    Get the current Event Flags.
    osEventFlagsWait
    等待一个或多个事件标志变为信号。
    Wait for one or more Event Flags to become signaled.
    Generic Wait Functions
    通用等待功能

    osDelay
    等待超时(延时)。
    Wait for Timeout (Time Delay).
    osDelayUntil
    等到指定的时间。
    Wait until specified time.
    Timer Management
      计时器管理

    osTimerDelete
    删除一个计时器。
    Delete a timer.
    osTimerGetName
    获取计时器的名称。
    Get name of a timer.
    osTimerIsRunning
    检查一个计时器是否正在运行。
    Check if a timer is running.
    osTimerNew
    创建并初始化定时器。
    Create and Initialize a timer.
    osTimerStart
    启动或重启定时器。
    Start or restart a timer.
    osTimerStop
    停止定时器
    Stop a timer.
    Mutex Management
      互斥管理

    osMutexAcquire
    如果被锁定,则获取互斥量或超时。
    Acquire a Mutex or timeout if it is locked.
    osMutexDelete
    删除一个Mutex对象。
    Delete a Mutex object.
    osMutexGetName
    获取Mutex对象的名称。
    Get name of a Mutex object.
    osMutexGetOwner
    获取拥有Mutex对象的线程。
    Get Thread which owns a Mutex object.
    osMutexNew
    创建和初始化一个Mutex对象。
    Create and Initialize a Mutex object.
    osMutexRelease
    释放由osMutexAcquire获取的Mutex
    Release a Mutex that was acquired by osMutexAcquire.
    Semaphores
    信号灯

    osSemaphoreAcquire
    如果没有令牌可用,则获取信号量令牌或超时。
    Acquire a Semaphore token or timeout if no tokens are available.
    osSemaphoreDelete
    删除一个信号量对象。
    Delete a Semaphore object.
    osSemaphoreGetCount
    获取当前的信号量令牌计数。
    Get current Semaphore token count.
    osSemaphoreGetName
    获取信号量对象的名称。
    Get name of a Semaphore object.
    osSemaphoreNew
    创建和初始化一个信号量对象。
    Create and Initialize a Semaphore object.
    osSemaphoreRelease
    释放由osSemaphoreAcquire获取的信号量令牌。
    Release a Semaphore token up to the initial maximum count.
    Memory Pool
      内存池

    osMemoryPoolAlloc
    从内存池分配一个内存块。
    Allocate a memory block from a Memory Pool.
    osMemoryPoolDelete
    删除内存池对象。
    Delete a Memory Pool object.
    osMemoryPoolFree
    将分配的内存块返回到内存池。
    Return an allocated memory block back to a Memory Pool.
    osMemoryPoolGetBlockSize
    在内存池中获取内存块大小。
    Get memory block size in a Memory Pool.
    osMemoryPoolGetCapacity
    获取内存池中的最大内存块数。
    Get maximum number of memory blocks in a Memory Pool.
    osMemoryPoolGetCount
    获取内存池中使用的内存块数。
    Get number of memory blocks used in a Memory Pool.
    osMemoryPoolGetName
    获取内存池对象的名称。
    Get name of a Memory Pool object.
    osMemoryPoolGetSpace
    获取内存池中可用的内存块数。
    Get number of memory blocks available in a Memory Pool.
    osMemoryPoolNew
    创建和初始化内存池对象。
    Create and Initialize a Memory Pool object.
    Message Queue
      消息队列

    osMessageQueueDelete
    删除消息队列对象。
    Delete a Message Queue object.
    osMessageQueueGet
    如果Queue为空,则从队列获取消息或超时。
    Get a Message from a Queue or timeout if Queue is empty.
    osMessageQueueGetCapacity
    获取消息队列中的最大消息数。
    Get maximum number of messages in a Message Queue.
    osMessageQueueGetCount
    获取消息队列中排队消息的数量。
    Get number of queued messages in a Message Queue.
    osMessageQueueGetMsgSize
    在内存池中获取最大消息大小。
    Get maximum message size in a Memory Pool.
    osMessageQueueGetName
    获取消息队列对象的名称。
    Get name of a Message Queue object.
    osMessageQueueGetSpace
    获取消息队列中消息的可用插槽数。
    Get number of available slots for messages in a Message Queue.
    osMessageQueueNew
    创建和初始化消息队列对象。
    Create and Initialize a Message Queue object.
    osMessageQueuePut
    如果队列已满,则将消息放入队列或超时。
    Put a Message into a Queue or timeout if Queue is full.
    osMessageQueueReset
    将消息队列重置为初始空状态。
    Reset a Message Queue to initial empty state.
    OS Tick API
    系统滴答计数器API

    OS_Tick_Setup
    配置Tick中断
    Setup OS Tick timer to generate periodic RTOS Kernel Ticks.
    OS_Tick_Enable
    Tick中断启用
    Enable OS Tick timer interrupt.
    OS_Tick_Disable
    Tick中断禁用
    Disable OS Tick timer interrupt.
    OS_Tick_AcknowledgeIRQ
    确认 OS Tick IRQ
    Acknowledge execution of OS Tick timer interrupt.
    OS_Tick_GetIRQn
    获取 Tick中断 编号
    Get OS Tick timer IRQ number.
    OS_Tick_GetClock
    获取 Tick 时钟
    Get OS Tick timer clock frequency.
    OS_Tick_GetInterval
    获取 OS Tick 间隔
    Get OS Tick timer interval reload value.
    OS_Tick_GetCount
    获取 OS Tick 计数值
    Get OS Tick timer counter value.
    OS_Tick_GetOverflow
    获取 OS Tick 溢出状态
    Get OS Tick timer overflow status.
    RTX5 API
    RTX5特有API

    osRtxErrorNotify
    操作系统错误回调函数。
    操作系统错误回调函数。
    osRtxIdleThread
    操作系统空闲线程。
    操作系统空闲线程。
    osRtxSysTimerSetup
    OS系统定时器功能(默认实现使用SysTick
    OS系统定时器功能(默认实现使用SysTick
    osRtxSysTimerEnable
    启用系统定时器。
    启用系统定时器。
    osRtxSysTimerDisable
    禁用系统定时器。
    禁用系统定时器。
    osRtxSysTimerAckIRQ
    确认系统定时器IRQ
    确认系统定时器IRQ
    osRtxSysTimerGetCount
    获取系统计时器计数。
    获取系统计时器计数。
    osRtxSysTimerGetFreq
    获取系统定时器频率。
    获取系统定时器频率。
    可以从线程和中断服务程序(ISR)调用以下CMSIS-RTOS2函数:
    osKernelGetSysTimerCount, osKernelGetSysTimerFreq
    osThreadFlagsSet
    osEventFlagsSet, osEventFlagsClear, osEventFlagsGet, osEventFlagsWait
    osSemaphoreAcquire, osSemaphoreRelease, osSemaphoreGetCount
    osMemoryPoolAlloc, osMemoryPoolFree, osMemoryPoolGetCapacity, osMemoryPoolGetBlockSize, osMemoryPoolGetCount, osMemoryPoolGetSpace
    osMessageQueuePut, osMessageQueueGet, osMessageQueueGetCapacity, osMessageQueueGetMsgSize, osMessageQueueGetCount, osMessageQueueGetSpace
    osKernelGetInfo, osKernelGetState, osKernelGetTickCount, osKernelGetTickFreq, osKernelGetSysTimerCount, osKernelGetSysTimerFreq
    osThreadGetId, osThreadFlagsSet
    osEventFlagsSet, osEventFlagsClear, osEventFlagsGet, osEventFlagsWait
    osSemaphoreAcquire, osSemaphoreRelease, osSemaphoreGetCount
    osMemoryPoolAlloc, osMemoryPoolFree, osMemoryPoolGetCapacity, osMemoryPoolGetBlockSize, osMemoryPoolGetCount, osMemoryPoolGetSpace
    osMessageQueuePut, osMessageQueueGet, osMessageQueueGetCapacity, osMessageQueueGetMsgSize, osMessageQueueGetCount, osMessageQueueGetSpace


    目前支持CMSIS RTOSV2 API    的主要是RTX、FreeRTOS, mbed OS(这个的内涵就是RTX) . 其他需要进行API转换。对于习惯裸机编程的,从CMSIS RTOSV2 API  入手使用RTOS是最好的选择,可以迅速理解RTOS的核心, 还可以自由使用自己的裸机设计。
    设计上,如果不是需要那些RTOS陪伴的各种所谓组件如文件系统、tcp/ip、各种设备驱动等,其实有个CMSIS RTOSV2 API  足够了,即使那些驱动也一样可以使用原来的,没有多大更换的必要。

    在Cortex M/ 上开发, 使用 统一CMSIS标准,无疑会方便很多!
    该会员没有填写今日想说内容.
    回复

    使用道具 举报

  • TA的每日心情
    擦汗
    2021-7-5 15:45
  • 签到天数: 664 天

    连续签到: 1 天

    [LV.9]以坛为家II

    42

    主题

    1594

    帖子

    19

    金牌会员

    Rank: 6Rank: 6

    积分
    5650
    最后登录
    2021-12-22
     楼主| 发表于 2020-10-9 16:15:26 | 显示全部楼层

    支持一下~~
    该会员没有填写今日想说内容.
    回复

    使用道具 举报

    您需要登录后才可以回帖 注册/登录

    本版积分规则

    关闭

    站长推荐上一条 /3 下一条

    Archiver|手机版|小黑屋|恩智浦技术社区

    GMT+8, 2025-9-19 06:18 , Processed in 0.087301 second(s), 20 queries , MemCache On.

    Powered by Discuz! X3.4

    Copyright © 2001-2024, Tencent Cloud.

    快速回复 返回顶部 返回列表