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

📄 os_cpu_c.lst

📁 uCos-ii 2.86 在C8051F410单片机上移植成功!!! 其中包括:UART驱动
💻 LST
📖 第 1 页 / 共 2 页
字号:
 167          *
 168          * 描述       : 这个函数每秒钟被uC/OS-II统计任务调用。这么做使你的应用程序可以增加统计任务的功能。
 169          *
 170          * 注意       : 无
 171          *********************************************************************************************************
 172          */
 173          
 174          /*
 175          void OSTaskStatHook (void) reentrant
 176          {
 177          }
 178          
C51 COMPILER V8.17   OS_CPU_C                                                              03/26/2009 14:24:23 PAGE 4   

 179          */
 180          
 181          
 182          /*
 183          *********************************************************************************************************
 184          *                                       OS INITIALIZATION HOOK
 185          *                                            (BEGINNING)
 186          *
 187          * Description: This function is called by OSInit() at the beginning of OSInit().
 188          *
 189          * Arguments  : none
 190          *
 191          * Note(s)    : 1) Interrupts should be disabled during this call.
 192          *********************************************************************************************************
 193          */
 194          #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
 195          void  OSInitHookBegin (void)
 196          {
 197   1      }
 198          #endif
 199          
 200          /*
 201          *********************************************************************************************************
 202          *                                       OS INITIALIZATION HOOK
 203          *                                               (END)
 204          *
 205          * Description: This function is called by OSInit() at the end of OSInit().
 206          *
 207          * Arguments  : none
 208          *
 209          * Note(s)    : 1) Interrupts should be disabled during this call.
 210          *********************************************************************************************************
 211          */
 212          #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
 213          void  OSInitHookEnd (void)
 214          {
 215   1      }
 216          #endif
 217          
 218          
 219          /*
 220          *********************************************************************************************************
 221          *                                             IDLE TASK HOOK
 222          *
 223          * Description: This function is called by the idle task.  This hook has been added to allow you to do  
 224          *              such things as STOP the CPU to conserve power.
 225          *
 226          * Arguments  : none
 227          *
 228          * Note(s)    : 1) Interrupts are enabled during this call.
 229          *********************************************************************************************************
 230          */
 231          #if OS_CPU_HOOKS_EN > 0 && OS_VERSION >= 251
 232          void  OSTaskIdleHook (void)reentrant
 233          {
 234   1      }
 235          #endif
 236          
 237          /*
 238          *********************************************************************************************************
 239          *                                           OSTCBInit() HOOK
 240          *
C51 COMPILER V8.17   OS_CPU_C                                                              03/26/2009 14:24:23 PAGE 5   

 241          * Description: This function is called by OS_TCBInit() after setting up most of the TCB.
 242          *
 243          * Arguments  : ptcb    is a pointer to the TCB of the task being created.
 244          *
 245          * Note(s)    : 1) Interrupts may or may not be ENABLED during this call.
 246          *********************************************************************************************************
 247          */
 248          #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
 249          void  OSTCBInitHook (OS_TCB *ptcb) reentrant
 250          {
 251   1          ptcb = ptcb;                                           /* Prevent Compiler warning                 */
 252   1      }
 253          #endif
 254          
 255          
 256          
 257          void serial(void) reentrant
 258          {
 259   1      
 260   1      
 261   1      
 262   1      }
 263          
 264          
 265          
 266          
 267          
 268          
 269          /*
 270          *********************************************************************************************************
 271          *                                          定时钩挂函数
 272          *
 273          * 描述       : 本函数每一滴答被调用一次。
 274          *
 275          * 参数       : 无
 276          *
 277          * 注意       : 1) 在本调用期间中断可以或不可以使能。
 278          *********************************************************************************************************
 279          */
 280          
 281          /*
 282          void OSTimeTickHook (void) reentrant
 283          {
 284             
 285            
 286          
 287          
 288          }
 289          */
 290          
 291          
 292          #endif        
 293          
 294          
 295          
 296          
 297          
 298          
 299          /*
 300          *******************************************************************************
 301          *                                  初始化定时器0
 302          *
C51 COMPILER V8.17   OS_CPU_C                                                              03/26/2009 14:24:23 PAGE 6   

 303          * 说明:本函数在系统初始化时被调用一次
 304          *
 305          * 参数:无
 306          *
 307          *******************************************************************************
 308          */
 309          void InitTimer0(void) reentrant
 310          {     
 311   1         
 312   1          TMOD=TMOD&0xF0;
 313   1          TMOD=TMOD|0x01;  //模式1(16位定时器),仅受TR0控制 
 314   1              
 315   1          CKCON |=0x02;    //系统时钟/48      
 316   1          
 317   1          //Fosc=24.5MHz
 318   1          TH0=0xEC;       //定义Tick=100次/秒(即0.01秒/次)
 319   1          TL0=0x10;       //OS_CPU_A.ASM  和  OS_TICKS_PER_SEC    
 320   1      
 321   1          //ET0=1;       //允许T0中断
 322   1          TR0=1;    
 323   1              
 324   1      }
 325          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    709    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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