/*----------------------------------------------------------------------------
* CMSIS-RTOS - RTX
*----------------------------------------------------------------------------
* Name: rt_CMSIS.c
* Purpose: CMSIS RTOS API
* Rev.: V4.82
*----------------------------------------------------------------------------
*
* Copyright (c) 1999-2009 KEIL, 2009-2017 ARM Germany GmbH. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*---------------------------------------------------------------------------*/
#define __CMSIS_GENERIC
#if defined (__CORTEX_M4) || defined (__CORTEX_M4F)
#include "core_cm4.h"
#elif defined (__CORTEX_M3)
#include "core_cm3.h"
#elif defined (__CORTEX_M0)
#include "core_cm0.h"
#else
#error "Missing __CORTEX_Mx definition"
#endif
#include "rt_TypeDef.h"
#include "RTX_Config.h"
#include "rt_System.h"
#include "rt_Task.h"
#include "rt_Event.h"
#include "rt_List.h"
#include "rt_Time.h"
#include "rt_Mutex.h"
#include "rt_Semaphore.h"
#include "rt_Mailbox.h"
#include "rt_MemBox.h"
#include "rt_Memory.h"
#include "rt_HAL_CM.h"
#define os_thread_cb OS_TCB
#include "cmsis_os.h"
#if (osFeature_Signals != 16)
#error Invalid "osFeature_Signals" value!
#endif
#if (osFeature_Semaphore > 65535)
#error Invalid "osFeature_Semaphore" value!
#endif
#if (osFeature_Wait != 0)
#error osWait not supported!
#endif
// ==== Enumeration, structures, defines ====
// Service Calls defines
#if defined (__CC_ARM) /* ARM Compiler */
#define __NO_RETURN __declspec(noreturn)
#define osEvent_type osEvent
#define osEvent_ret_status ret
#define osEvent_ret_value ret
#define osEvent_ret_msg ret
#define osEvent_ret_mail ret
#define osCallback_type osCallback
#define osCallback_ret ret
#define SVC_0_1(f,t,...) \
__svc_indirect(0) t _##f (t(*)()); \
t f (void); \
__attribute__((always_inline)) \
static __inline t __##f (void) { \
return _##f(f); \
}
#define SVC_1_0(f,t,t1,...) \
__svc_indirect(0) t _##f (t(*)(t1),t1); \
t f (t1 a1); \
__attribute__((always_inline)) \
static __inline t __##f (t1 a1) { \
_##f(f,a1); \
}
#define SVC_1_1(f,t,t1,...) \
__svc_indirect(0) t _##f (t(*)(t1),t1); \
t f (t1 a1); \
__attribute__((always_inline)) \
static __inline t __##f (t1 a1) { \
return _##f(f,a1); \
}
#define SVC_2_1(f,t,t1,t2,...) \
__svc_indirect(0) t _##f (t(*)(t1,t2),t1,t2); \
t f (t1 a1, t2 a2); \
__attribute__((always_inline)) \
static __inline t __##f (t1 a1, t2 a2) { \
return _##f(f,a1,a2); \
}
#define SVC_3_1(f,t,t1,t2,t3,...) \
__svc_indirect(0) t _##f (t(*)(t1,t2,t3),t1,t2,t3); \
t f (t1 a1, t2 a2, t3 a3); \
__attribute__((always_inline)) \
static __inline t __##f (t1 a1, t2 a2, t3 a3) { \
return _##f(f,a1,a2,a3); \
}
#define SVC_4_1(f,t,t1,t2,t3,t4,...) \
__svc_indirect(0) t _##f (t(*)(t1,t2,t3,t4),t1,t2,t3,t4); \
t f (t1 a1, t2 a2, t3 a3, t4 a4); \
__attribute__((always_inline)) \
static __inline t __##f (t1 a1, t2 a2, t3 a3, t4 a4) { \
return _##f(f,a1,a2,a3,a4); \
}
#define SVC_1_2 SVC_1_1
#define SVC_1_3 SVC_1_1
#define SVC_2_3 SVC_2_1
#elif defined (__GNUC__) /* GNU Compiler */
#define __NO_RETURN __attribute__((noreturn))
typedef uint32_t __attribute__((vector_size(8))) ret64;
typedef uint32_t __attribute__((vector_size(16))) ret128;
#define RET_pointer __r0
#define RET_int32_t __r0
#define RET_uint32_t __r0
#define RET_osStatus __r0
#define RET_osPriority __r0
#define RET_osEvent {(osStatus)__r0, {(uint32_t)__r1}, {(void *)__r2}}
#define RET_osCallback {(void *)__r0, (void *)__r1}
#define osEvent_type __attribute__((pcs("aapcs"))) ret128
#define osEvent_ret_status (ret128){ret.status}
#define osEvent_ret_value (ret128){ret.status, ret.value.v}
#define osEvent_ret_msg (ret128){ret.status, ret.value.v, (uint32_t)ret.def.message_id}
#define osEvent_ret_mail (ret128){ret.status, ret.value.v, (uint32_t)ret.def.mail_id}
#define osCallback_type __attribute__((pcs("aapcs"))) ret64
#define osCallback_ret (ret64) {(uint32_t)ret.fp, (uint32_t)ret.arg}
#define SVC_ArgN(n) \
register int __r##n __asm("r"#n);
#define SVC_ArgR(n,t,a) \
register t __r##n __asm("r"#n) = a;
#define SVC_Arg0() \
SVC_ArgN(0) \
SVC_ArgN(1) \
SVC_ArgN(2) \
SVC_ArgN(3)
#define SVC_Arg1(t1) \
SVC_ArgR(0,t1,a1) \
SVC_ArgN(1) \
SVC_ArgN(2) \
SVC_ArgN(3)
#define SVC_Arg2(t1,t2) \
SVC_ArgR(0,t1,a1) \
SVC_ArgR(1,t2,a2) \
SVC_ArgN(2) \
SVC_ArgN(3)
#define SVC_Arg3(t1,t2,t3) \
SVC_ArgR(0,t1,a1) \
SVC_ArgR(1,t2,a2) \
SVC_ArgR(2,t3,a3) \
SVC_ArgN(3)
#define SVC_Ar
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
RTX官方源代码,提取自CMSIS 5.4.0.zip (85个子文件)
RTX
UserCodeTemplates
Thread.c 875B
main.c 731B
osObjects.h 2KB
MailQueue.c 3KB
Timer.c 2KB
MsgQueue.c 3KB
MemPool.c 2KB
Semaphore.c 2KB
Mutex.c 2KB
LIB
ARM
RTX_CM3_B.lib 581KB
RTX_CM4_IFX.lib 595KB
RTX_CM3_IFX.lib 581KB
RTX_CM3.lib 580KB
RTX_CM4_B.lib 595KB
RTX_CM4.lib 595KB
RTX_CM0_B.lib 571KB
RTX_CM0.lib 571KB
IAR
RTX_CM4_B.a 416KB
RTX_CM0.a 403KB
RTX_CM3_B.a 408KB
RTX_CM3.a 408KB
RTX_CM0_B.a 403KB
RTX_CM4.a 417KB
GCC
libRTX_CM4.a 277KB
libRTX_CM0.a 259KB
libRTX_CM3.a 277KB
libRTX_CM3_IFX.a 277KB
libRTX_CM4_IFX.a 277KB
libRTX_CM0_B.a 259KB
libRTX_CM3_B.a 277KB
libRTX_CM4_B.a 277KB
SRC
rt_MemBox.c 5KB
rt_Mutex.c 7KB
rt_Memory.c 4KB
rt_Mutex.h 2KB
rt_List.c 9KB
ARM
CM4F_BE
RTX_Lib_CM.uvoptx 44KB
CM0_LE
RTE
_CM3_LE
RTE_Components.h 345B
_CM4F_BE
RTE_Components.h 349B
_CM4F_LE
RTE_Components.h 349B
_CM0_LE
RTE_Components.h 345B
HAL_CM4.c 9KB
CM4F_LE
SVC_Table.s 2KB
HAL_CM3.c 8KB
HAL_CM0.c 9KB
CM3_LE
RTX_Lib_CM.uvprojx 228KB
rt_System.h 2KB
rt_List.h 2KB
rt_Time.c 3KB
rt_Robin.c 3KB
rt_TypeDef.h 8KB
rt_Semaphore.h 2KB
rt_Task.h 3KB
rt_Mailbox.c 9KB
rt_Robin.h 1KB
rt_Event.h 2KB
rt_Mailbox.h 2KB
rt_Semaphore.c 5KB
rt_CMSIS.c 67KB
IAR
HAL_CM4.s 10KB
HAL_CM0.s 9KB
RTX_Lib_CM.ewp 193KB
RTX_Lib_CM.eww 164B
SVC_Table.s 2KB
HAL_CM3.s 8KB
GCC
RTX_Lib_CM.uvoptx 40KB
HAL_CM3.S 9KB
HAL_CM4.S 12KB
HAL_CM0.S 11KB
SVC_Table.S 2KB
RTX_Lib_CM.uvprojx 143KB
rt_Timer.h 1KB
RTX_Config.h 3KB
rt_Task.c 13KB
rt_MemBox.h 2KB
rt_Memory.h 2KB
rt_Time.h 2KB
rt_Timer.c 4KB
rt_System.c 8KB
HAL_CM.c 5KB
rt_Event.c 6KB
rt_HAL_CM.h 8KB
INC
RTX_CM_lib.h 17KB
cmsis_os.h 31KB
Templates
RTX_Conf_CM.c 10KB
共 85 条
- 1
资源评论
chicken_wing_is_good
- 粉丝: 7
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 2022年各城市PM2.5, PM10, SO2, NO2等环境空气质量数据
- Golang:通过Gin框架+Redis+责任链,实现一个简单的钉钉机器人,进行消息处理 ps:多应用版
- 2021年各城市PM2.5, PM10, SO2, NO2等环境空气质量数据
- CORRUPT.navicat150-premium-cs-x64.exe
- centos7 ssh 升级至 9.6p1
- DriverMax Pro .exe
- PHP端通过modbus协议跟第三方设备进行数据通信
- navicat安装包亲测可用
- 算法部署-使用OpenVINO部署MobileStyleGAN轻量化高保真图像合成算法-项目源码-优质项目实战.zip
- 基于java实现远程采集华为逆变器使用modbus tcp协议进行通讯的设备数据
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功