Update MPU wrapper for xTimerGenericCommand API (#734)

* Update xTimerGenericCommand API as per SMP branch

Signed-off-by: kar-rahul-aws <karahulx@amazon.com>

* Fix formatting

* Code review changes

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Fix Formatting

---------

Signed-off-by: kar-rahul-aws <karahulx@amazon.com>
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
kar-rahul-aws
2023-08-01 20:12:58 +05:30
committed by GitHub
parent 0066c28cb2
commit b51a37314c
36 changed files with 693 additions and 799 deletions

View File

@ -945,28 +945,22 @@ MPU_xTimerGetTimerDaemonTaskHandle:
bx lr
/*-----------------------------------------------------------*/
PUBLIC MPU_xTimerGenericCommand
MPU_xTimerGenericCommand:
PUBLIC MPU_xTimerGenericCommandFromTask
MPU_xTimerGenericCommandFromTask:
push {r0, r1}
/* This function can be called from ISR also and therefore, we need a check
* to take privileged path, if called from ISR. */
mrs r0, ipsr
cmp r0, #0
bne MPU_xTimerGenericCommand_Priv
mrs r0, control
movs r1, #1
tst r0, r1
beq MPU_xTimerGenericCommand_Priv
MPU_xTimerGenericCommand_Unpriv:
bne MPU_xTimerGenericCommandFromTask_Unpriv
MPU_xTimerGenericCommandFromTask_Priv:
pop {r0, r1}
b MPU_xTimerGenericCommandFromTaskImpl
MPU_xTimerGenericCommandFromTask_Unpriv:
pop {r0, r1}
svc #portSVC_SYSTEM_CALL_ENTER_1
bl MPU_xTimerGenericCommandImpl
bl MPU_xTimerGenericCommandFromTaskImpl
svc #portSVC_SYSTEM_CALL_EXIT
bx lr
MPU_xTimerGenericCommand_Priv:
pop {r0, r1}
b MPU_xTimerGenericCommandImpl
/*-----------------------------------------------------------*/
PUBLIC MPU_pcTimerGetName
@ -1532,9 +1526,9 @@ MPU_xTimerIsTimerActiveImpl:
MPU_xTimerGetTimerDaemonTaskHandleImpl:
b MPU_xTimerGetTimerDaemonTaskHandleImpl
PUBWEAK MPU_xTimerGenericCommandImpl
MPU_xTimerGenericCommandImpl:
b MPU_xTimerGenericCommandImpl
PUBWEAK MPU_xTimerGenericCommandFromTaskImpl
MPU_xTimerGenericCommandFromTaskImpl:
b MPU_xTimerGenericCommandFromTaskImpl
PUBWEAK MPU_pcTimerGetNameImpl
MPU_pcTimerGetNameImpl: