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

📄 os_cpu_a.lst

📁 这是一个UCOS的AVR移植程序
💻 LST
📖 第 1 页 / 共 5 页
字号:
  38               	#define OS_TICKS_PER_SEC         100    /* Set the number of ticks in one second                   
  39               	
  40               	
  41               	                                       /* ----------------------- EVENT FLAGS ---------------------
  42               	#define OS_FLAG_EN                0    /* Enable (1) or Disable (0) code generation for EVENT FLAGS
  43               	#define OS_FLAG_WAIT_CLR_EN       0    /* Include code for Wait on Clear EVENT FLAGS               
  44               	#define OS_FLAG_ACCEPT_EN         0    /*     Include code for OSFlagAccept()                      
  45               	#define OS_FLAG_DEL_EN            0    /*     Include code for OSFlagDel()                         
  46               	#define OS_FLAG_NAME_SIZE        32    /*     Determine the size of the name of an event flag group
  47               	#define OS_FLAG_QUERY_EN          0    /*     Include code for OSFlagQuery()                       
  48               	
  49               	
  50               	                                       /* -------------------- MESSAGE MAILBOXES ------------------
  51               	#define OS_MBOX_EN                0    /* Enable (1) or Disable (0) code generation for MAILBOXES  
  52               	#define OS_MBOX_ACCEPT_EN         0    /*     Include code for OSMboxAccept()                      
  53               	#define OS_MBOX_DEL_EN            0    /*     Include code for OSMboxDel()                         
  54               	#define OS_MBOX_POST_EN           0    /*     Include code for OSMboxPost()                        
  55               	#define OS_MBOX_POST_OPT_EN       0    /*     Include code for OSMboxPostOpt()                     
  56               	#define OS_MBOX_QUERY_EN          0    /*     Include code for OSMboxQuery()                       
  57               	
  58               	
  59               	                                       /* --------------------- MEMORY MANAGEMENT -----------------
  60               	#define OS_MEM_EN                 0    /* Enable (1) or Disable (0) code generation for MEMORY MANA
  61               	#define OS_MEM_QUERY_EN           0    /*     Include code for OSMemQuery()                        
  62               	#define OS_MEM_NAME_SIZE         32    /*     Determine the size of a memory partition name        
  63               	
  64               	
  65               	                                       /* ---------------- MUTUAL EXCLUSION SEMAPHORES ------------
  66               	#define OS_MUTEX_EN               0    /* Enable (1) or Disable (0) code generation for MUTEX      
  67               	#define OS_MUTEX_ACCEPT_EN        0    /*     Include code for OSMutexAccept()                     
  68               	#define OS_MUTEX_DEL_EN           0    /*     Include code for OSMutexDel()                        
  69               	#define OS_MUTEX_QUERY_EN         0    /*     Include code for OSMutexQuery()                      
  70               	
  71               	
  72               	                                       /* ---------------------- MESSAGE QUEUES -------------------
  73               	#define OS_Q_EN                   0    /* Enable (1) or Disable (0) code generation for QUEUES     
  74               	#define OS_Q_ACCEPT_EN            0    /*     Include code for OSQAccept()                         
  75               	#define OS_Q_DEL_EN               0    /*     Include code for OSQDel()                            
  76               	#define OS_Q_FLUSH_EN             0    /*     Include code for OSQFlush()                          
  77               	#define OS_Q_POST_EN              0    /*     Include code for OSQPost()                           
  78               	#define OS_Q_POST_FRONT_EN        0    /*     Include code for OSQPostFront()                      
  79               	#define OS_Q_POST_OPT_EN          0    /*     Include code for OSQPostOpt()                        
  80               	#define OS_Q_QUERY_EN             0    /*     Include code for OSQQuery()                          
  81               	
  82               	
  83               	                                       /* ------------------------ SEMAPHORES ---------------------
  84               	#define OS_SEM_EN                 1    /* Enable (1) or Disable (0) code generation for SEMAPHORES 
  85               	#define OS_SEM_SET_EN             0    
  86               	#define OS_SEM_ACCEPT_EN          0    /*    Include code for OSSemAccept()                        
  87               	#define OS_SEM_DEL_EN             0    /*    Include code for OSSemDel()                           
  88               	#define OS_SEM_QUERY_EN           0    /*    Include code for OSSemQuery()                         
  89               	
  90               	
  91               	                                       /* --------------------- TASK MANAGEMENT -------------------
  92               	#define OS_TASK_CHANGE_PRIO_EN    0    /*     Include code for OSTaskChangePrio()                  
  93               	#define OS_TASK_CREATE_EN         1    /*     Include code for OSTaskCreate()                      
  94               	#define OS_TASK_CREATE_EXT_EN     0    /*     Include code for OSTaskCreateExt()                   
  95               	#define OS_TASK_DEL_EN            0    /*     Include code for OSTaskDel()                         
  96               	#define OS_TASK_NAME_SIZE        32    /*     Determine the size of a task name                    
  97               	#define OS_TASK_PROFILE_EN        0    /*     Include variables in OS_TCB for profiling            
  98               	#define OS_TASK_QUERY_EN          0    /*     Include code for OSTaskQuery()                       
  99               	#define OS_TASK_SUSPEND_EN        1    /*     Include code for OSTaskSuspend() and OSTaskResume()  
 100               	#define OS_TASK_SW_HOOK_EN        1    /*     Include code for OSTaskSwHook()                      
 101               	
 102               	
 103               	                                       /* --------------------- TIME MANAGEMENT -------------------
 104               	#define OS_TIME_DLY_HMSM_EN       1    /*     Include code for OSTimeDlyHMSM()                     
 105               	#define OS_TIME_DLY_RESUME_EN     0    /*     Include code for OSTimeDlyResume()                   
 106               	#define OS_TIME_GET_SET_EN        0    /*     Include code for OSTimeGet() and OSTimeSet()         
 107               	#define OS_TIME_TICK_HOOK_EN      1    /*     Include code for OSTimeTickHook()                    
 108               	
 109               	
 110               	typedef INT8U             OS_FLAGS;    /* Data type for event flag bits (8, 16 or 32 bits)         
 111               	
  70               	
  71               	#ifndef OS_TASK_SW_HOOK_EN
  72               	#define OS_TASK_SW_HOOK_EN 1
  73               	#endif
  74               		
  75               	;**************************************************************************************************
  76               	;                                          PUBLIC DECLARATIONS
  77               	;**************************************************************************************************
  78               	
  79               	                .global OSStartHighRdy
  80               	                .global OSCtxSw
  81               	                .global OSIntCtxSw
  82               	                .global	OSTickISR
  83               	
  84               	;**************************************************************************************************
  85               	;                                         EXTERNAL DECLARATIONS
  86               	;**************************************************************************************************
  87               	
  88               	                .extern	OSIntExit
  89               	                .extern	OSIntNesting
  90               	                .extern	OSPrioCur
  91               	                .extern	OSPrioHighRdy
  92               	                .extern	OSRunning
  93               	#if OS_TASK_SW_HOOK_EN > 0
  94               	                .extern	OSTaskSwHook
  95               	#endif
  96               	                .extern	OSTCBCur
  97               	                .extern	OSTCBHighRdy
  98               	                .extern	OSTimeTick
  99               	
 100               	;**************************************************************************************************
 101               	;                                         MACROS
 102               	;**************************************************************************************************
 103               	
 104               	; Push all registers and the status register	
 105               	.macro	PUSHRS
 106               	
 107               	                push	r0
 108               	                push	r1
 109               	                push	r2
 110               	                push	r3
 111               	                push	r4
 112               	                push	r5
 113               	                push	r6
 114               	                push	r7
 115               	                push	r8
 116               	                push	r9
 117               	                push	r10
 118               	                push	r11
 119               	                push	r12
 120               	                push	r13
 121               	                push	r14
 122               	                push	r15
 123               	                push	r16
 124               	                push	r17
 125               	                push	r18
 126               	                push	r19
 127               	                push	r20
 128               	                push	r21
 129               	                push	r22
 130               	                push	r23
 131               	                push	r24
 132               	                push	r25
 133               	                push	r26
 134               	                push	r27
 135               	                push	r28
 136               	                push	r29
 137               	                push	r30
 138               	                push	r31
 139               	#ifdef RAMPZ
 140               	                in      r16,_SFR_IO_ADDR(RAMPZ)
 141               	                push	r16
 142               	#endif
 143               	.endm
 144               	
 145               	; Pop all registers and the status registers
 146               	.macro	POPRS
 147               	
 148               	#ifdef RAMPZ
 149               	                pop     r16
 150               	                out     _SFR_IO_ADDR(RAMPZ),r16
 151               	#endif
 152               	                pop     r31
 153               	                pop     r30
 154               	                pop     r29
 155               	                pop     r28
 156               	                pop     r27
 157               	                pop     r26
 158               	                pop     r25
 159               	                pop     r24
 160               	                pop     r23
 161               	                pop     r22
 162               	                pop     r21
 163               	                pop     r20
 164               	                pop     r19
 165               	                pop     r18
 166               	                pop     r17
 167               	                pop     r16
 168               	                pop     r15
 169               	                pop     r14
 170               	                pop     r13
 171               	                pop     r12
 172               	                pop     r11
 173               	                pop     r10
 174               	                pop     r9
 175               	                pop     r8
 176               	                pop     r7
 177               	                pop     r6
 178               	                pop     r5
 179               	                pop     r4
 180               	                pop     r3
 181               	                pop     r2
 182               	                pop     r1
 183               	                pop     r0
 184               	
 185               	.endm
 186               	
 187               	.macro	POPSREG
 188               	
 189               	                pop     r16
 190               	                out     _SFR_IO_ADDR(SREG),r16
 191               	
 192               	.endm
 193               	
 194               	.macro	PUSHSREG
 195               	
 196               	                in      r16,_SFR_IO_ADDR(SREG)
 197               	                push	r16
 198               	
 199               	.endm
 200               	
 201               	.macro	PUSHSREGISR
 202               	
 203               	                in      r16,_SFR_IO_ADDR(SREG)
 204               	                sbr     r16,0x80
 205               	                push	r16
 206               	
 207               	.endm
 208               	
 209               	
 210               	                	.text
 211               	                	.section	.text
 212               				
 213               	
 214               	;**************************************************************************************************
 215               	;                               START HIGHEST PRIORITY TASK READY-TO-RUN
 216               	;
 217               	; Description : This function is called by OSStart() to start the highest priority task that was cr
 218               	;               by your application before calling OSStart().
 219               	;
 220               	; Note(s)     : 1) The (data)stack frame is assumed to look as follows:
 221               	;
 222               	;                  OSTCBHighRdy->OSTCBStkPtr --> LSB of (return) stack pointer           (Low memor
 223               	;                                                SPH of (return) stack pointer
 224               	;                                                Flags to load in status register
 225               	;                                                R31
 226               	;                                                R30
 227               	;                                                R7
 228               	;                                                .
 229               	;                

⌨️ 快捷键说明

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