Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of nRF51822 by
app_util_platform.c
00001 /* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. 00002 * 00003 * The information contained herein is property of Nordic Semiconductor ASA. 00004 * Terms and conditions of usage are described in detail in NORDIC 00005 * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 00006 * 00007 * Licensees are granted free, non-transferable use of the information. NO 00008 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 00009 * the file. 00010 * 00011 */ 00012 00013 #include "app_util_platform.h " 00014 00015 static uint32_t m_in_critical_region = 0; 00016 00017 void critical_region_enter(void) 00018 { 00019 __disable_irq(); 00020 m_in_critical_region++; 00021 } 00022 00023 void critical_region_exit(void) 00024 { 00025 m_in_critical_region--; 00026 if (m_in_critical_region == 0) 00027 { 00028 __enable_irq(); 00029 } 00030 }
Generated on Tue Jul 12 2022 16:21:02 by
