takashi kadono / Mbed OS Nucleo_446

Dependencies:   ssd1331

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mbed_critical_stub.c Source File

mbed_critical_stub.c

00001 /*
00002  * Copyright (c) 2017, Arm Limited and affiliates.
00003  * SPDX-License-Identifier: Apache-2.0
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 /* Declare __STDC_LIMIT_MACROS so stdint.h defines UINT32_MAX when using C++ */
00019 #define __STDC_LIMIT_MACROS
00020 #include "hal/critical_section_api.h"
00021 
00022 #include "cmsis.h"
00023 #include "platform/mbed_assert.h"
00024 #include "platform/mbed_critical.h"
00025 #include "platform/mbed_toolchain.h"
00026 
00027 static volatile uint32_t critical_section_reentrancy_counter = 0;
00028 
00029 bool core_util_are_interrupts_enabled(void)
00030 {
00031     return false;
00032 }
00033 
00034 bool core_util_is_isr_active(void)
00035 {
00036     return false;
00037 }
00038 
00039 bool core_util_in_critical_section(void)
00040 {
00041     return false;
00042 }
00043 
00044 void core_util_critical_section_enter(void)
00045 {
00046 }
00047 
00048 void core_util_critical_section_exit(void)
00049 {
00050 }
00051 
00052 bool core_util_atomic_cas_u8(volatile uint8_t *ptr, uint8_t *expectedCurrentValue, uint8_t desiredValue)
00053 {
00054     return false;
00055 }
00056 
00057 bool core_util_atomic_cas_u16(volatile uint16_t *ptr, uint16_t *expectedCurrentValue, uint16_t desiredValue)
00058 {
00059     return false;
00060 }
00061 
00062 
00063 bool core_util_atomic_cas_u32(volatile uint32_t *ptr, uint32_t *expectedCurrentValue, uint32_t desiredValue)
00064 {
00065     return false;
00066 }
00067 
00068 
00069 uint8_t core_util_atomic_incr_u8(volatile uint8_t *valuePtr, uint8_t delta)
00070 {
00071     return 0;
00072 }
00073 
00074 uint16_t core_util_atomic_incr_u16(volatile uint16_t *valuePtr, uint16_t delta)
00075 {
00076     return 0;
00077 }
00078 
00079 uint32_t core_util_atomic_incr_u32(volatile uint32_t *valuePtr, uint32_t delta)
00080 {
00081     return 0;
00082 }
00083 
00084 
00085 uint8_t core_util_atomic_decr_u8(volatile uint8_t *valuePtr, uint8_t delta)
00086 {
00087     return 0;
00088 }
00089 
00090 uint16_t core_util_atomic_decr_u16(volatile uint16_t *valuePtr, uint16_t delta)
00091 {
00092     return 0;
00093 }
00094 
00095 uint32_t core_util_atomic_decr_u32(volatile uint32_t *valuePtr, uint32_t delta)
00096 {
00097     return 0;
00098 }
00099 
00100 
00101 bool core_util_atomic_cas_ptr(void *volatile *ptr, void **expectedCurrentValue, void *desiredValue)
00102 {
00103     return false;
00104 }
00105 
00106 void *core_util_atomic_incr_ptr(void *volatile *valuePtr, ptrdiff_t delta)
00107 {
00108     return NULL;
00109 }
00110 
00111 void *core_util_atomic_decr_ptr(void *volatile *valuePtr, ptrdiff_t delta)
00112 {
00113     return NULL;
00114 }
00115