summaryrefslogtreecommitdiff
path: root/FreeRTOS/Demo/CORTEX_SmartFusion2_M2S050_SoftConsole/RTOSDemo_Hardware_Platform/hal/CortexM3/GNU/hal.s
blob: 36753b6fd75fdbe03c557bfd431a4d701d5ca4d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#-------------------------------------------------------------------------------
# (c) Copyright 2007-2013 Microsemi SoC Products Group. All rights reserved.
# 
# Interrupt disabling/restoration for critical section protection.
#
# SVN $Revision: 5258 $
# SVN $Date: 2013-03-21 12:41:02 +0000 (Thu, 21 Mar 2013) $
#
    .text
    .global HAL_disable_interrupts
    .global HAL_restore_interrupts
    .code 16
    .syntax unified
    .type HAL_disable_interrupts, function
    .type HAL_restore_interrupts, function
#-------------------------------------------------------------------------------
# 
#
HAL_disable_interrupts:    
    mrs r0, PRIMASK
    cpsid I
    bx lr

#-------------------------------------------------------------------------------
#
#
HAL_restore_interrupts:    
    msr PRIMASK, r0
    bx lr

.end