⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 uCOS的移植代码,到80xc52系列单片机.
💻
字号:
/*
*********************************************************************************************************
*                                               uC/OS-II
*                                        The Real-Time Kernel
*
*				8052 SPECIFIC ASSEMBLY LANGUAGE CODE
*
*					       Lucas Cruz
*					   80c52 (Large Model)
*
*                                          TASKING 8051 v5.0r2
*
* File         : OS_CPU.H
* By           : Jean J. Labrosse
*********************************************************************************************************
*/

To use this code you need to do some changes in the ucos_ii.h and os_task.c declarations.

In the UCOS_II file you need declare the next variable as:
OS_EXT  INT8U   _data  OSIntNesting;/* Interrupt nesting level                */
OS_EXT  BOOLEAN _data OSRunning;   /* Flag indicating that kernel is running */
OS_EXT  OS_TCB *_data OSTCBCur;    /* Pointer to currently running TCB       */
OS_EXT  OS_TCB *_data OSTCBHighRdy;/* Pointer to highest priority TCB ready to run  */

and the next functions as:
INT8U       OSTaskCreate(void _regparm _reentrant (*task)(void *pd), void *pdato, OS_STK *ptos, INT8U prio);

INT8U       OSTaskCreateExt(void _regparm _reentrant (*task)(void *pd), 
                            void   *pdata, 
                            OS_STK *ptos, 
                            INT8U   prio,
                            INT16U  id,
                            OS_STK *pbos,
                            INT32U  stk_size,
                            void   *pext,
                            INT16U  opt);

OS_STK     *OSTaskStkInit(void _regparm _reentrant (*task)(void *pd), void *pdata, OS_STK *ptos, INT16U opt);

void _reentrant OSTaskIdle(void *pdata);

In os_task.c file you need redeclare the functions as before.

Lucas Cruz
lcm@eresmas.net
-34-616 252857 Tel.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -