The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
Anna Bridge
Date:
Fri Jun 22 15:38:59 2018 +0100
Revision:
169:a7c7b631e539
Parent:
158:1c57384330a6
Child:
170:e95d10626187
mbed library. Release version 162

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AnnaBridge 156:ff21514d8981 1
AnnaBridge 156:ff21514d8981 2 /** \addtogroup platform */
AnnaBridge 158:1c57384330a6 3 /** @{*/
AnnaBridge 158:1c57384330a6 4 /**
AnnaBridge 158:1c57384330a6 5 * \defgroup platform_PlatformMutex PlatformMutex class
AnnaBridge 158:1c57384330a6 6 * @{
AnnaBridge 158:1c57384330a6 7 */
AnnaBridge 156:ff21514d8981 8 /* mbed Microcontroller Library
AnnaBridge 156:ff21514d8981 9 * Copyright (c) 2006-2013 ARM Limited
AnnaBridge 156:ff21514d8981 10 *
AnnaBridge 156:ff21514d8981 11 * Licensed under the Apache License, Version 2.0 (the "License");
AnnaBridge 156:ff21514d8981 12 * you may not use this file except in compliance with the License.
AnnaBridge 156:ff21514d8981 13 * You may obtain a copy of the License at
AnnaBridge 156:ff21514d8981 14 *
AnnaBridge 156:ff21514d8981 15 * http://www.apache.org/licenses/LICENSE-2.0
AnnaBridge 156:ff21514d8981 16 *
AnnaBridge 156:ff21514d8981 17 * Unless required by applicable law or agreed to in writing, software
AnnaBridge 156:ff21514d8981 18 * distributed under the License is distributed on an "AS IS" BASIS,
AnnaBridge 156:ff21514d8981 19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
AnnaBridge 156:ff21514d8981 20 * See the License for the specific language governing permissions and
AnnaBridge 156:ff21514d8981 21 * limitations under the License.
AnnaBridge 156:ff21514d8981 22 */
AnnaBridge 156:ff21514d8981 23 #ifndef PLATFORM_MUTEX_H
AnnaBridge 156:ff21514d8981 24 #define PLATFORM_MUTEX_H
AnnaBridge 156:ff21514d8981 25
AnnaBridge 156:ff21514d8981 26 #include "platform/NonCopyable.h"
AnnaBridge 156:ff21514d8981 27
AnnaBridge 156:ff21514d8981 28 #ifdef MBED_CONF_RTOS_PRESENT
AnnaBridge 156:ff21514d8981 29 #include "rtos/Mutex.h"
AnnaBridge 156:ff21514d8981 30 typedef rtos::Mutex PlatformMutex;
AnnaBridge 156:ff21514d8981 31 #else
AnnaBridge 156:ff21514d8981 32 /** A stub mutex for when an RTOS is not present
AnnaBridge 156:ff21514d8981 33 */
AnnaBridge 156:ff21514d8981 34 class PlatformMutex : private mbed::NonCopyable<PlatformMutex> {
AnnaBridge 156:ff21514d8981 35 public:
AnnaBridge 156:ff21514d8981 36 PlatformMutex() {
AnnaBridge 156:ff21514d8981 37 // Stub
AnnaBridge 156:ff21514d8981 38
AnnaBridge 156:ff21514d8981 39 }
AnnaBridge 156:ff21514d8981 40 ~PlatformMutex() {
AnnaBridge 156:ff21514d8981 41 // Stub
AnnaBridge 156:ff21514d8981 42 }
AnnaBridge 156:ff21514d8981 43
AnnaBridge 156:ff21514d8981 44 void lock() {
AnnaBridge 156:ff21514d8981 45 // Do nothing
AnnaBridge 156:ff21514d8981 46 }
AnnaBridge 156:ff21514d8981 47
AnnaBridge 156:ff21514d8981 48 void unlock() {
AnnaBridge 156:ff21514d8981 49 // Do nothing
AnnaBridge 156:ff21514d8981 50 }
AnnaBridge 156:ff21514d8981 51 };
AnnaBridge 156:ff21514d8981 52
AnnaBridge 156:ff21514d8981 53 #endif
AnnaBridge 156:ff21514d8981 54
AnnaBridge 156:ff21514d8981 55 #endif
AnnaBridge 156:ff21514d8981 56
AnnaBridge 158:1c57384330a6 57 /**@}*/
AnnaBridge 158:1c57384330a6 58
AnnaBridge 158:1c57384330a6 59 /**@}*/