Skip to content

Commit b15930c

Browse files
committed
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.
1 parent 936caa1 commit b15930c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+379
-96
lines changed

TESTS/mbed_drivers/timerevent/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "greentea-client/test_env.h"
2222
#include "unity.h"
2323
#include "utest.h"
24-
#include "drivers/TimerEvent.h"
24+
#include "drivers/internal/TimerEvent.h"
2525
#include "hal/ticker_api.h"
2626
#include "rtos.h"
2727

UNITTESTS/stubs/SerialBase_stub.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
#include "SerialBase.h"
18+
#include "drivers/internal/SerialBase.h"
1919

2020
namespace mbed {
2121

drivers/AnalogIn.h

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@
2626
#include "platform/PlatformMutex.h"
2727

2828
namespace mbed {
29-
/** \addtogroup drivers */
29+
/** \ingroup drivers */
30+
/** \addtogroup drivers-public-api Public API */
31+
/** @{*/
32+
/**
33+
* \defgroup drivers_AnalogIn AnalogIn class
34+
* @{
35+
*/
3036

3137
/** An analog input, used for reading the voltage on a pin
3238
*
@@ -48,7 +54,6 @@ namespace mbed {
4854
* }
4955
* }
5056
* @endcode
51-
* @ingroup drivers
5257
*/
5358
class AnalogIn {
5459

@@ -111,8 +116,12 @@ class AnalogIn {
111116
analogin_t _adc;
112117
static SingletonPtr<PlatformMutex> _mutex;
113118
#endif //!defined(DOXYGEN_ONLY)
119+
114120
};
115121

122+
/** @}*/
123+
/** @}*/
124+
116125
} // namespace mbed
117126

118127
#endif

drivers/AnalogOut.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@
2525
#include "platform/PlatformMutex.h"
2626

2727
namespace mbed {
28-
/** \addtogroup drivers */
28+
/** \ingroup drivers */
29+
/** \addtogroup drivers-public-api */
30+
/** @{*/
31+
/**
32+
* \defgroup drivers_AnalogOut AnalogOut class
33+
* @{
34+
*/
2935

3036
/** An analog output, used for setting the voltage on a pin
3137
*
@@ -48,7 +54,6 @@ namespace mbed {
4854
* }
4955
* }
5056
* @endcode
51-
* @ingroup drivers
5257
*/
5358
class AnalogOut {
5459

@@ -131,6 +136,9 @@ class AnalogOut {
131136
#endif //!defined(DOXYGEN_ONLY)
132137
};
133138

139+
/** @}*/
140+
/** @}*/
141+
134142
} // namespace mbed
135143

136144
#endif

drivers/BusIn.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,17 @@
2323
#include "platform/NonCopyable.h"
2424

2525
namespace mbed {
26-
/** \addtogroup drivers */
26+
/** \ingroup drivers */
27+
/** \addtogroup drivers-public-api */
28+
/** @{*/
29+
/**
30+
* \defgroup drivers_BusIn BusIn class
31+
* @{
32+
*/
2733

2834
/** A digital input bus, used for reading the state of a collection of pins
2935
*
3036
* @note Synchronization level: Thread safe
31-
* @ingroup drivers
3237
*/
3338
class BusIn : private NonCopyable<BusIn> {
3439

@@ -125,6 +130,9 @@ class BusIn : private NonCopyable<BusIn> {
125130
#endif
126131
};
127132

133+
/** @}*/
134+
/** @}*/
135+
128136
} // namespace mbed
129137

130138
#endif

drivers/BusInOut.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,20 @@
2222
#include "platform/NonCopyable.h"
2323

2424
namespace mbed {
25-
/** \addtogroup drivers */
25+
/** \ingroup drivers */
26+
/** \addtogroup drivers-public-api */
27+
/** @{*/
28+
/**
29+
* \defgroup drivers_BusInOut BusInOut class
30+
* @{
31+
*/
2632

2733
/** A digital input output bus, used for setting the state of a collection of pins.
2834
* Implemented as an array of DigitalInOut pins, the bus can be constructed by any
2935
* pins without restriction other than being capable of digital input or output
3036
* capabilities
3137
*
3238
* @note Synchronization level: Thread safe
33-
* @ingroup drivers
3439
*/
3540
class BusInOut : private NonCopyable<BusInOut> {
3641

@@ -147,6 +152,9 @@ class BusInOut : private NonCopyable<BusInOut> {
147152
#endif //!defined(DOXYGEN_ONLY)
148153
};
149154

155+
/** @}*/
156+
/** @}*/
157+
150158
} // namespace mbed
151159

152160
#endif

drivers/BusOut.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,15 @@
2222
#include "platform/NonCopyable.h"
2323

2424
namespace mbed {
25-
/** \addtogroup drivers */
25+
/** \ingroup drivers */
26+
/** \addtogroup drivers-public-api */
27+
/** @{*/
28+
/**
29+
* \defgroup drivers_BusOut BusOut class
30+
* @{
31+
*/
2632

2733
/** A digital output bus, used for setting the state of a collection of pins
28-
* @ingroup drivers
2934
*/
3035
class BusOut : private NonCopyable<BusOut> {
3136

@@ -125,6 +130,9 @@ class BusOut : private NonCopyable<BusOut> {
125130
#endif
126131
};
127132

133+
/** @}*/
134+
/** @}*/
135+
128136
} // namespace mbed
129137

130138
#endif

drivers/CAN.h

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,17 @@
2727
#include "platform/NonCopyable.h"
2828

2929
namespace mbed {
30-
/** \addtogroup drivers */
30+
/** \ingroup drivers */
31+
/** \addtogroup drivers-public-api */
32+
/** @{*/
33+
/**
34+
* \defgroup drivers_CANMessage CANMessage class
35+
* @{
36+
*/
3137

3238
/** CANMessage class
3339
*
3440
* @note Synchronization level: Thread safe
35-
* @ingroup drivers
3641
*/
3742
class CANMessage : public CAN_Message {
3843

@@ -70,8 +75,14 @@ class CANMessage : public CAN_Message {
7075
CANMessage(unsigned int _id, CANFormat _format = CANStandard);
7176
};
7277

78+
/** @}*/
79+
80+
/**
81+
* \defgroup drivers_CAN CAN class
82+
* @{
83+
*/
84+
7385
/** A can bus client, used for communicating with can devices
74-
* @ingroup drivers
7586
*/
7687
class CAN : private NonCopyable<CAN> {
7788

@@ -300,6 +311,9 @@ class CAN : private NonCopyable<CAN> {
300311
#endif
301312
};
302313

314+
/** @}*/
315+
/** @}*/
316+
303317
} // namespace mbed
304318

305319
#endif

drivers/DigitalIn.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@
2222
#include "hal/gpio_api.h"
2323

2424
namespace mbed {
25-
/** \addtogroup drivers */
25+
/** \ingroup drivers */
26+
/** \addtogroup drivers-public-api */
27+
/** @{*/
28+
/**
29+
* \defgroup drivers_DigitalIn DigitalIn class
30+
* @{
31+
*/
2632

2733
/** A digital input, used for reading the state of a pin
2834
*
@@ -46,7 +52,6 @@ namespace mbed {
4652
* }
4753
* }
4854
* @endcode
49-
* @ingroup drivers
5055
*/
5156
class DigitalIn {
5257

@@ -122,6 +127,9 @@ class DigitalIn {
122127
#endif //!defined(DOXYGEN_ONLY)
123128
};
124129

130+
/** @}*/
131+
/** @}*/
132+
125133
} // namespace mbed
126134

127135
#endif

drivers/DigitalInOut.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,17 @@
2222
#include "hal/gpio_api.h"
2323

2424
namespace mbed {
25-
/** \addtogroup drivers */
25+
/** \ingroup drivers */
26+
/** \addtogroup drivers-public-api */
27+
/** @{*/
28+
/**
29+
* \defgroup drivers_DigitalInOut DigitalInOut class
30+
* @{
31+
*/
2632

2733
/** A digital input/output, used for setting or reading a bi-directional pin
2834
*
2935
* @note Synchronization level: Interrupt safe
30-
* @ingroup drivers
3136
*/
3237
class DigitalInOut {
3338

@@ -144,6 +149,9 @@ class DigitalInOut {
144149
#endif //!defined(DOXYGEN_ONLY)
145150
};
146151

152+
/** @}*/
153+
/** @}*/
154+
147155
} // namespace mbed
148156

149157
#endif

0 commit comments

Comments
 (0)