From 83354e46a734d83c04ef2d557fe77b9a9afe3184 Mon Sep 17 00:00:00 2001 From: Hugues Kamba Date: Thu, 27 Jun 2019 09:49:22 +0100 Subject: [PATCH] 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 --- drivers/InterruptManager.h | 4 +- drivers/RawSerial.h | 2 +- platform/ATCmdParser.h | 11 ++-- platform/CThunk.h | 10 +-- platform/Callback.h | 5 +- platform/CircularBuffer.h | 5 +- platform/CriticalSectionLock.h | 36 +++-------- platform/DeepSleepLock.h | 43 +++---------- platform/DirHandle.h | 8 +-- platform/FileBase.h | 6 +- platform/FileHandle.h | 7 ++- platform/FileLike.h | 6 +- platform/FilePath.h | 5 +- platform/FileSystemHandle.h | 6 +- platform/FileSystemLike.h | 6 +- platform/FunctionPointer.h | 5 +- platform/LocalFileSystem.h | 5 +- platform/NonCopyable.h | 9 +-- platform/PlatformMutex.h | 8 +-- platform/ScopedLock.h | 5 +- platform/ScopedRamExecutionLock.h | 5 +- platform/ScopedRomWriteLock.h | 5 +- platform/SingletonPtr.h | 5 +- platform/Span.h | 5 +- platform/Stream.h | 8 +-- platform/Transaction.h | 6 +- platform/{ => internal}/CThunkBase.h | 12 +++- platform/{ => internal}/CallChain.h | 10 +-- platform/mbed_assert.h | 8 +-- platform/mbed_atomic.h | 7 ++- platform/mbed_critical.h | 8 +-- platform/mbed_debug.h | 7 ++- platform/mbed_error.h | 5 +- platform/mbed_interface.h | 9 +-- platform/mbed_mem_trace.h | 5 +- platform/mbed_mktime.h | 5 +- platform/mbed_mpu_mgmt.h | 7 +-- platform/mbed_poll.h | 5 +- platform/mbed_power_mgmt.h | 9 +-- platform/mbed_preprocessor.h | 5 +- platform/mbed_retarget.h | 5 +- platform/mbed_rtc_time.h | 5 +- platform/mbed_semihost_api.h | 3 +- platform/mbed_stats.h | 5 +- platform/mbed_toolchain.h | 7 ++- platform/mbed_version.h | 5 +- platform/mbed_wait_api.h | 5 +- platform/{ => source}/ATCmdParser.cpp | 1 - platform/{ => source}/CThunkBase.cpp | 4 +- platform/{ => source}/CallChain.cpp | 4 +- platform/source/CriticalSectionLock.cpp | 53 ++++++++++++++++ platform/source/DeepSleepLock.cpp | 62 +++++++++++++++++++ platform/{ => source}/FileBase.cpp | 1 - platform/{ => source}/FileHandle.cpp | 6 +- platform/{ => source}/FilePath.cpp | 0 platform/{ => source}/FileSystemHandle.cpp | 5 +- platform/{ => source}/LocalFileSystem.cpp | 0 platform/{ => source}/Stream.cpp | 0 platform/{ => source}/mbed_alloc_wrappers.cpp | 0 platform/{ => source}/mbed_application.c | 2 +- platform/{ => source}/mbed_assert.c | 4 +- .../{internal => source}/mbed_atomic_impl.c | 0 platform/{ => source}/mbed_board.c | 0 .../{ => source}/mbed_crash_data_offsets.h | 12 ++-- platform/{ => source}/mbed_critical.c | 3 +- platform/{ => source}/mbed_error.c | 8 +-- platform/{ => source}/mbed_error_hist.c | 6 +- platform/{ => source}/mbed_error_hist.h | 9 ++- platform/{ => source}/mbed_interface.c | 6 +- platform/{ => source}/mbed_mem_trace.cpp | 4 +- platform/{ => source}/mbed_mktime.c | 4 +- platform/{ => source}/mbed_mpu_mgmt.c | 4 +- platform/{ => source}/mbed_poll.cpp | 0 .../mbed_power_mgmt.c} | 16 ++--- platform/{ => source}/mbed_retarget.cpp | 8 +-- platform/{ => source}/mbed_rtc_time.cpp | 3 +- platform/{ => source}/mbed_sdk_boot.c | 0 platform/{ => source}/mbed_semihost_api.c | 1 - platform/{ => source}/mbed_stats.c | 24 +++++-- platform/{ => source}/mbed_wait_api_no_rtos.c | 0 platform/{ => source}/mbed_wait_api_rtos.cpp | 4 +- platform/toolchain.h | 5 +- 82 files changed, 363 insertions(+), 259 deletions(-) rename platform/{ => internal}/CThunkBase.h (93%) rename platform/{ => internal}/CallChain.h (97%) rename platform/{ => source}/ATCmdParser.cpp (99%) rename platform/{ => source}/CThunkBase.cpp (98%) rename platform/{ => source}/CallChain.cpp (97%) create mode 100644 platform/source/CriticalSectionLock.cpp create mode 100644 platform/source/DeepSleepLock.cpp rename platform/{ => source}/FileBase.cpp (99%) rename platform/{ => source}/FileHandle.cpp (87%) rename platform/{ => source}/FilePath.cpp (100%) rename platform/{ => source}/FileSystemHandle.cpp (93%) rename platform/{ => source}/LocalFileSystem.cpp (100%) rename platform/{ => source}/Stream.cpp (100%) rename platform/{ => source}/mbed_alloc_wrappers.cpp (100%) rename platform/{ => source}/mbed_application.c (99%) rename platform/{ => source}/mbed_assert.c (92%) rename platform/{internal => source}/mbed_atomic_impl.c (100%) rename platform/{ => source}/mbed_board.c (100%) rename platform/{ => source}/mbed_crash_data_offsets.h (93%) rename platform/{ => source}/mbed_critical.c (95%) rename platform/{ => source}/mbed_error.c (99%) rename platform/{ => source}/mbed_error_hist.c (95%) rename platform/{ => source}/mbed_error_hist.h (97%) rename platform/{ => source}/mbed_interface.c (94%) rename platform/{ => source}/mbed_mem_trace.cpp (98%) rename platform/{ => source}/mbed_mktime.c (98%) rename platform/{ => source}/mbed_mpu_mgmt.c (96%) rename platform/{ => source}/mbed_poll.cpp (100%) rename platform/{mbed_sleep_manager.c => source/mbed_power_mgmt.c} (96%) rename platform/{ => source}/mbed_retarget.cpp (99%) rename platform/{ => source}/mbed_rtc_time.cpp (97%) rename platform/{ => source}/mbed_sdk_boot.c (100%) rename platform/{ => source}/mbed_semihost_api.c (99%) rename platform/{ => source}/mbed_stats.c (86%) rename platform/{ => source}/mbed_wait_api_no_rtos.c (100%) rename platform/{ => source}/mbed_wait_api_rtos.cpp (97%) diff --git a/drivers/InterruptManager.h b/drivers/InterruptManager.h index f53d206a63..2ed04be8ae 100644 --- a/drivers/InterruptManager.h +++ b/drivers/InterruptManager.h @@ -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 diff --git a/drivers/RawSerial.h b/drivers/RawSerial.h index 061d93fa06..ae1786f357 100644 --- a/drivers/RawSerial.h +++ b/drivers/RawSerial.h @@ -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 diff --git a/platform/ATCmdParser.h b/platform/ATCmdParser.h index ee60813834..f3d9bb195b 100644 --- a/platform/ATCmdParser.h +++ b/platform/ATCmdParser.h @@ -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 -#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 diff --git a/platform/CThunk.h b/platform/CThunk.h index 288cac141e..e90aaf0db3 100644 --- a/platform/CThunk.h +++ b/platform/CThunk.h @@ -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 CThunk: public CThunkBase { +class CThunk: private CThunkBase { public: typedef void (T::*CCallbackSimple)(void); typedef void (T::*CCallback)(void *context); diff --git a/platform/Callback.h b/platform/Callback.h index a72143a8ea..1ad9b1df65 100644 --- a/platform/Callback.h +++ b/platform/Callback.h @@ -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 diff --git a/platform/CircularBuffer.h b/platform/CircularBuffer.h index 77e8bb400d..3fc87dd2db 100644 --- a/platform/CircularBuffer.h +++ b/platform/CircularBuffer.h @@ -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 { }; }; -/** \addtogroup platform */ +/** \ingroup platform */ +/** \addtogroup platform-public-api */ /** @{*/ /** * \defgroup platform_CircularBuffer CircularBuffer functions diff --git a/platform/CriticalSectionLock.h b/platform/CriticalSectionLock.h index cf861f93a2..3f8ed52a85 100644 --- a/platform/CriticalSectionLock.h +++ b/platform/CriticalSectionLock.h @@ -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(); }; /**@}*/ diff --git a/platform/DeepSleepLock.h b/platform/DeepSleepLock.h index 1fe95db265..fb6cd418e0 100644 --- a/platform/DeepSleepLock.h +++ b/platform/DeepSleepLock.h @@ -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 -#include "platform/mbed_power_mgmt.h" -#include "platform/mbed_atomic.h" +#include 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(); }; /**@}*/ diff --git a/platform/DirHandle.h b/platform/DirHandle.h index 859d833428..7005e10aa7 100644 --- a/platform/DirHandle.h +++ b/platform/DirHandle.h @@ -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 -#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 diff --git a/platform/FileBase.h b/platform/FileBase.h index 68b74ed968..d0244a0853 100644 --- a/platform/FileBase.h +++ b/platform/FileBase.h @@ -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 - diff --git a/platform/FileHandle.h b/platform/FileHandle.h index 5488169667..69144a8cca 100644 --- a/platform/FileHandle.h +++ b/platform/FileHandle.h @@ -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 -#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 diff --git a/platform/FileLike.h b/platform/FileLike.h index f4e1911f23..56e34456a2 100644 --- a/platform/FileLike.h +++ b/platform/FileLike.h @@ -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 diff --git a/platform/FilePath.h b/platform/FilePath.h index 19f1c1b94a..f9a0ab0854 100644 --- a/platform/FilePath.h +++ b/platform/FilePath.h @@ -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 diff --git a/platform/FileSystemHandle.h b/platform/FileSystemHandle.h index d5bd217fc0..47b56ccf62 100644 --- a/platform/FileSystemHandle.h +++ b/platform/FileSystemHandle.h @@ -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 diff --git a/platform/FileSystemLike.h b/platform/FileSystemLike.h index ce6df43881..9f604cf1b4 100644 --- a/platform/FileSystemLike.h +++ b/platform/FileSystemLike.h @@ -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 diff --git a/platform/FunctionPointer.h b/platform/FunctionPointer.h index 90a808015c..7129b671c9 100644 --- a/platform/FunctionPointer.h +++ b/platform/FunctionPointer.h @@ -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 namespace mbed { -/** \addtogroup platform */ +/** \ingroup platform */ +/** \addtogroup platform-public-api */ /** @{*/ /** * \defgroup platform_FunctionPointer FunctionPointer class diff --git a/platform/LocalFileSystem.h b/platform/LocalFileSystem.h index 7314320d44..5803e3dfe4 100644 --- a/platform/LocalFileSystem.h +++ b/platform/LocalFileSystem.h @@ -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 diff --git a/platform/NonCopyable.h b/platform/NonCopyable.h index 70f76e7177..7fe72841ac 100644 --- a/platform/NonCopyable.h +++ b/platform/NonCopyable.h @@ -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 diff --git a/platform/PlatformMutex.h b/platform/PlatformMutex.h index 3f751c4149..0f2116af0e 100644 --- a/platform/PlatformMutex.h +++ b/platform/PlatformMutex.h @@ -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 * @{ diff --git a/platform/ScopedLock.h b/platform/ScopedLock.h index d6d1854d9a..55176576fa 100644 --- a/platform/ScopedLock.h +++ b/platform/ScopedLock.h @@ -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 diff --git a/platform/ScopedRamExecutionLock.h b/platform/ScopedRamExecutionLock.h index d45b3f9066..97f6a551b1 100644 --- a/platform/ScopedRamExecutionLock.h +++ b/platform/ScopedRamExecutionLock.h @@ -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 diff --git a/platform/ScopedRomWriteLock.h b/platform/ScopedRomWriteLock.h index 7cd6d5f355..08ed049287 100644 --- a/platform/ScopedRomWriteLock.h +++ b/platform/ScopedRomWriteLock.h @@ -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 diff --git a/platform/SingletonPtr.h b/platform/SingletonPtr.h index ed3f8e33e1..524dbb6919 100644 --- a/platform/SingletonPtr.h +++ b/platform/SingletonPtr.h @@ -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"); diff --git a/platform/Span.h b/platform/Span.h index 9859402aa2..0f46eb6b04 100644 --- a/platform/Span.h +++ b/platform/Span.h @@ -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 diff --git a/platform/Stream.h b/platform/Stream.h index e8783038f4..2db7f5aafe 100644 --- a/platform/Stream.h +++ b/platform/Stream.h @@ -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 #include namespace mbed { -/** \addtogroup platform */ +/** \ingroup platform */ +/** \addtogroup platform-public-api */ /** @{*/ /** * \defgroup platform_Stream Stream class diff --git a/platform/Transaction.h b/platform/Transaction.h index 6917c4d12b..7da3635d6f 100644 --- a/platform/Transaction.h +++ b/platform/Transaction.h @@ -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 diff --git a/platform/CThunkBase.h b/platform/internal/CThunkBase.h similarity index 93% rename from platform/CThunkBase.h rename to platform/internal/CThunkBase.h index c2ae68c28c..c338a3ba4d 100644 --- a/platform/CThunkBase.h +++ b/platform/internal/CThunkBase.h @@ -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__*/ diff --git a/platform/CallChain.h b/platform/internal/CallChain.h similarity index 97% rename from platform/CallChain.h rename to platform/internal/CallChain.h index 0f35dc1b5e..d51f9b25b5 100644 --- a/platform/CallChain.h +++ b/platform/internal/CallChain.h @@ -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 *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 { +class + MBED_DEPRECATED("CallChain has been deprecated and will be removed.") + CallChain : private NonCopyable { public: /** Create an empty chain * @deprecated @@ -262,4 +265,3 @@ private: } // namespace mbed #endif - diff --git a/platform/mbed_assert.h b/platform/mbed_assert.h index 7b2be2cfaa..3f9708ddef 100644 --- a/platform/mbed_assert.h +++ b/platform/mbed_assert.h @@ -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" { diff --git a/platform/mbed_atomic.h b/platform/mbed_atomic.h index e10f6f5286..3ad2c87827 100644 --- a/platform/mbed_atomic.h +++ b/platform/mbed_atomic.h @@ -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 #include #include -#include "mbed_toolchain.h" +#include "platform/mbed_toolchain.h" -/** \addtogroup platform */ +/** \ingroup platform */ +/** \addtogroup platform-public-api */ /** @{*/ /** diff --git a/platform/mbed_critical.h b/platform/mbed_critical.h index b6e68f533c..af7eda387b 100644 --- a/platform/mbed_critical.h +++ b/platform/mbed_critical.h @@ -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__ - - - diff --git a/platform/mbed_debug.h b/platform/mbed_debug.h index f560f3db33..f19fc33b14 100644 --- a/platform/mbed_debug.h +++ b/platform/mbed_debug.h @@ -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 #include #endif -#include "mbed_toolchain.h" +#include "platform/mbed_toolchain.h" #ifdef __cplusplus extern "C" { diff --git a/platform/mbed_error.h b/platform/mbed_error.h index 8ff8abc942..8724c3fde0 100644 --- a/platform/mbed_error.h +++ b/platform/mbed_error.h @@ -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"); diff --git a/platform/mbed_interface.h b/platform/mbed_interface.h index ac12b60036..4eb0ab3f62 100644 --- a/platform/mbed_interface.h +++ b/platform/mbed_interface.h @@ -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 -#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. */ diff --git a/platform/mbed_mem_trace.h b/platform/mbed_mem_trace.h index 28760b8607..e1156be0a9 100644 --- a/platform/mbed_mem_trace.h +++ b/platform/mbed_mem_trace.h @@ -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"); diff --git a/platform/mbed_mktime.h b/platform/mbed_mktime.h index 58b7624969..a1dc7e6aed 100644 --- a/platform/mbed_mktime.h +++ b/platform/mbed_mktime.h @@ -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"); diff --git a/platform/mbed_mpu_mgmt.h b/platform/mbed_mpu_mgmt.h index 8364941d79..b96adc303e 100644 --- a/platform/mbed_mpu_mgmt.h +++ b/platform/mbed_mpu_mgmt.h @@ -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 #ifdef __cplusplus extern "C" { diff --git a/platform/mbed_poll.h b/platform/mbed_poll.h index 43d7cce57c..6061943a2c 100644 --- a/platform/mbed_poll.h +++ b/platform/mbed_poll.h @@ -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 diff --git a/platform/mbed_power_mgmt.h b/platform/mbed_power_mgmt.h index 3b8791f2b1..75764b9581 100644 --- a/platform/mbed_power_mgmt.h +++ b/platform/mbed_power_mgmt.h @@ -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 diff --git a/platform/mbed_preprocessor.h b/platform/mbed_preprocessor.h index 42685cda1c..e01afb9fab 100644 --- a/platform/mbed_preprocessor.h +++ b/platform/mbed_preprocessor.h @@ -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"); diff --git a/platform/mbed_retarget.h b/platform/mbed_retarget.h index 5875d0474f..18fac7bcbe 100644 --- a/platform/mbed_retarget.h +++ b/platform/mbed_retarget.h @@ -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 -/** \addtogroup platform */ +/** \ingroup platform */ +/** \addtogroup platform-public-api */ /** @{*/ /** * \defgroup platform_retarget Retarget functions diff --git a/platform/mbed_rtc_time.h b/platform/mbed_rtc_time.h index 14ead3339f..09e42c0a7e 100644 --- a/platform/mbed_rtc_time.h +++ b/platform/mbed_rtc_time.h @@ -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"); diff --git a/platform/mbed_semihost_api.h b/platform/mbed_semihost_api.h index dde34f8a53..977696f3ba 100644 --- a/platform/mbed_semihost_api.h +++ b/platform/mbed_semihost_api.h @@ -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" { diff --git a/platform/mbed_stats.h b/platform/mbed_stats.h index 1f93f42d95..46ca8f5822 100644 --- a/platform/mbed_stats.h +++ b/platform/mbed_stats.h @@ -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"); diff --git a/platform/mbed_toolchain.h b/platform/mbed_toolchain.h index 12c18b3241..3d8292d1cf 100644 --- a/platform/mbed_toolchain.h +++ b/platform/mbed_toolchain.h @@ -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 diff --git a/platform/mbed_version.h b/platform/mbed_version.h index a178579369..61aedbd4d6 100644 --- a/platform/mbed_version.h +++ b/platform/mbed_version.h @@ -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"); diff --git a/platform/mbed_wait_api.h b/platform/mbed_wait_api.h index f6e72266a8..bf1e752760 100644 --- a/platform/mbed_wait_api.h +++ b/platform/mbed_wait_api.h @@ -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"); diff --git a/platform/ATCmdParser.cpp b/platform/source/ATCmdParser.cpp similarity index 99% rename from platform/ATCmdParser.cpp rename to platform/source/ATCmdParser.cpp index 7ff2ae00ac..7a54f55fba 100644 --- a/platform/ATCmdParser.cpp +++ b/platform/source/ATCmdParser.cpp @@ -402,4 +402,3 @@ bool ATCmdParser::process_oob() } } - diff --git a/platform/CThunkBase.cpp b/platform/source/CThunkBase.cpp similarity index 98% rename from platform/CThunkBase.cpp rename to platform/source/CThunkBase.cpp index ce9271bc53..ddae39c4bc 100644 --- a/platform/CThunkBase.cpp +++ b/platform/source/CThunkBase.cpp @@ -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"); diff --git a/platform/CallChain.cpp b/platform/source/CallChain.cpp similarity index 97% rename from platform/CallChain.cpp rename to platform/source/CallChain.cpp index db8be12f7e..5c892d7820 100644 --- a/platform/CallChain.cpp +++ b/platform/source/CallChain.cpp @@ -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" diff --git a/platform/source/CriticalSectionLock.cpp b/platform/source/CriticalSectionLock.cpp new file mode 100644 index 0000000000..61e775ce39 --- /dev/null +++ b/platform/source/CriticalSectionLock.cpp @@ -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 diff --git a/platform/source/DeepSleepLock.cpp b/platform/source/DeepSleepLock.cpp new file mode 100644 index 0000000000..fac9c6fe8b --- /dev/null +++ b/platform/source/DeepSleepLock.cpp @@ -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 diff --git a/platform/FileBase.cpp b/platform/source/FileBase.cpp similarity index 99% rename from platform/FileBase.cpp rename to platform/source/FileBase.cpp index 7a6f0a32b7..cc0be5b62c 100644 --- a/platform/FileBase.cpp +++ b/platform/source/FileBase.cpp @@ -127,4 +127,3 @@ PathType FileBase::getPathType(void) } } // namespace mbed - diff --git a/platform/FileHandle.cpp b/platform/source/FileHandle.cpp similarity index 87% rename from platform/FileHandle.cpp rename to platform/source/FileHandle.cpp index be8b9cef45..8f10348929 100644 --- a/platform/FileHandle.cpp +++ b/platform/source/FileHandle.cpp @@ -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 { diff --git a/platform/FilePath.cpp b/platform/source/FilePath.cpp similarity index 100% rename from platform/FilePath.cpp rename to platform/source/FilePath.cpp diff --git a/platform/FileSystemHandle.cpp b/platform/source/FileSystemHandle.cpp similarity index 93% rename from platform/FileSystemHandle.cpp rename to platform/source/FileSystemHandle.cpp index 24dc0b2acb..836c48f8ef 100644 --- a/platform/FileSystemHandle.cpp +++ b/platform/source/FileSystemHandle.cpp @@ -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 +#include "platform/FileSystemHandle.h" namespace mbed { diff --git a/platform/LocalFileSystem.cpp b/platform/source/LocalFileSystem.cpp similarity index 100% rename from platform/LocalFileSystem.cpp rename to platform/source/LocalFileSystem.cpp diff --git a/platform/Stream.cpp b/platform/source/Stream.cpp similarity index 100% rename from platform/Stream.cpp rename to platform/source/Stream.cpp diff --git a/platform/mbed_alloc_wrappers.cpp b/platform/source/mbed_alloc_wrappers.cpp similarity index 100% rename from platform/mbed_alloc_wrappers.cpp rename to platform/source/mbed_alloc_wrappers.cpp diff --git a/platform/mbed_application.c b/platform/source/mbed_application.c similarity index 99% rename from platform/mbed_application.c rename to platform/source/mbed_application.c index 53eb08d7ef..5cd70c6c4d 100644 --- a/platform/mbed_application.c +++ b/platform/source/mbed_application.c @@ -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"); diff --git a/platform/mbed_assert.c b/platform/source/mbed_assert.c similarity index 92% rename from platform/mbed_assert.c rename to platform/source/mbed_assert.c index 0871bab9e9..d0e8f78b9e 100644 --- a/platform/mbed_assert.c +++ b/platform/source/mbed_assert.c @@ -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 #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); } - diff --git a/platform/internal/mbed_atomic_impl.c b/platform/source/mbed_atomic_impl.c similarity index 100% rename from platform/internal/mbed_atomic_impl.c rename to platform/source/mbed_atomic_impl.c diff --git a/platform/mbed_board.c b/platform/source/mbed_board.c similarity index 100% rename from platform/mbed_board.c rename to platform/source/mbed_board.c diff --git a/platform/mbed_crash_data_offsets.h b/platform/source/mbed_crash_data_offsets.h similarity index 93% rename from platform/mbed_crash_data_offsets.h rename to platform/source/mbed_crash_data_offsets.h index 657682ce42..56a466866e 100644 --- a/platform/mbed_crash_data_offsets.h +++ b/platform/source/mbed_crash_data_offsets.h @@ -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 - - - diff --git a/platform/mbed_critical.c b/platform/source/mbed_critical.c similarity index 95% rename from platform/mbed_critical.c rename to platform/source/mbed_critical.c index 4fe7e6abff..8d2ded8699 100644 --- a/platform/mbed_critical.c +++ b/platform/source/mbed_critical.c @@ -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; diff --git a/platform/mbed_error.c b/platform/source/mbed_error.c similarity index 99% rename from platform/mbed_error.c rename to platform/source/mbed_error.c index b50b86b8ab..3ffc22f5b1 100644 --- a/platform/mbed_error.c +++ b/platform/source/mbed_error.c @@ -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 #include #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 - diff --git a/platform/mbed_error_hist.c b/platform/source/mbed_error_hist.c similarity index 95% rename from platform/mbed_error_hist.c rename to platform/source/mbed_error_hist.c index 9a618e5dda..4a686885f7 100644 --- a/platform/mbed_error_hist.c +++ b/platform/source/mbed_error_hist.c @@ -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 #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; diff --git a/platform/mbed_error_hist.h b/platform/source/mbed_error_hist.h similarity index 97% rename from platform/mbed_error_hist.h rename to platform/source/mbed_error_hist.h index 791b562b65..96378c7921 100644 --- a/platform/mbed_error_hist.h +++ b/platform/source/mbed_error_hist.h @@ -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 - - diff --git a/platform/mbed_interface.c b/platform/source/mbed_interface.c similarity index 94% rename from platform/mbed_interface.c rename to platform/source/mbed_interface.c index ddacbb99ae..d275537c50 100644 --- a/platform/mbed_interface.c +++ b/platform/source/mbed_interface.c @@ -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 #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 diff --git a/platform/mbed_mem_trace.cpp b/platform/source/mbed_mem_trace.cpp similarity index 98% rename from platform/mbed_mem_trace.cpp rename to platform/source/mbed_mem_trace.cpp index 8ba4dd8095..75a61c4c9a 100644 --- a/platform/mbed_mem_trace.cpp +++ b/platform/source/mbed_mem_trace.cpp @@ -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 #include #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); } - diff --git a/platform/mbed_mktime.c b/platform/source/mbed_mktime.c similarity index 98% rename from platform/mbed_mktime.c rename to platform/source/mbed_mktime.c index 7c282325a4..9691fd23a0 100644 --- a/platform/mbed_mktime.c +++ b/platform/source/mbed_mktime.c @@ -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 diff --git a/platform/mbed_mpu_mgmt.c b/platform/source/mbed_mpu_mgmt.c similarity index 96% rename from platform/mbed_mpu_mgmt.c rename to platform/source/mbed_mpu_mgmt.c index d34eb30aa5..ebdfb2d5fa 100644 --- a/platform/mbed_mpu_mgmt.c +++ b/platform/source/mbed_mpu_mgmt.c @@ -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 +#include #if DEVICE_MPU && MBED_CONF_PLATFORM_USE_MPU diff --git a/platform/mbed_poll.cpp b/platform/source/mbed_poll.cpp similarity index 100% rename from platform/mbed_poll.cpp rename to platform/source/mbed_poll.cpp diff --git a/platform/mbed_sleep_manager.c b/platform/source/mbed_power_mgmt.c similarity index 96% rename from platform/mbed_sleep_manager.c rename to platform/source/mbed_power_mgmt.c index 01ce380a39..9d7724aea3 100644 --- a/platform/mbed_sleep_manager.c +++ b/platform/source/mbed_power_mgmt.c @@ -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" diff --git a/platform/mbed_retarget.cpp b/platform/source/mbed_retarget.cpp similarity index 99% rename from platform/mbed_retarget.cpp rename to platform/source/mbed_retarget.cpp index fa4951bfbb..b55902a4e2 100644 --- a/platform/mbed_retarget.cpp +++ b/platform/source/mbed_retarget.cpp @@ -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 #include #include diff --git a/platform/mbed_rtc_time.cpp b/platform/source/mbed_rtc_time.cpp similarity index 97% rename from platform/mbed_rtc_time.cpp rename to platform/source/mbed_rtc_time.cpp index b481ef908b..2465ae2bbc 100644 --- a/platform/mbed_rtc_time.cpp +++ b/platform/source/mbed_rtc_time.cpp @@ -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" diff --git a/platform/mbed_sdk_boot.c b/platform/source/mbed_sdk_boot.c similarity index 100% rename from platform/mbed_sdk_boot.c rename to platform/source/mbed_sdk_boot.c diff --git a/platform/mbed_semihost_api.c b/platform/source/mbed_semihost_api.c similarity index 99% rename from platform/mbed_semihost_api.c rename to platform/source/mbed_semihost_api.c index c9975519fc..f88c1fbf51 100644 --- a/platform/mbed_semihost_api.c +++ b/platform/source/mbed_semihost_api.c @@ -181,4 +181,3 @@ int semihost_disabledebug(void) } #endif - diff --git a/platform/mbed_stats.c b/platform/source/mbed_stats.c similarity index 86% rename from platform/mbed_stats.c rename to platform/source/mbed_stats.c index e2d0a6bf00..f7d9ad101d 100644 --- a/platform/mbed_stats.c +++ b/platform/source/mbed_stats.c @@ -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 #include diff --git a/platform/mbed_wait_api_no_rtos.c b/platform/source/mbed_wait_api_no_rtos.c similarity index 100% rename from platform/mbed_wait_api_no_rtos.c rename to platform/source/mbed_wait_api_no_rtos.c diff --git a/platform/mbed_wait_api_rtos.cpp b/platform/source/mbed_wait_api_rtos.cpp similarity index 97% rename from platform/mbed_wait_api_rtos.cpp rename to platform/source/mbed_wait_api_rtos.cpp index da2c0f464e..163054753b 100644 --- a/platform/mbed_wait_api_rtos.cpp +++ b/platform/source/mbed_wait_api_rtos.cpp @@ -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 - diff --git a/platform/toolchain.h b/platform/toolchain.h index cf561fca75..6d23b3661d 100644 --- a/platform/toolchain.h +++ b/platform/toolchain.h @@ -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");