From b15930c86d2b451b5b324b79170b25b92f26e6a6 Mon Sep 17 00:00:00 2001 From: Hugues Kamba Date: Thu, 27 Jun 2019 12:00:36 +0100 Subject: [PATCH] Separate drivers internal APIs from public APIs (#5) * Move source files and internal headers to `internal` dir * Amend test files and other modules include paths for internal headers * Add Doxygen comments for documenting internal and public drivers APIs * Remove incorrectly grouped Devicekey from the drivers Doxygen group and add to the newly created `Device Key` group. --- TESTS/mbed_drivers/timerevent/main.cpp | 2 +- UNITTESTS/stubs/SerialBase_stub.cpp | 2 +- drivers/AnalogIn.h | 13 +++++++++++-- drivers/AnalogOut.h | 12 ++++++++++-- drivers/BusIn.h | 12 ++++++++++-- drivers/BusInOut.h | 12 ++++++++++-- drivers/BusOut.h | 12 ++++++++++-- drivers/CAN.h | 20 +++++++++++++++++--- drivers/DigitalIn.h | 12 ++++++++++-- drivers/DigitalInOut.h | 12 ++++++++++-- drivers/DigitalOut.h | 12 ++++++++++-- drivers/Ethernet.h | 12 ++++++++++-- drivers/FlashIAP.h | 12 ++++++++++-- drivers/I2C.h | 12 ++++++++++-- drivers/I2CSlave.h | 12 ++++++++++-- drivers/InterruptIn.h | 12 ++++++++++-- drivers/InterruptManager.h | 12 ++++++++++-- drivers/LowPowerTicker.h | 12 ++++++++++-- drivers/LowPowerTimeout.h | 14 +++++++++++--- drivers/LowPowerTimer.h | 12 ++++++++++-- drivers/MbedCRC.h | 12 +++++++++--- drivers/PortIn.h | 12 ++++++++++-- drivers/PortInOut.h | 12 ++++++++++-- drivers/PortOut.h | 12 ++++++++++-- drivers/PwmOut.h | 12 ++++++++++-- drivers/QSPI.h | 12 ++++++++++-- drivers/RawSerial.h | 14 +++++++++++--- drivers/SPI.h | 12 ++++++++++-- drivers/SPISlave.h | 12 ++++++++++-- drivers/Serial.h | 14 +++++++++++--- drivers/SerialWireOutput.h | 10 ++++++++++ drivers/Ticker.h | 14 +++++++++++--- drivers/Timeout.h | 12 ++++++++++-- drivers/Timer.h | 12 ++++++++++-- drivers/UARTSerial.h | 15 ++++++++++++--- drivers/{ => internal}/AnalogIn.cpp | 0 drivers/{ => internal}/AnalogOut.cpp | 0 drivers/{ => internal}/BusIn.cpp | 0 drivers/{ => internal}/BusInOut.cpp | 0 drivers/{ => internal}/BusOut.cpp | 0 drivers/{ => internal}/CAN.cpp | 0 drivers/{ => internal}/DigitalIn.cpp | 0 drivers/{ => internal}/DigitalInOut.cpp | 0 drivers/{ => internal}/DigitalOut.cpp | 0 drivers/{ => internal}/Ethernet.cpp | 0 drivers/{ => internal}/FlashIAP.cpp | 0 drivers/{ => internal}/I2C.cpp | 0 drivers/{ => internal}/I2CSlave.cpp | 0 drivers/{ => internal}/InterruptIn.cpp | 0 drivers/{ => internal}/InterruptManager.cpp | 0 drivers/{ => internal}/MbedCRC.cpp | 4 ---- drivers/{ => internal}/PortIn.cpp | 0 drivers/{ => internal}/PortInOut.cpp | 0 drivers/{ => internal}/PortOut.cpp | 0 drivers/{ => internal}/PwmOut.cpp | 0 drivers/{ => internal}/QSPI.cpp | 0 drivers/{ => internal}/RawSerial.cpp | 0 drivers/{ => internal}/SPI.cpp | 0 drivers/{ => internal}/SPISlave.cpp | 0 drivers/{ => internal}/Serial.cpp | 0 drivers/{ => internal}/SerialBase.cpp | 2 +- drivers/{ => internal}/SerialBase.h | 13 +++++++++++-- drivers/{ => internal}/SerialWireOutput.cpp | 0 drivers/{ => internal}/TableCRC.cpp | 6 +----- drivers/{ => internal}/TableCRC.h | 4 +++- drivers/{ => internal}/Ticker.cpp | 2 +- drivers/{ => internal}/Timeout.cpp | 0 drivers/{ => internal}/Timer.cpp | 0 drivers/{ => internal}/TimerEvent.cpp | 2 +- drivers/{ => internal}/TimerEvent.h | 12 ++++++++++-- drivers/{ => internal}/UARTSerial.cpp | 0 features/device_key/source/DeviceKey.h | 4 ++-- rtos/TARGET_CORTEX/SysTimer.h | 4 ++-- rtos/TARGET_CORTEX/mbed_rtx_idle.cpp | 4 ++-- 74 files changed, 379 insertions(+), 96 deletions(-) rename drivers/{ => internal}/AnalogIn.cpp (100%) rename drivers/{ => internal}/AnalogOut.cpp (100%) rename drivers/{ => internal}/BusIn.cpp (100%) rename drivers/{ => internal}/BusInOut.cpp (100%) rename drivers/{ => internal}/BusOut.cpp (100%) rename drivers/{ => internal}/CAN.cpp (100%) rename drivers/{ => internal}/DigitalIn.cpp (100%) rename drivers/{ => internal}/DigitalInOut.cpp (100%) rename drivers/{ => internal}/DigitalOut.cpp (100%) rename drivers/{ => internal}/Ethernet.cpp (100%) rename drivers/{ => internal}/FlashIAP.cpp (100%) rename drivers/{ => internal}/I2C.cpp (100%) rename drivers/{ => internal}/I2CSlave.cpp (100%) rename drivers/{ => internal}/InterruptIn.cpp (100%) rename drivers/{ => internal}/InterruptManager.cpp (100%) rename drivers/{ => internal}/MbedCRC.cpp (97%) rename drivers/{ => internal}/PortIn.cpp (100%) rename drivers/{ => internal}/PortInOut.cpp (100%) rename drivers/{ => internal}/PortOut.cpp (100%) rename drivers/{ => internal}/PwmOut.cpp (100%) rename drivers/{ => internal}/QSPI.cpp (100%) rename drivers/{ => internal}/RawSerial.cpp (100%) rename drivers/{ => internal}/SPI.cpp (100%) rename drivers/{ => internal}/SPISlave.cpp (100%) rename drivers/{ => internal}/Serial.cpp (100%) rename drivers/{ => internal}/SerialBase.cpp (99%) rename drivers/{ => internal}/SerialBase.h (98%) rename drivers/{ => internal}/SerialWireOutput.cpp (100%) rename drivers/{ => internal}/TableCRC.cpp (99%) rename drivers/{ => internal}/TableCRC.h (94%) rename drivers/{ => internal}/Ticker.cpp (98%) rename drivers/{ => internal}/Timeout.cpp (100%) rename drivers/{ => internal}/Timer.cpp (100%) rename drivers/{ => internal}/TimerEvent.cpp (96%) rename drivers/{ => internal}/TimerEvent.h (94%) rename drivers/{ => internal}/UARTSerial.cpp (100%) diff --git a/TESTS/mbed_drivers/timerevent/main.cpp b/TESTS/mbed_drivers/timerevent/main.cpp index 7228b8bb16e..b02a441db79 100644 --- a/TESTS/mbed_drivers/timerevent/main.cpp +++ b/TESTS/mbed_drivers/timerevent/main.cpp @@ -21,7 +21,7 @@ #include "greentea-client/test_env.h" #include "unity.h" #include "utest.h" -#include "drivers/TimerEvent.h" +#include "drivers/internal/TimerEvent.h" #include "hal/ticker_api.h" #include "rtos.h" diff --git a/UNITTESTS/stubs/SerialBase_stub.cpp b/UNITTESTS/stubs/SerialBase_stub.cpp index e156d8f4802..740972e101f 100644 --- a/UNITTESTS/stubs/SerialBase_stub.cpp +++ b/UNITTESTS/stubs/SerialBase_stub.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "SerialBase.h" +#include "drivers/internal/SerialBase.h" namespace mbed { diff --git a/drivers/AnalogIn.h b/drivers/AnalogIn.h index 633b3b0b4e3..8b217bb4d1a 100644 --- a/drivers/AnalogIn.h +++ b/drivers/AnalogIn.h @@ -26,7 +26,13 @@ #include "platform/PlatformMutex.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api Public API */ +/** @{*/ +/** + * \defgroup drivers_AnalogIn AnalogIn class + * @{ + */ /** An analog input, used for reading the voltage on a pin * @@ -48,7 +54,6 @@ namespace mbed { * } * } * @endcode - * @ingroup drivers */ class AnalogIn { @@ -111,8 +116,12 @@ class AnalogIn { analogin_t _adc; static SingletonPtr _mutex; #endif //!defined(DOXYGEN_ONLY) + }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/AnalogOut.h b/drivers/AnalogOut.h index ec75c7a333b..15aa3791c13 100644 --- a/drivers/AnalogOut.h +++ b/drivers/AnalogOut.h @@ -25,7 +25,13 @@ #include "platform/PlatformMutex.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_AnalogOut AnalogOut class + * @{ + */ /** An analog output, used for setting the voltage on a pin * @@ -48,7 +54,6 @@ namespace mbed { * } * } * @endcode - * @ingroup drivers */ class AnalogOut { @@ -131,6 +136,9 @@ class AnalogOut { #endif //!defined(DOXYGEN_ONLY) }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/BusIn.h b/drivers/BusIn.h index 61bf7b536e3..85d9c9256da 100644 --- a/drivers/BusIn.h +++ b/drivers/BusIn.h @@ -23,12 +23,17 @@ #include "platform/NonCopyable.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_BusIn BusIn class + * @{ + */ /** A digital input bus, used for reading the state of a collection of pins * * @note Synchronization level: Thread safe - * @ingroup drivers */ class BusIn : private NonCopyable { @@ -125,6 +130,9 @@ class BusIn : private NonCopyable { #endif }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/BusInOut.h b/drivers/BusInOut.h index 618f9b8cf3b..d2470874e29 100644 --- a/drivers/BusInOut.h +++ b/drivers/BusInOut.h @@ -22,7 +22,13 @@ #include "platform/NonCopyable.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_BusInOut BusInOut class + * @{ + */ /** A digital input output bus, used for setting the state of a collection of pins. * Implemented as an array of DigitalInOut pins, the bus can be constructed by any @@ -30,7 +36,6 @@ namespace mbed { * capabilities * * @note Synchronization level: Thread safe - * @ingroup drivers */ class BusInOut : private NonCopyable { @@ -147,6 +152,9 @@ class BusInOut : private NonCopyable { #endif //!defined(DOXYGEN_ONLY) }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/BusOut.h b/drivers/BusOut.h index ca83d00a17a..cbd58ed1983 100644 --- a/drivers/BusOut.h +++ b/drivers/BusOut.h @@ -22,10 +22,15 @@ #include "platform/NonCopyable.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_BusOut BusOut class + * @{ + */ /** A digital output bus, used for setting the state of a collection of pins - * @ingroup drivers */ class BusOut : private NonCopyable { @@ -125,6 +130,9 @@ class BusOut : private NonCopyable { #endif }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/CAN.h b/drivers/CAN.h index 05cb1ec2529..8e9cc11ed34 100644 --- a/drivers/CAN.h +++ b/drivers/CAN.h @@ -27,12 +27,17 @@ #include "platform/NonCopyable.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_CANMessage CANMessage class + * @{ + */ /** CANMessage class * * @note Synchronization level: Thread safe - * @ingroup drivers */ class CANMessage : public CAN_Message { @@ -70,8 +75,14 @@ class CANMessage : public CAN_Message { CANMessage(unsigned int _id, CANFormat _format = CANStandard); }; +/** @}*/ + +/** + * \defgroup drivers_CAN CAN class + * @{ + */ + /** A can bus client, used for communicating with can devices - * @ingroup drivers */ class CAN : private NonCopyable { @@ -300,6 +311,9 @@ class CAN : private NonCopyable { #endif }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/DigitalIn.h b/drivers/DigitalIn.h index b2406ea8e78..ae2bf52df46 100644 --- a/drivers/DigitalIn.h +++ b/drivers/DigitalIn.h @@ -22,7 +22,13 @@ #include "hal/gpio_api.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_DigitalIn DigitalIn class + * @{ + */ /** A digital input, used for reading the state of a pin * @@ -46,7 +52,6 @@ namespace mbed { * } * } * @endcode - * @ingroup drivers */ class DigitalIn { @@ -122,6 +127,9 @@ class DigitalIn { #endif //!defined(DOXYGEN_ONLY) }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/DigitalInOut.h b/drivers/DigitalInOut.h index c21253bf89f..6897768704f 100644 --- a/drivers/DigitalInOut.h +++ b/drivers/DigitalInOut.h @@ -22,12 +22,17 @@ #include "hal/gpio_api.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_DigitalInOut DigitalInOut class + * @{ + */ /** A digital input/output, used for setting or reading a bi-directional pin * * @note Synchronization level: Interrupt safe - * @ingroup drivers */ class DigitalInOut { @@ -144,6 +149,9 @@ class DigitalInOut { #endif //!defined(DOXYGEN_ONLY) }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/DigitalOut.h b/drivers/DigitalOut.h index 41ba5c5460e..bc1c44de947 100644 --- a/drivers/DigitalOut.h +++ b/drivers/DigitalOut.h @@ -21,7 +21,13 @@ #include "hal/gpio_api.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_DigitalOut DigitalOut class + * @{ + */ /** A digital output, used for setting the state of a pin * @@ -41,7 +47,6 @@ namespace mbed { * } * } * @endcode - * @ingroup drivers */ class DigitalOut { @@ -138,6 +143,9 @@ class DigitalOut { #endif //!defined(DOXYGEN_ONLY) }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/Ethernet.h b/drivers/Ethernet.h index 4f23c093cb1..6bc85e9c242 100644 --- a/drivers/Ethernet.h +++ b/drivers/Ethernet.h @@ -23,7 +23,13 @@ #if DEVICE_ETHERNET || defined(DOXYGEN_ONLY) namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_Ethernet Ethernet class + * @{ + */ /** An ethernet interface, to use with the ethernet pins. * @@ -54,7 +60,6 @@ namespace mbed { * } * } * @endcode - * @ingroup drivers */ MBED_DEPRECATED( "EthInterface is now the preferred way to get an Ethernet object.", @@ -175,6 +180,9 @@ class Ethernet : private NonCopyable { void set_link(Mode mode); }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/FlashIAP.h b/drivers/FlashIAP.h index 47c9fc6939a..f2ab7f1dc6f 100644 --- a/drivers/FlashIAP.h +++ b/drivers/FlashIAP.h @@ -49,12 +49,17 @@ extern uint32_t Load$$LR$$LR_IROM1$$Limit[]; namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_FlashIAP FlashIAP class + * @{ + */ /** Flash IAP driver. It invokes flash HAL functions. * * @note Synchronization level: Thread safe - * @ingroup drivers */ class FlashIAP : private NonCopyable { public: @@ -181,6 +186,9 @@ class FlashIAP : private NonCopyable { #endif }; +/** @}*/ +/** @}*/ + } /* namespace mbed */ #endif /* DEVICE_FLASH */ diff --git a/drivers/I2C.h b/drivers/I2C.h index 97ca24536bd..1aa2d894c37 100644 --- a/drivers/I2C.h +++ b/drivers/I2C.h @@ -34,7 +34,13 @@ #endif namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_I2C I2C class + * @{ + */ /** An I2C Master, used for communicating with I2C slave devices * @@ -70,7 +76,6 @@ namespace mbed { * } * } * @endcode - * @ingroup drivers */ class I2C : private NonCopyable { @@ -248,6 +253,9 @@ class I2C : private NonCopyable { #endif }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/I2CSlave.h b/drivers/I2CSlave.h index 529b5bc433f..e270e3a342d 100644 --- a/drivers/I2CSlave.h +++ b/drivers/I2CSlave.h @@ -24,7 +24,13 @@ #include "hal/i2c_api.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_I2CSlave I2CSlave class + * @{ + */ /** An I2C Slave, used for communicating with an I2C Master device. * @@ -64,7 +70,6 @@ namespace mbed { * } * } * @endcode - * @ingroup drivers */ class I2CSlave { @@ -181,6 +186,9 @@ class I2CSlave { #endif //!defined(DOXYGEN_ONLY) }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/InterruptIn.h b/drivers/InterruptIn.h index 991cc0b811b..4b9a4dbdc11 100644 --- a/drivers/InterruptIn.h +++ b/drivers/InterruptIn.h @@ -29,7 +29,13 @@ #include "platform/NonCopyable.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_InterruptIn InterruptIn class + * @{ + */ /** A digital interrupt input, used to call a function on a rising or falling edge * @@ -57,7 +63,6 @@ namespace mbed { * } * } * @endcode - * @ingroup drivers */ class InterruptIn : private NonCopyable { @@ -190,6 +195,9 @@ class InterruptIn : private NonCopyable { #endif }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/InterruptManager.h b/drivers/InterruptManager.h index 85463aad9d2..612c5980d67 100644 --- a/drivers/InterruptManager.h +++ b/drivers/InterruptManager.h @@ -24,7 +24,13 @@ #include namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_InterruptManager InterruptManager class + * @{ + */ /** Use this singleton if you need to chain interrupt handlers. * @deprecated Do not use this class. This class is not part of the public API of mbed-os and is being removed in the future. @@ -54,7 +60,6 @@ namespace mbed { * InterruptManager::get()->add_handler(handler, TIMER3_IRQn); * } * @endcode - * @ingroup drivers */ class InterruptManager : private NonCopyable { public: @@ -226,6 +231,9 @@ class InterruptManager : private NonCopyable { #endif }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/LowPowerTicker.h b/drivers/LowPowerTicker.h index a6f9fa94011..1c616a457b3 100644 --- a/drivers/LowPowerTicker.h +++ b/drivers/LowPowerTicker.h @@ -26,12 +26,17 @@ #include "hal/lp_ticker_api.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_LowPowerTicker LowPowerTicker class + * @{ + */ /** Low Power Ticker * * @note Synchronization level: Interrupt safe - * @ingroup drivers */ class LowPowerTicker : public Ticker, private NonCopyable { @@ -45,6 +50,9 @@ class LowPowerTicker : public Ticker, private NonCopyable { } }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/LowPowerTimeout.h b/drivers/LowPowerTimeout.h index 7198d7dc64c..e678809c0f4 100644 --- a/drivers/LowPowerTimeout.h +++ b/drivers/LowPowerTimeout.h @@ -26,12 +26,17 @@ #include "platform/NonCopyable.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_LowPowerTimeout LowPowerTimeout class + * @{ + */ /** Low Power Timout * * @note Synchronization level: Interrupt safe - * @ingroup drivers */ class LowPowerTimeout : public LowPowerTicker, private NonCopyable { #if !defined(DOXYGEN_ONLY) @@ -43,7 +48,10 @@ class LowPowerTimeout : public LowPowerTicker, private NonCopyable { @@ -42,6 +47,9 @@ class LowPowerTimer : public Timer, private NonCopyable { }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/MbedCRC.h b/drivers/MbedCRC.h index c0726a92b9f..1d666da445d 100644 --- a/drivers/MbedCRC.h +++ b/drivers/MbedCRC.h @@ -17,7 +17,7 @@ #ifndef MBED_CRC_API_H #define MBED_CRC_API_H -#include "drivers/TableCRC.h" +#include "drivers/internal/TableCRC.h" #include "hal/crc_api.h" #include "platform/mbed_assert.h" #include "platform/SingletonPtr.h" @@ -40,8 +40,13 @@ but we check for ( width < 8) before performing shift, so it should not be an is #endif namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ /** @{*/ +/** + * \defgroup drivers_MbedCRC MbedCRC class + * @{ + */ extern SingletonPtr mbed_crc_mutex; @@ -101,7 +106,6 @@ extern SingletonPtr mbed_crc_mutex; * return 0; * } * @endcode - * @ingroup drivers */ template class MbedCRC { @@ -565,6 +569,8 @@ class MbedCRC { #endif /** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/PortIn.h b/drivers/PortIn.h index d3fb7192429..bf77d70e3f5 100644 --- a/drivers/PortIn.h +++ b/drivers/PortIn.h @@ -24,7 +24,13 @@ #include "hal/port_api.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_PortIn PortIn class + * @{ + */ /** A multiple pin digital input * @@ -50,7 +56,6 @@ namespace mbed { * } * } * @endcode - * @ingroup drivers */ class PortIn { public: @@ -89,6 +94,9 @@ class PortIn { port_t _port; }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/PortInOut.h b/drivers/PortInOut.h index e725fa003f8..f17a6e55614 100644 --- a/drivers/PortInOut.h +++ b/drivers/PortInOut.h @@ -24,12 +24,17 @@ #include "hal/port_api.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_PortInOut PortInOut class + * @{ + */ /** A multiple pin digital in/out used to set/read multiple bi-directional pins * * @note Synchronization level: Interrupt safe - * @ingroup drivers */ class PortInOut { public: @@ -96,6 +101,9 @@ class PortInOut { port_t _port; }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/PortOut.h b/drivers/PortOut.h index 609c229e0de..1ce20e7424e 100644 --- a/drivers/PortOut.h +++ b/drivers/PortOut.h @@ -24,7 +24,13 @@ #include "hal/port_api.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_PortOut PortOut class + * @{ + */ /** A multiple pin digital output * * @note Synchronization level: Interrupt safe @@ -49,7 +55,6 @@ namespace mbed { * } * } * @endcode - * @ingroup drivers */ class PortOut { public: @@ -102,6 +107,9 @@ class PortOut { port_t _port; }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/PwmOut.h b/drivers/PwmOut.h index 7803eda61f9..d1221fb67c4 100644 --- a/drivers/PwmOut.h +++ b/drivers/PwmOut.h @@ -23,7 +23,13 @@ #include "hal/pwmout_api.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_PwmOut PwmOut class + * @{ + */ /** A pulse-width modulation digital output * @@ -46,7 +52,6 @@ namespace mbed { * } * } * @endcode - * @ingroup drivers */ class PwmOut { @@ -147,6 +152,9 @@ class PwmOut { #endif }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/QSPI.h b/drivers/QSPI.h index 1c6b7e743d6..42fcfa9b8b7 100644 --- a/drivers/QSPI.h +++ b/drivers/QSPI.h @@ -30,7 +30,13 @@ namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_QSPI QSPI class + * @{ + */ /** A QSPI Driver, used for communicating with QSPI slave devices * @@ -69,7 +75,6 @@ namespace mbed { * * } * @endcode - * @ingroup drivers */ class QSPI : private NonCopyable { @@ -231,6 +236,9 @@ class QSPI : private NonCopyable { #endif }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/RawSerial.h b/drivers/RawSerial.h index 215c271388c..d1100887de8 100644 --- a/drivers/RawSerial.h +++ b/drivers/RawSerial.h @@ -22,12 +22,18 @@ #if DEVICE_SERIAL || defined(DOXYGEN_ONLY) #include "mbed_toolchain.h" -#include "drivers/SerialBase.h" +#include "drivers/internal/SerialBase.h" #include "platform/NonCopyable.h" #include namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_RawSerial RawSerial class + * @{ + */ /** A serial port (UART) for communication with other serial devices * This is a variation of the Serial class that doesn't use streams, @@ -50,7 +56,6 @@ namespace mbed { * pc.putc('A'); * } * @endcode - * @ingroup drivers */ class RawSerial: public SerialBase, private NonCopyable { @@ -113,6 +118,9 @@ class RawSerial: public SerialBase, private NonCopyable { #endif }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/SPI.h b/drivers/SPI.h index ebb95f46098..7ac4a44ae2e 100644 --- a/drivers/SPI.h +++ b/drivers/SPI.h @@ -45,7 +45,13 @@ #endif namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_SPI SPI class + * @{ + */ struct use_gpio_ssel_t { }; const use_gpio_ssel_t use_gpio_ssel; @@ -90,7 +96,6 @@ const use_gpio_ssel_t use_gpio_ssel; * device.unlock(); * } * @endcode - * @ingroup drivers */ class SPI : private NonCopyable { @@ -463,6 +468,9 @@ class SPI : private NonCopyable { #endif //!defined(DOXYGEN_ONLY) }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif // DEVICE_SPI || DOXYGEN_ONLY diff --git a/drivers/SPISlave.h b/drivers/SPISlave.h index 72ebf0dcdd9..411e2b380fd 100644 --- a/drivers/SPISlave.h +++ b/drivers/SPISlave.h @@ -25,7 +25,13 @@ #include "hal/spi_api.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_SPISlave SPISlave class + * @{ + */ /** A SPI slave, used for communicating with a SPI master device. * @@ -51,7 +57,6 @@ namespace mbed { * } * } * @endcode - * @ingroup drivers */ class SPISlave : private NonCopyable { @@ -136,6 +141,9 @@ class SPISlave : private NonCopyable { #endif //!defined(DOXYGEN_ONLY) }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/Serial.h b/drivers/Serial.h index b6cf4d4b17e..e5d272ec8b0 100644 --- a/drivers/Serial.h +++ b/drivers/Serial.h @@ -22,12 +22,18 @@ #if DEVICE_SERIAL || defined(DOXYGEN_ONLY) #include "platform/Stream.h" -#include "SerialBase.h" +#include "drivers/internal/SerialBase.h" #include "platform/PlatformMutex.h" #include "platform/NonCopyable.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_Serial Serial class + * @{ + */ /** A serial port (UART) for communication with other serial devices * @@ -48,7 +54,6 @@ namespace mbed { * pc.printf("Hello World\n"); * } * @endcode - * @ingroup drivers */ class Serial : public SerialBase, public Stream, private NonCopyable { @@ -129,6 +134,9 @@ class Serial : public SerialBase, public Stream, private NonCopyable { #endif }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/SerialWireOutput.h b/drivers/SerialWireOutput.h index b9dfae79dfd..a446e37ff2d 100644 --- a/drivers/SerialWireOutput.h +++ b/drivers/SerialWireOutput.h @@ -25,6 +25,13 @@ #include "platform/FileHandle.h" namespace mbed { +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_SerialWireOutput SerialWireOutput class + * @{ + */ class SerialWireOutput : public FileHandle { @@ -64,6 +71,9 @@ class SerialWireOutput : public FileHandle { } }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif // DEVICE_ITM diff --git a/drivers/Ticker.h b/drivers/Ticker.h index 87053b9ee88..395e0cf2e6b 100644 --- a/drivers/Ticker.h +++ b/drivers/Ticker.h @@ -17,14 +17,20 @@ #ifndef MBED_TICKER_H #define MBED_TICKER_H -#include "drivers/TimerEvent.h" +#include "drivers/internal/TimerEvent.h" #include "platform/Callback.h" #include "platform/mbed_toolchain.h" #include "platform/NonCopyable.h" #include "hal/lp_ticker_api.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_Ticker Ticker class + * @{ + */ /** A Ticker is used to call a function at a recurring interval * @@ -60,7 +66,6 @@ namespace mbed { * } * } * @endcode - * @ingroup drivers */ class Ticker : public TimerEvent, private NonCopyable { @@ -149,6 +154,9 @@ class Ticker : public TimerEvent, private NonCopyable { #endif }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/Timeout.h b/drivers/Timeout.h index d86708cc3d7..673554f2341 100644 --- a/drivers/Timeout.h +++ b/drivers/Timeout.h @@ -21,7 +21,13 @@ #include "platform/NonCopyable.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_Timeout Timeout class + * @{ + */ /** A Timeout is used to call a function at a point in the future * @@ -52,7 +58,6 @@ namespace mbed { * } * } * @endcode - * @ingroup drivers */ class Timeout : public Ticker, private NonCopyable { @@ -62,6 +67,9 @@ class Timeout : public Ticker, private NonCopyable { #endif }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/Timer.h b/drivers/Timer.h index d32b84a2089..4fd2007dccc 100644 --- a/drivers/Timer.h +++ b/drivers/Timer.h @@ -22,7 +22,13 @@ #include "platform/NonCopyable.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_Timer Timer class + * @{ + */ /** A general purpose timer * @@ -46,7 +52,6 @@ namespace mbed { * printf("Toggle the led takes %d us", end - begin); * } * @endcode - * @ingroup drivers */ class Timer : private NonCopyable { @@ -113,6 +118,9 @@ class Timer : private NonCopyable { }; #endif +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/UARTSerial.h b/drivers/UARTSerial.h index 23cb869ca85..e9bbb418b25 100644 --- a/drivers/UARTSerial.h +++ b/drivers/UARTSerial.h @@ -23,7 +23,7 @@ #if (DEVICE_SERIAL && DEVICE_INTERRUPTIN) || defined(DOXYGEN_ONLY) #include "platform/FileHandle.h" -#include "SerialBase.h" +#include "drivers/internal/SerialBase.h" #include "InterruptIn.h" #include "platform/PlatformMutex.h" #include "platform/CircularBuffer.h" @@ -39,11 +39,16 @@ namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-public-api */ +/** @{*/ +/** + * \defgroup drivers_UARTSerial UARTSerial class + * @{ + */ /** Class providing buffered UART communication functionality using separate circular buffer for send and receive channels * - * @ingroup drivers */ class UARTSerial : private SerialBase, public FileHandle, private NonCopyable { @@ -349,6 +354,10 @@ class UARTSerial : private SerialBase, public FileHandle, private NonCopyable mbed_crc_mutex; @@ -74,6 +72,4 @@ MbedCRC::MbedCRC(): mbed_crc_ctor(); } -/** @}*/ } // namespace mbed - diff --git a/drivers/PortIn.cpp b/drivers/internal/PortIn.cpp similarity index 100% rename from drivers/PortIn.cpp rename to drivers/internal/PortIn.cpp diff --git a/drivers/PortInOut.cpp b/drivers/internal/PortInOut.cpp similarity index 100% rename from drivers/PortInOut.cpp rename to drivers/internal/PortInOut.cpp diff --git a/drivers/PortOut.cpp b/drivers/internal/PortOut.cpp similarity index 100% rename from drivers/PortOut.cpp rename to drivers/internal/PortOut.cpp diff --git a/drivers/PwmOut.cpp b/drivers/internal/PwmOut.cpp similarity index 100% rename from drivers/PwmOut.cpp rename to drivers/internal/PwmOut.cpp diff --git a/drivers/QSPI.cpp b/drivers/internal/QSPI.cpp similarity index 100% rename from drivers/QSPI.cpp rename to drivers/internal/QSPI.cpp diff --git a/drivers/RawSerial.cpp b/drivers/internal/RawSerial.cpp similarity index 100% rename from drivers/RawSerial.cpp rename to drivers/internal/RawSerial.cpp diff --git a/drivers/SPI.cpp b/drivers/internal/SPI.cpp similarity index 100% rename from drivers/SPI.cpp rename to drivers/internal/SPI.cpp diff --git a/drivers/SPISlave.cpp b/drivers/internal/SPISlave.cpp similarity index 100% rename from drivers/SPISlave.cpp rename to drivers/internal/SPISlave.cpp diff --git a/drivers/Serial.cpp b/drivers/internal/Serial.cpp similarity index 100% rename from drivers/Serial.cpp rename to drivers/internal/Serial.cpp diff --git a/drivers/SerialBase.cpp b/drivers/internal/SerialBase.cpp similarity index 99% rename from drivers/SerialBase.cpp rename to drivers/internal/SerialBase.cpp index 09372d71dc0..ddf13bc292e 100644 --- a/drivers/SerialBase.cpp +++ b/drivers/internal/SerialBase.cpp @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "drivers/SerialBase.h" +#include "drivers/internal/SerialBase.h" #include "platform/mbed_wait_api.h" #include "platform/mbed_critical.h" #include "platform/mbed_power_mgmt.h" diff --git a/drivers/SerialBase.h b/drivers/internal/SerialBase.h similarity index 98% rename from drivers/SerialBase.h rename to drivers/internal/SerialBase.h index 5d081d680ea..a8af60a9bf9 100644 --- a/drivers/SerialBase.h +++ b/drivers/internal/SerialBase.h @@ -32,13 +32,19 @@ #endif namespace mbed { -/** \addtogroup drivers */ +/** \defgroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-internal-api Internal API */ +/** @{*/ +/** + * \defgroup drivers_SerialBase SerialBase class + * @{ + */ /** A base class for serial port implementations * Can't be instantiated directly (use Serial or RawSerial) * * @note Synchronization level: Set by subclass - * @ingroup drivers */ class SerialBase : private NonCopyable { @@ -318,6 +324,9 @@ class SerialBase : private NonCopyable { #endif }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/SerialWireOutput.cpp b/drivers/internal/SerialWireOutput.cpp similarity index 100% rename from drivers/SerialWireOutput.cpp rename to drivers/internal/SerialWireOutput.cpp diff --git a/drivers/TableCRC.cpp b/drivers/internal/TableCRC.cpp similarity index 99% rename from drivers/TableCRC.cpp rename to drivers/internal/TableCRC.cpp index b0d316e4719..6cea67d94a3 100644 --- a/drivers/TableCRC.cpp +++ b/drivers/internal/TableCRC.cpp @@ -16,11 +16,9 @@ */ #include -#include "drivers/TableCRC.h" +#include "drivers/internal/TableCRC.h" namespace mbed { -/** \addtogroup drivers */ -/** @{*/ extern const uint8_t Table_CRC_7Bit_SD[MBED_CRC_TABLE_SIZE] = { 0x0, 0x12, 0x24, 0x36, 0x48, 0x5a, 0x6c, 0x7e, 0x90, 0x82, 0xb4, 0xa6, 0xd8, 0xca, 0xfc, 0xee, @@ -151,6 +149,4 @@ extern const uint32_t Table_CRC_32bit_Rev_ANSI[MBED_OPTIMIZED_CRC_TABLE_SIZE] = 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 0xbdbdf21c }; - -/** @}*/ } // namespace mbed diff --git a/drivers/TableCRC.h b/drivers/internal/TableCRC.h similarity index 94% rename from drivers/TableCRC.h rename to drivers/internal/TableCRC.h index 1ab5bf83656..15e460cb616 100644 --- a/drivers/TableCRC.h +++ b/drivers/internal/TableCRC.h @@ -21,7 +21,8 @@ #include namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-internal-api Internal API */ /** @{*/ #define MBED_CRC_TABLE_SIZE 256 @@ -35,6 +36,7 @@ extern const uint32_t Table_CRC_32bit_ANSI[MBED_CRC_TABLE_SIZE]; extern const uint32_t Table_CRC_32bit_Rev_ANSI[MBED_OPTIMIZED_CRC_TABLE_SIZE]; /** @}*/ + } // namespace mbed #endif diff --git a/drivers/Ticker.cpp b/drivers/internal/Ticker.cpp similarity index 98% rename from drivers/Ticker.cpp rename to drivers/internal/Ticker.cpp index fada56cf646..15098f9c96d 100644 --- a/drivers/Ticker.cpp +++ b/drivers/internal/Ticker.cpp @@ -16,7 +16,7 @@ */ #include "drivers/Ticker.h" -#include "drivers/TimerEvent.h" +#include "drivers/internal/TimerEvent.h" #include "platform/FunctionPointer.h" #include "hal/ticker_api.h" #include "platform/mbed_critical.h" diff --git a/drivers/Timeout.cpp b/drivers/internal/Timeout.cpp similarity index 100% rename from drivers/Timeout.cpp rename to drivers/internal/Timeout.cpp diff --git a/drivers/Timer.cpp b/drivers/internal/Timer.cpp similarity index 100% rename from drivers/Timer.cpp rename to drivers/internal/Timer.cpp diff --git a/drivers/TimerEvent.cpp b/drivers/internal/TimerEvent.cpp similarity index 96% rename from drivers/TimerEvent.cpp rename to drivers/internal/TimerEvent.cpp index a225d1fd1b1..d93e74790b7 100644 --- a/drivers/TimerEvent.cpp +++ b/drivers/internal/TimerEvent.cpp @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "drivers/TimerEvent.h" +#include "drivers/internal/TimerEvent.h" #include #include "hal/us_ticker_api.h" diff --git a/drivers/TimerEvent.h b/drivers/internal/TimerEvent.h similarity index 94% rename from drivers/TimerEvent.h rename to drivers/internal/TimerEvent.h index 0102e528911..df0056a0c06 100644 --- a/drivers/TimerEvent.h +++ b/drivers/internal/TimerEvent.h @@ -21,12 +21,17 @@ #include "platform/NonCopyable.h" namespace mbed { -/** \addtogroup drivers */ +/** \ingroup drivers */ +/** \addtogroup drivers-internal-api Internal API */ +/** @{*/ +/** + * \defgroup drivers_TimerEvent TimerEvent class + * @{ + */ /** Base abstraction for timer interrupts * * @note Synchronization level: Interrupt safe - * @ingroup drivers */ class TimerEvent : private NonCopyable { public: @@ -98,6 +103,9 @@ class TimerEvent : private NonCopyable { #endif }; +/** @}*/ +/** @}*/ + } // namespace mbed #endif diff --git a/drivers/UARTSerial.cpp b/drivers/internal/UARTSerial.cpp similarity index 100% rename from drivers/UARTSerial.cpp rename to drivers/internal/UARTSerial.cpp diff --git a/features/device_key/source/DeviceKey.h b/features/device_key/source/DeviceKey.h index 6ca024127e6..861d1592a0c 100644 --- a/features/device_key/source/DeviceKey.h +++ b/features/device_key/source/DeviceKey.h @@ -32,7 +32,7 @@ #if (DEVICEKEY_ENABLED) || defined(DOXYGEN_ONLY) namespace mbed { -/** \addtogroup drivers */ +/** \addtogroup device-key Device Key */ #define DEVICE_KEY_16BYTE 16 #define DEVICE_KEY_32BYTE 32 @@ -56,7 +56,7 @@ enum DeviceKeyStatus { /** Use this singleton if you need to derive a new key from the device root of trust. * * @note Synchronization level: Thread safe - * @ingroup drivers + * @ingroup device-key */ class DeviceKey : private mbed::NonCopyable { diff --git a/rtos/TARGET_CORTEX/SysTimer.h b/rtos/TARGET_CORTEX/SysTimer.h index 6561e647010..223bf7efc9e 100644 --- a/rtos/TARGET_CORTEX/SysTimer.h +++ b/rtos/TARGET_CORTEX/SysTimer.h @@ -1,5 +1,5 @@ /* mbed Microcontroller Library - * Copyright (c) 2006-2012 ARM Limited + * Copyright (c) 2006-2019 ARM Limited * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -25,7 +25,7 @@ #if MBED_TICKLESS || defined(DOXYGEN_ONLY) #include "platform/NonCopyable.h" -#include "drivers/TimerEvent.h" +#include "drivers/internal/TimerEvent.h" namespace rtos { namespace internal { diff --git a/rtos/TARGET_CORTEX/mbed_rtx_idle.cpp b/rtos/TARGET_CORTEX/mbed_rtx_idle.cpp index d0fa77af2be..f6d0a1e8bf7 100644 --- a/rtos/TARGET_CORTEX/mbed_rtx_idle.cpp +++ b/rtos/TARGET_CORTEX/mbed_rtx_idle.cpp @@ -1,5 +1,5 @@ /* mbed Microcontroller Library - * Copyright (c) 2006-2012 ARM Limited + * Copyright (c) 2006-2019 ARM Limited * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -22,7 +22,7 @@ #include "rtos/internal/rtos_idle.h" #include "platform/mbed_power_mgmt.h" -#include "TimerEvent.h" +#include "drivers/internal/TimerEvent.h" #include "lp_ticker_api.h" #include "us_ticker_api.h" #include "mbed_critical.h"