mirror of
https://gitee.com/cosyos/cosyos.git
synced 2026-02-05 19:39:42 +08:00
删除文件 Port/Cortex-M/port_cmx.c
This commit is contained in:
@@ -1,86 +0,0 @@
|
||||
/**************************************************************************//**
|
||||
* @item CosyOS-III Port
|
||||
* @file port_cmx.c
|
||||
* @brief CMSIS Cortex-M Core Port File
|
||||
* @author 迟凯峰
|
||||
* @version V2.0.0
|
||||
* @date 2025.11.16
|
||||
******************************************************************************/
|
||||
|
||||
#include "os_var.h"
|
||||
#ifdef __PORT_CMX_H
|
||||
|
||||
s_u32_t m_basepri = 1;
|
||||
|
||||
|
||||
/*
|
||||
* 中断FIFO服务
|
||||
*/
|
||||
|
||||
#if (MCUCFG_PENDSVFIFO_DEPTH > 0)
|
||||
|
||||
#if (SYSCFG_PENDSVFIFO_MONITOR == __ENABLED__)
|
||||
s_u32_t mPendSV_FIFO_DepthMAX = 0;
|
||||
#endif
|
||||
void *mPendSV_FIFO[2][MCUCFG_PENDSVFIFO_DEPTH + 1];/*!< FIFO0、FIFO1 */
|
||||
void **mPendSV_FIFO_P0 = mPendSV_FIFO[0]; /*!< FIFO0指针 */
|
||||
void **mPendSV_FIFO_P1 = mPendSV_FIFO[1]; /*!< FIFO1指针 */
|
||||
volatile bool m_sign_fifo = true; /*!< FIFO 互斥访问锁:入FIFO与出FIFO的互斥
|
||||
if(m_sign_fifo == true) {中断FIFO服务装载器 入FIFO0,中断FIFO服务处理器 出FIFO1}
|
||||
if(m_sign_fifo == false){中断FIFO服务装载器 入FIFO1,中断FIFO服务处理器 出FIFO0} */
|
||||
#if (MCUCFG_PENDSVFIFO_MUTEX == 2) /*!< 互斥访问机制 */
|
||||
void **mPendSV_FIFO_P2; /*!< FIFO替换指针 */
|
||||
volatile bool m_sign_load = false; /*!< 互斥访问标志 */
|
||||
#endif
|
||||
|
||||
/* 中断FIFO服务处理器 */
|
||||
void mPendSV_FIFOHandler(void)
|
||||
{
|
||||
register void **p;
|
||||
register void *sv;
|
||||
#if (SYSCFG_PENDSVFIFO_MONITOR == __ENABLED__)
|
||||
register s_u32_t depth;
|
||||
#endif
|
||||
|
||||
__LABLE:
|
||||
m_sign_fifo = false;
|
||||
/* 独占访问FIFO0 */
|
||||
if(true){
|
||||
#if (SYSCFG_PENDSVFIFO_MONITOR == __ENABLED__)
|
||||
depth = (s_u32_t)(mPendSV_FIFO_P0 - mPendSV_FIFO[0]);
|
||||
if(depth > mPendSV_FIFO_DepthMAX){
|
||||
mPendSV_FIFO_DepthMAX = depth;
|
||||
}
|
||||
#endif
|
||||
p = mPendSV_FIFO[0];
|
||||
do{
|
||||
sv = *++p;
|
||||
(*sPendSV_FIFOHandler[*(const s_u8_t *)sv])(sv);
|
||||
}while(mPendSV_FIFO_P0 > p);
|
||||
mPendSV_FIFO_P0 = mPendSV_FIFO[0];
|
||||
}
|
||||
m_sign_fifo = true;
|
||||
if(mPendSV_FIFO_P1 == mPendSV_FIFO[1]) return;
|
||||
/* 独占访问FIFO1 */
|
||||
if(true){
|
||||
#if (SYSCFG_PENDSVFIFO_MONITOR == __ENABLED__)
|
||||
depth = (s_u32_t)(mPendSV_FIFO_P1 - mPendSV_FIFO[1]);
|
||||
if(depth > mPendSV_FIFO_DepthMAX){
|
||||
mPendSV_FIFO_DepthMAX = depth;
|
||||
}
|
||||
#endif
|
||||
p = mPendSV_FIFO[1];
|
||||
do{
|
||||
sv = *++p;
|
||||
(*sPendSV_FIFOHandler[*(const s_u8_t *)sv])(sv);
|
||||
}while(mPendSV_FIFO_P1 > p);
|
||||
mPendSV_FIFO_P1 = mPendSV_FIFO[1];
|
||||
}
|
||||
if(mPendSV_FIFO_P0 > mPendSV_FIFO[0]) goto __LABLE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user