Platform: Separate internal APIs from public APIs

Also includes:
* rename `mbed_sleep_manager.c` to `mbed_power_mgmt.c` to match its
  header file
* create Doxygen groups for public and internal APIs
* use relative path to include header files where inconsistent
* update references to internal APIs throughout libraries
* update the copyright year for all modified files
pull/11073/head
Hugues Kamba 2019-06-27 09:49:22 +01:00 committed by Evelyne Donnaes
parent bfa1b4dd84
commit 83354e46a7
82 changed files with 363 additions and 259 deletions

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -18,7 +18,7 @@
#define MBED_INTERRUPTMANAGER_H
#include "cmsis.h"
#include "platform/CallChain.h"
#include "platform/internal/CallChain.h"
#include "platform/PlatformMutex.h"
#include "platform/NonCopyable.h"
#include <string.h>

View File

@ -21,7 +21,7 @@
#if DEVICE_SERIAL || defined(DOXYGEN_ONLY)
#include "mbed_toolchain.h"
#include "platform/mbed_toolchain.h"
#include "drivers/SerialBase.h"
#include "platform/NonCopyable.h"
#include <cstdarg>

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 ARM Limited
/* Copyright (c) 2017-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -22,13 +22,14 @@
#define MBED_ATCMDPARSER_H
#include <cstdarg>
#include "Callback.h"
#include "NonCopyable.h"
#include "FileHandle.h"
#include "platform/Callback.h"
#include "platform/NonCopyable.h"
#include "platform/FileHandle.h"
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api Public API */
/** @{*/
/**
* \defgroup platform_ATCmdParser ATCmdParser class

View File

@ -1,5 +1,5 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_CThunk CThunk class
@ -12,7 +12,7 @@
* - supports an optional context parameter for the called function
* - ideally suited for class object receiving interrupts (NVIC_SetVector)
*
* Copyright (c) 2014-2015 ARM Limited
* Copyright (c) 2014-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -39,7 +39,7 @@
#ifndef __CTHUNK_H__
#define __CTHUNK_H__
#include "CThunkBase.h"
#include "platform/internal/CThunkBase.h"
/**
* Class for created a pointer with data bound to it
@ -47,7 +47,7 @@
* @note Synchronization level: Not protected
*/
template<class T>
class CThunk: public CThunkBase {
class CThunk: private CThunkBase {
public:
typedef void (T::*CCallbackSimple)(void);
typedef void (T::*CCallback)(void *context);

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2015 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -24,7 +24,8 @@
#include "platform/mbed_toolchain.h"
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_Callback Callback class

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2015 ARM Limited
* Copyright (c) 2015-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -51,7 +51,8 @@ struct is_unsigned<unsigned long long> {
};
};
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_CircularBuffer CircularBuffer functions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017 ARM Limited
* Copyright (c) 2017-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -18,12 +18,12 @@
#ifndef MBED_CRITICALSECTIONLOCK_H
#define MBED_CRITICALSECTIONLOCK_H
#include "platform/mbed_critical.h"
#include "platform/mbed_toolchain.h"
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_CriticalSectionLock CriticalSectionLock functions
@ -57,15 +57,9 @@ namespace mbed {
*/
class CriticalSectionLock {
public:
CriticalSectionLock()
{
core_util_critical_section_enter();
}
CriticalSectionLock();
~CriticalSectionLock()
{
core_util_critical_section_exit();
}
~CriticalSectionLock();
/** Mark the start of a critical section
* @deprecated This function is inconsistent with RAII and is being removed in the future. Replaced by static function CriticalSectionLock::enable.
@ -74,10 +68,7 @@ public:
MBED_DEPRECATED_SINCE("mbed-os-5.8",
"This function is inconsistent with RAII and is being removed in the future."
"Replaced by static function CriticalSectionLock::enable.")
void lock()
{
core_util_critical_section_enter();
}
void lock();
/** Mark the end of a critical section
* @deprecated This function is inconsistent with RAII and is being removed in the future. Replaced by static function CriticalSectionLock::enable.
@ -86,24 +77,15 @@ public:
MBED_DEPRECATED_SINCE("mbed-os-5.8",
"This function is inconsistent with RAII and is being removed in the future."
"Replaced by static function CriticalSectionLock::disable.")
void unlock()
{
core_util_critical_section_exit();
}
void unlock();
/** Mark the start of a critical section
*/
static void enable()
{
core_util_critical_section_enter();
}
static void enable();
/** Mark the end of a critical section
*/
static void disable()
{
core_util_critical_section_exit();
}
static void disable();
};
/**@}*/

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2017 ARM Limited
* Copyright (c) 2017-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -18,12 +18,12 @@
#define MBED_DEEPSLEEPLOCK_H
#include <limits.h>
#include "platform/mbed_power_mgmt.h"
#include "platform/mbed_atomic.h"
#include <stdint.h>
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_DeepSleepLock DeepSleepLock functions
@ -49,44 +49,17 @@ private:
uint16_t _lock_count;
public:
DeepSleepLock(): _lock_count(1)
{
sleep_manager_lock_deep_sleep();
}
DeepSleepLock();
~DeepSleepLock()
{
if (_lock_count) {
sleep_manager_unlock_deep_sleep();
}
}
~DeepSleepLock();
/** Mark the start of a locked deep sleep section
*/
void lock()
{
uint16_t count = core_util_atomic_incr_u16(&_lock_count, 1);
if (1 == count) {
sleep_manager_lock_deep_sleep();
}
if (0 == count) {
MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_PLATFORM, MBED_ERROR_CODE_OVERFLOW), "DeepSleepLock overflow (> USHRT_MAX)", count);
}
}
void lock();
/** Mark the end of a locked deep sleep section
*/
void unlock()
{
uint16_t count = core_util_atomic_decr_u16(&_lock_count, 1);
if (count == 0) {
sleep_manager_unlock_deep_sleep();
}
if (count == USHRT_MAX) {
core_util_critical_section_exit();
MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_PLATFORM, MBED_ERROR_CODE_UNDERFLOW), "DeepSleepLock underflow (< 0)", count);
}
}
void unlock();
};
/**@}*/

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -18,12 +18,12 @@
#define MBED_DIRHANDLE_H
#include <stdint.h>
#include "platform/platform.h"
#include "platform/FileHandle.h"
#include "platform/mbed_toolchain.h"
#include "platform/NonCopyable.h"
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_DirHandle DirHandle functions

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -31,7 +31,8 @@ typedef enum {
FileSystemPathType
} PathType;
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_FileBase FileBase class
@ -72,4 +73,3 @@ private:
} // namespace mbed
#endif

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2017 ARM Limited
* Copyright (c) 2017-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -20,13 +20,14 @@
typedef int FILEHANDLE;
#include <cstdio>
#include "Callback.h"
#include "platform/Callback.h"
#include "platform/mbed_poll.h"
#include "platform/platform.h"
#include "platform/NonCopyable.h"
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_FileHandle FileHandle functions

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -17,13 +17,13 @@
#ifndef MBED_FILELIKE_H
#define MBED_FILELIKE_H
#include "platform/mbed_toolchain.h"
#include "platform/FileBase.h"
#include "platform/FileHandle.h"
#include "platform/NonCopyable.h"
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_FileLike FileLike class

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -23,7 +23,8 @@
#include "platform/FileLike.h"
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_FilePath FilePath class

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -19,13 +19,13 @@
#include "platform/platform.h"
#include "platform/FileBase.h"
#include "platform/FileHandle.h"
#include "platform/DirHandle.h"
#include "platform/NonCopyable.h"
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_FileSystemHandle FileSystemHandle functions

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -19,13 +19,15 @@
#include "platform/platform.h"
#include "platform/FileBase.h"
#include "platform/FileSystemHandle.h"
#include "platform/FileHandle.h"
#include "platform/DirHandle.h"
#include "platform/NonCopyable.h"
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_FileSystemLike FileSystemLike functions

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2015 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -23,7 +23,8 @@
#include <stdint.h>
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_FunctionPointer FunctionPointer class

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -26,7 +26,8 @@
#include "platform/NonCopyable.h"
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_LocalFileSystem LocalFileSystem functions

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2017 ARM Limited
/* Copyright (c) 2017-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -18,13 +18,14 @@
#define MBED_NONCOPYABLE_H_
#if (!defined(MBED_DEBUG) && (MBED_CONF_PLATFORM_FORCE_NON_COPYABLE_ERROR == 0))
#include "mbed_toolchain.h"
#include "mbed_debug.h"
#include "platform/mbed_toolchain.h"
#include "platform/mbed_debug.h"
#endif
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_NonCopyable NonCopyable class

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -19,9 +19,9 @@
#include "platform/NonCopyable.h"
/** \addtogroup platform
* @{
*/
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/** \defgroup platform_PlatformMutex PlatformMutex class
* @{

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2018 ARM Limited
* Copyright (c) 2018-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -21,7 +21,8 @@
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_ScopedLock ScopedLock functions

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2018 ARM Limited
* Copyright (c) 2018-2019 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -21,7 +21,8 @@
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/** RAII object for disabling, then restoring RAM execute never mode

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2018 ARM Limited
* Copyright (c) 2018-2019 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -21,7 +21,8 @@
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/** RAII object for disabling, then restoring ROM write never mode

View File

@ -1,12 +1,13 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_SingletonPtr SingletonPtr class
* @{
*/
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2018-2018 ARM Limited
* Copyright (c) 2018-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -26,7 +26,8 @@
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_Span Span class

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -19,14 +19,14 @@
#include "platform/platform.h"
#include "platform/FileLike.h"
#include "platform/FileHandle.h"
#include "platform/NonCopyable.h"
#include "mbed_toolchain.h"
#include "platform/mbed_toolchain.h"
#include <cstdio>
#include <cstdarg>
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_Stream Stream class

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2015 ARM Limited
* Copyright (c) 2015-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -18,10 +18,10 @@
#define MBED_TRANSACTION_H
#include "platform/platform.h"
#include "platform/FunctionPointer.h"
namespace mbed {
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_Transaction Transaction class

View File

@ -21,6 +21,13 @@
/* IRQ/Exception compatible thunk entry function */
typedef void (*CThunkEntry)(void);
/** \ingroup platform */
/** \addtogroup platform-internal-api */
/** @{*/
/**
* \defgroup platform_CThunkBase CThunkBase class
* @{
*/
class CThunkBase {
protected:
typedef void (*Trampoline)(CThunkBase *);
@ -74,5 +81,8 @@ private:
}
};
#endif/*__CTHUNK_BASE_H__*/
/**@}*/
/**@}*/
#endif/*__CTHUNK_BASE_H__*/

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -28,7 +28,8 @@ namespace mbed {
typedef Callback<void()> *pFunctionPointer_t;
class CallChainLink;
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-internal-api Internal API */
/** @{*/
/**
* \defgroup platform_CallChain CallChain class
@ -73,7 +74,9 @@ class CallChainLink;
* }
* @endcode
*/
class CallChain : private NonCopyable<CallChain> {
class
MBED_DEPRECATED("CallChain has been deprecated and will be removed.")
CallChain : private NonCopyable<CallChain> {
public:
/** Create an empty chain
* @deprecated
@ -262,4 +265,3 @@ private:
} // namespace mbed
#endif

View File

@ -1,12 +1,13 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_Assert Assert macros
* @{
*/
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -24,8 +25,7 @@
#ifndef MBED_ASSERT_H
#define MBED_ASSERT_H
#include "mbed_preprocessor.h"
#include "mbed_toolchain.h"
#include "platform/mbed_toolchain.h"
#ifdef __cplusplus
extern "C" {

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2015-2016, ARM Limited, All Rights Reserved
* Copyright (c) 2015-2019, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -24,9 +24,10 @@
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include "mbed_toolchain.h"
#include "platform/mbed_toolchain.h"
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2015-2016, ARM Limited, All Rights Reserved
* Copyright (c) 2015-2019, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -25,7 +25,8 @@
extern "C" {
#endif
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_critical critical section function
@ -96,6 +97,3 @@ bool core_util_in_critical_section(void);
#endif
#endif // __MBED_UTIL_CRITICAL_H__

View File

@ -1,5 +1,6 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_debug Debug functions
@ -7,7 +8,7 @@
*/
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -28,7 +29,7 @@
#include <stdio.h>
#include <stdarg.h>
#endif
#include "mbed_toolchain.h"
#include "platform/mbed_toolchain.h"
#ifdef __cplusplus
extern "C" {

View File

@ -1,11 +1,12 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_error Error functions
* @{
*/
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,5 +1,6 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_interface Network interface and other utility functions
@ -7,7 +8,7 @@
*/
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -27,7 +28,7 @@
#include <stdarg.h>
#include "mbed_toolchain.h"
#include "platform/mbed_toolchain.h"
#include "device.h"
/* Mbed interface mac address
@ -58,7 +59,7 @@ extern "C" {
*
* mbed Microcontrollers have a built-in interface to provide functionality such as
* drag-n-drop download, reset, serial-over-usb, and access to the mbed local file
* system. These functions provide means to control the interface suing semihost
* system. These functions provide means to control the interface using semihost
* calls it supports.
*/

View File

@ -1,9 +1,10 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/* mbed Microcontroller Library
* Copyright (c) 2006-2016 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,8 +1,9 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/* mbed Microcontroller Library
* Copyright (c) 2017-2017 ARM Limited
* Copyright (c) 2017-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,4 +1,5 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_mpu_mgmt MPU management functions
@ -6,7 +7,7 @@
*/
/* mbed Microcontroller Library
* Copyright (c) 2006-2018 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -23,9 +24,7 @@
#ifndef MBED_MPU_MGMT_H
#define MBED_MPU_MGMT_H
#include "mbed_toolchain.h"
#include "hal/mpu_api.h"
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2017 ARM Limited
* Copyright (c) 2017-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -27,7 +27,8 @@ namespace mbed {
class FileHandle;
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_poll poll functions

View File

@ -1,4 +1,5 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_power_mgmt Power management functions
@ -6,7 +7,7 @@
*/
/* mbed Microcontroller Library
* Copyright (c) 2006-2018 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -24,8 +25,8 @@
#ifndef MBED_POWER_MGMT_H
#define MBED_POWER_MGMT_H
#include "hal/sleep_api.h"
#include "mbed_toolchain.h"
#include "platform/mbed_toolchain.h"
#include "hal/ticker_api.h"
#include <stdbool.h>

View File

@ -1,4 +1,5 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_preprocessor preprocessor macros
@ -6,7 +7,7 @@
*/
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,6 +1,6 @@
/*
* mbed Microcontroller Library
* Copyright (c) 2006-2016 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -79,7 +79,8 @@ typedef unsigned int gid_t; ///< Group ID
#include <time.h>
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_retarget Retarget functions

View File

@ -1,12 +1,13 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_rtc_time rtc_time functions
* @{
*/
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,6 +1,6 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -19,7 +19,6 @@
#define MBED_SEMIHOST_H
#include "device.h"
#include "platform/mbed_toolchain.h"
#ifdef __cplusplus
extern "C" {

View File

@ -1,12 +1,13 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_stats stats functions
* @{
*/
/* mbed Microcontroller Library
* Copyright (c) 2016-2018 ARM Limited
* Copyright (c) 2016-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,5 +1,6 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_toolchain Toolchain functions
@ -7,7 +8,7 @@
*/
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -25,7 +26,7 @@
#ifndef MBED_TOOLCHAIN_H
#define MBED_TOOLCHAIN_H
#include "mbed_preprocessor.h"
#include "platform/mbed_preprocessor.h"
// Warning for unsupported compilers

View File

@ -1,12 +1,13 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_version Version macros
* @{
*/
/* mbed Microcontroller Library
* Copyright (c) 2018 ARM Limited
* Copyright (c) 2018-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,5 +1,6 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/**
* \defgroup platform_wait_api wait_api functions
@ -7,7 +8,7 @@
*/
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -402,4 +402,3 @@ bool ATCmdParser::process_oob()
}
}

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2018-2018 ARM Limited
* Copyright (c) 2018-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -21,7 +21,7 @@
#include "platform/mbed_error.h"
#include "CThunkBase.h"
#include "platform/internal/CThunkBase.h"
MBED_STATIC_ASSERT(MBED_CONF_PLATFORM_CTHUNK_COUNT_MAX < 256, "MBED_CONF_PLATFORM_CTHUNK_COUNT_MAX must be less than 256");
MBED_STATIC_ASSERT(MBED_CONF_PLATFORM_CTHUNK_COUNT_MAX > 0, "MBED_CONF_PLATFORM_CTHUNK_COUNT_MAX must be greater than 0");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018 ARM Limited
* Copyright (c) 2018-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -21,7 +21,7 @@
#undef MBED_DEPRECATED_SINCE
#define MBED_DEPRECATED_SINCE(...)
#include "platform/CallChain.h"
#include "platform/internal/CallChain.h"
#include "cmsis.h"
#include "platform/mbed_critical.h"

View File

@ -0,0 +1,53 @@
/* mbed Microcontroller Library
* Copyright (c) 2017-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "platform/CriticalSectionLock.h"
#include "platform/mbed_critical.h"
namespace mbed {
CriticalSectionLock::CriticalSectionLock()
{
core_util_critical_section_enter();
}
CriticalSectionLock::~CriticalSectionLock()
{
core_util_critical_section_exit();
}
void CriticalSectionLock::lock()
{
core_util_critical_section_enter();
}
void CriticalSectionLock::unlock()
{
core_util_critical_section_exit();
}
void CriticalSectionLock::enable()
{
core_util_critical_section_enter();
}
void CriticalSectionLock::disable()
{
core_util_critical_section_exit();
}
} // namespace mbed

View File

@ -0,0 +1,62 @@
/* mbed Microcontroller Library
* Copyright (c) 2017-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "platform/DeepSleepLock.h"
#include "platform/mbed_atomic.h"
#include "platform/mbed_critical.h"
#include "platform/mbed_error.h"
#include "platform/mbed_power_mgmt.h"
namespace mbed {
DeepSleepLock::DeepSleepLock(): _lock_count(1)
{
sleep_manager_lock_deep_sleep();
}
DeepSleepLock::~DeepSleepLock()
{
if (_lock_count) {
sleep_manager_unlock_deep_sleep();
}
}
void DeepSleepLock::lock()
{
uint16_t count = core_util_atomic_incr_u16(&_lock_count, 1);
if (1 == count) {
sleep_manager_lock_deep_sleep();
}
if (0 == count) {
MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_PLATFORM, MBED_ERROR_CODE_OVERFLOW), "DeepSleepLock overflow (> USHRT_MAX)", count);
}
}
void DeepSleepLock::unlock()
{
uint16_t count = core_util_atomic_decr_u16(&_lock_count, 1);
if (count == 0) {
sleep_manager_unlock_deep_sleep();
}
if (count == USHRT_MAX) {
core_util_critical_section_exit();
MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_PLATFORM, MBED_ERROR_CODE_UNDERFLOW), "DeepSleepLock underflow (< 0)", count);
}
}
} // namespace mbed

View File

@ -127,4 +127,3 @@ PathType FileBase::getPathType(void)
}
} // namespace mbed

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2016 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -14,9 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "FileHandle.h"
#include "platform/mbed_retarget.h"
#include "platform/mbed_critical.h"
#include "platform/FileHandle.h"
namespace mbed {

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,8 +15,7 @@
* limitations under the License.
*/
#include "FileSystemHandle.h"
#include <errno.h>
#include "platform/FileSystemHandle.h"
namespace mbed {

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2017-2017 ARM Limited
* Copyright (c) 2017 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -18,11 +18,9 @@
#include <string.h>
#include "platform/mbed_assert.h"
#include "platform/mbed_critical.h"
#include "platform/mbed_error.h"
MBED_NORETURN void mbed_assert_internal(const char *expr, const char *file, int line)
{
mbed_error(MBED_ERROR_ASSERTION_FAILED, expr, 0, file, line);
}

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,14 +16,14 @@
#ifndef MBED_CRASH_DATA_INFO_H
#define MBED_CRASH_DATA_INFO_H
#include "platform/mbed_retarget.h"
#include "platform/mbed_toolchain.h"
#ifdef __cplusplus
extern "C" {
#endif
#if MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED
/** \ingroup platform */
/** \addtogroup platform-internal-api */
/** @{*/
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
extern uint32_t Image$$RW_m_crash_data$$ZI$$Base[];
extern uint32_t Image$$RW_m_crash_data$$ZI$$Size;
@ -43,6 +43,7 @@ extern uint32_t __CRASH_DATA_RAM_END__[];
#define ERROR_CONTEXT_SIZE (0x80 / 4) //32 words(128 bytes) bytes for Error Context
#define FAULT_CONTEXT_LOCATION (__CRASH_DATA_RAM_START__ + FAULT_CONTEXT_OFFSET)
#define ERROR_CONTEXT_LOCATION (__CRASH_DATA_RAM_START__ + ERROR_CONTEXT_OFFSET)
/**@}*/
#endif
#ifdef __cplusplus
@ -50,6 +51,3 @@ extern uint32_t __CRASH_DATA_RAM_END__[];
#endif
#endif

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015-2016, ARM Limited, All Rights Reserved
* Copyright (c) 2015-2019, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -22,7 +22,6 @@
#include "cmsis.h"
#include "platform/mbed_assert.h"
#include "platform/mbed_critical.h"
#include "platform/mbed_toolchain.h"
static uint32_t critical_section_reentrancy_counter = 0;

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -18,12 +18,11 @@
#include <stdarg.h>
#include <string.h>
#include "device.h"
#include "platform/mbed_crash_data_offsets.h"
#include "platform/mbed_retarget.h"
#include "platform/source/mbed_crash_data_offsets.h"
#include "platform/mbed_atomic.h"
#include "platform/mbed_critical.h"
#include "platform/mbed_error.h"
#include "platform/mbed_error_hist.h"
#include "platform/source/mbed_error_hist.h"
#include "platform/mbed_interface.h"
#include "platform/mbed_power_mgmt.h"
#include "platform/mbed_stats.h"
@ -635,4 +634,3 @@ exit:
return ret;
}
#endif

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -18,12 +18,10 @@
#include <stdarg.h>
#include "device.h"
#include "platform/mbed_error.h"
#include "platform/mbed_toolchain.h"
#include "platform/mbed_critical.h"
#include "platform/mbed_interface.h"
#if MBED_CONF_PLATFORM_ERROR_HIST_ENABLED
#include "platform/mbed_error_hist.h"
#include "platform/source/mbed_error_hist.h"
static mbed_error_ctx mbed_error_ctx_log[MBED_CONF_PLATFORM_ERROR_HIST_SIZE] = {0};
static int error_log_count = -1;

View File

@ -28,6 +28,11 @@
#ifdef __cplusplus
extern "C" {
#endif
/** \ingroup platform */
/** \addtogroup platform-internal-api */
/** @{*/
/*
* Puts/Adds an error entry into the error history list
*
@ -112,6 +117,6 @@ mbed_error_status_t mbed_save_error_hist(const char *path);
}
#endif
/**@}*/
#endif

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -17,11 +17,7 @@
#include <stdio.h>
#include "platform/mbed_interface.h"
#include "hal/gpio_api.h"
#include "platform/mbed_wait_api.h"
#include "platform/mbed_semihost_api.h"
#include "platform/mbed_error.h"
#include "platform/mbed_toolchain.h"
#if DEVICE_SEMIHOST

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2016 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -19,7 +19,6 @@
#include <stdarg.h>
#include <stdio.h>
#include "platform/mbed_mem_trace.h"
#include "platform/mbed_critical.h"
#include "platform/SingletonPtr.h"
#include "platform/PlatformMutex.h"
@ -152,4 +151,3 @@ void mbed_mem_trace_default_callback(uint8_t op, void *res, void *caller, ...)
}
va_end(va);
}

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2017-2017 ARM Limited
* Copyright (c) 2017-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,7 +15,7 @@
* limitations under the License.
*/
#include "mbed_mktime.h"
#include "platform/mbed_mktime.h"
/* Time constants. */
#define SECONDS_BY_MINUTES 60

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2018 ARM Limited
* Copyright (c) 2018-2019 ARM Limited
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -17,8 +17,8 @@
#include "platform/mbed_mpu_mgmt.h"
#include "platform/mbed_critical.h"
#include "platform/mbed_assert.h"
#include "hal/mpu_api.h"
#include <limits.h>
#include <stdbool.h>
#if DEVICE_MPU && MBED_CONF_PLATFORM_USE_MPU

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2017 ARM Limited
* Copyright (c) 2017-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -15,14 +15,14 @@
* limitations under the License.
*/
#include "mbed_power_mgmt.h"
#include "mbed_interface.h"
#include "mbed_atomic.h"
#include "mbed_critical.h"
#include "mbed_assert.h"
#include "mbed_error.h"
#include "mbed_stats.h"
#include "platform/mbed_power_mgmt.h"
#include "platform/mbed_interface.h"
#include "platform/mbed_atomic.h"
#include "platform/mbed_critical.h"
#include "platform/mbed_error.h"
#include "platform/mbed_stats.h"
#include "hal/sleep_api.h"
#include "hal/us_ticker_api.h"
#include "hal/lp_ticker_api.h"
#include "platform/mbed_wait_api.h"

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2015 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -26,14 +26,12 @@
#include "platform/SingletonPtr.h"
#include "platform/PlatformMutex.h"
#include "platform/mbed_error.h"
#include "platform/mbed_stats.h"
#include "platform/mbed_atomic.h"
#include "platform/mbed_critical.h"
#include "platform/mbed_poll.h"
#include "platform/PlatformMutex.h"
#include "drivers/UARTSerial.h"
#include "us_ticker_api.h"
#include "lp_ticker_api.h"
#include "hal/us_ticker_api.h"
#include "hal/lp_ticker_api.h"
#include <stdlib.h>
#include <string.h>
#include <limits.h>

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -16,7 +16,6 @@
*/
#include "hal/rtc_api.h"
#include "platform/mbed_critical.h"
#include "platform/mbed_rtc_time.h"
#include "platform/SingletonPtr.h"
#include "platform/PlatformMutex.h"

View File

@ -181,4 +181,3 @@ int semihost_disabledebug(void)
}
#endif

View File

@ -1,7 +1,23 @@
#include "mbed_assert.h"
#include "mbed_stats.h"
#include "mbed_power_mgmt.h"
#include "mbed_version.h"
/* mbed Microcontroller Library
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "platform/mbed_assert.h"
#include "platform/mbed_stats.h"
#include "platform/mbed_power_mgmt.h"
#include "platform/mbed_version.h"
#include <string.h>
#include <stdlib.h>

View File

@ -1,5 +1,5 @@
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
@ -28,7 +28,6 @@
#include "platform/mbed_critical.h"
#include "platform/mbed_power_mgmt.h"
#include "platform/mbed_error.h"
#include "rtos/ThisThread.h"
void wait(float s)
{
@ -67,4 +66,3 @@ void wait_ms(int ms)
}
#endif // #if MBED_CONF_RTOS_PRESENT

View File

@ -1,8 +1,9 @@
/** \addtogroup platform */
/** \ingroup platform */
/** \addtogroup platform-public-api */
/** @{*/
/* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited
* Copyright (c) 2006-2019 ARM Limited
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");