123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- .include data_model.h
- .global xTaskIncrementTick
- .global vTaskSwitchContext
- .global vPortSetupTimerInterrupt
- .global pxCurrentTCB
- .global usCriticalNesting
- .def vPortPreemptiveTickISR
- .def vPortCooperativeTickISR
- .def vPortYield
- .def xPortStartScheduler
- portSAVE_CONTEXT .macro
-
- pushm_x
- mov.w &usCriticalNesting, r14
- push_x r14
- mov_x &pxCurrentTCB, r12
- mov_x sp, 0( r12 )
- .endm
- portRESTORE_CONTEXT .macro
- mov_x &pxCurrentTCB, r12
- mov_x @r12, sp
- pop_x r15
- mov.w r15, &usCriticalNesting
- popm_x
- nop
- pop.w sr
- nop
- ret_x
- .endm
- .text
- .align 2
- vPortPreemptiveTickISR: .asmfunc
-
-
- push.w sr
- portSAVE_CONTEXT
- call_x
- call_x
- portRESTORE_CONTEXT
- .endasmfunc
- .align 2
- vPortCooperativeTickISR: .asmfunc
-
-
- push.w sr
- portSAVE_CONTEXT
- call_x
- portRESTORE_CONTEXT
- .endasmfunc
- ;
- ;
- .align 2
- vPortYield: .asmfunc
-
- push.w sr
-
- dint
- nop
-
- portSAVE_CONTEXT
-
- call_x
-
- portRESTORE_CONTEXT
- .endasmfunc
- ;
- ;
- .align 2
- xPortStartScheduler: .asmfunc
-
-
- call_x
-
- portRESTORE_CONTEXT
- .endasmfunc
- .end
|