Skip to content

[drivers] Update doxygen errors #4111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions doxygen_options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"ENABLE_PREPROCESSING": "YES",
"MACRO_EXPANSION": "YES",
"EXPAND_ONLY_PREDEF": "NO",
"SEARCH_INCLUDES": "YES",
"INCLUDE_PATH": "",
"INCLUDE_FILE_PATTERNS": "",
"PREDEFINED": "DOXYGEN_ONLY \"MBED_DEPRECATED_SINCE(f, g)=\"",
"EXPAND_AS_DEFINED": "",
"SKIP_FUNCTION_MACROS": "NO",
"EXCLUDE_PATTERNS": "*/targets/* */features/FEATURE_*/* */features/mbedtls/* */features/nanostack/* */features/storage/* */features/unsupported/* */features/frameworks/* */features/filesystem/fat/* */BUILD/* */rtos/* */events/* */platform/* */cmsis/* */hal/* */features/*"
}
8 changes: 3 additions & 5 deletions drivers/AnalogIn.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,18 @@

#include "platform/platform.h"

#if DEVICE_ANALOGIN
#if defined (DEVICE_ANALOGIN) || defined(DOXYGEN_ONLY)

#include "hal/analogin_api.h"
#include "platform/SingletonPtr.h"
#include "platform/PlatformMutex.h"

namespace mbed {
/** \addtogroup drivers */
/** @{*/

/** An analog input, used for reading the voltage on a pin
*
* @Note Synchronization level: Thread safe
* @note Synchronization level: Thread safe
*
* Example:
* @code
Expand All @@ -48,6 +47,7 @@ namespace mbed {
* }
* }
* @endcode
* @ingroup drivers
*/
class AnalogIn {

Expand All @@ -56,7 +56,6 @@ class AnalogIn {
/** Create an AnalogIn, connected to the specified pin
*
* @param pin AnalogIn pin to connect to
* @param name (optional) A string to identify the object
*/
AnalogIn(PinName pin) {
lock();
Expand Down Expand Up @@ -129,4 +128,3 @@ class AnalogIn {

#endif

/** @}*/
10 changes: 4 additions & 6 deletions drivers/AnalogOut.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,17 @@

#include "platform/platform.h"

#if DEVICE_ANALOGOUT
#if defined (DEVICE_ANALOGOUT) || defined(DOXYGEN_ONLY)

#include "hal/analogout_api.h"
#include "platform/PlatformMutex.h"

namespace mbed {
/** \addtogroup drivers */
/** @{*/

/** An analog output, used for setting the voltage on a pin
*
* @Note Synchronization level: Thread safe
* @note Synchronization level: Thread safe
*
* Example:
* @code
Expand All @@ -48,14 +47,15 @@ namespace mbed {
* }
* }
* @endcode
* @ingroup drivers
*/
class AnalogOut {

public:

/** Create an AnalogOut connected to the specified pin
*
* @param AnalogOut pin to connect to (18)
* @param pin AnalogOut pin to connect to
*/
AnalogOut(PinName pin) {
analogout_init(&_dac, pin);
Expand Down Expand Up @@ -146,5 +146,3 @@ class AnalogOut {
#endif

#endif

/** @}*/
33 changes: 26 additions & 7 deletions drivers/BusIn.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@

namespace mbed {
/** \addtogroup drivers */
/** @{*/

/** A digital input bus, used for reading the state of a collection of pins
*
* @Note Synchronization level: Thread safe
* @note Synchronization level: Thread safe
* @ingroup drivers
*/
class BusIn {

Expand All @@ -35,7 +35,22 @@ class BusIn {

/** Create an BusIn, connected to the specified pins
*
* @param <n> DigitalIn pin to connect to bus bit <n> (p5-p30, NC)
* @param p0 DigitalIn pin to connect to bus bit
* @param p1 DigitalIn pin to connect to bus bit
* @param p2 DigitalIn pin to connect to bus bit
* @param p3 DigitalIn pin to connect to bus bit
* @param p4 DigitalIn pin to connect to bus bit
* @param p5 DigitalIn pin to connect to bus bit
* @param p6 DigitalIn pin to connect to bus bit
* @param p7 DigitalIn pin to connect to bus bit
* @param p8 DigitalIn pin to connect to bus bit
* @param p9 DigitalIn pin to connect to bus bit
* @param p10 DigitalIn pin to connect to bus bit
* @param p11 DigitalIn pin to connect to bus bit
* @param p12 DigitalIn pin to connect to bus bit
* @param p13 DigitalIn pin to connect to bus bit
* @param p14 DigitalIn pin to connect to bus bit
* @param p15 DigitalIn pin to connect to bus bit
*
* @note
* It is only required to specify as many pin variables as is required
Expand All @@ -46,7 +61,12 @@ class BusIn {
PinName p8 = NC, PinName p9 = NC, PinName p10 = NC, PinName p11 = NC,
PinName p12 = NC, PinName p13 = NC, PinName p14 = NC, PinName p15 = NC);

BusIn(PinName pins[16]);

/** Create an BusIn, connected to the specified pins
*
* @param pins An array of pins to connect to bus bit
*/
BusIn(PinName pins[16]);

virtual ~BusIn();

Expand All @@ -59,7 +79,7 @@ class BusIn {

/** Set the input pin mode
*
* @param mode PullUp, PullDown, PullNone
* @param pull PullUp, PullDown, PullNone
*/
void mode(PinMode pull);

Expand All @@ -85,7 +105,7 @@ class BusIn {
protected:
DigitalIn* _pin[16];

/** Mask of bus's NC pins
/* Mask of bus's NC pins
* If bit[n] is set to 1 - pin is connected
* if bit[n] is cleared - pin is not connected (NC)
*/
Expand All @@ -105,4 +125,3 @@ class BusIn {

#endif

/** @}*/
31 changes: 24 additions & 7 deletions drivers/BusInOut.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,34 @@

namespace mbed {
/** \addtogroup drivers */
/** @{*/

/** A digital input output bus, used for setting the state of a collection of pins
*
* @Note Synchronization level: Thread safe
* @note Synchronization level: Thread safe
* @ingroup drivers
*/
class BusInOut {

public:

/** Create an BusInOut, connected to the specified pins
*
* @param p<n> DigitalInOut pin to connect to bus bit p<n> (p5-p30, NC)
* @param p0 DigitalInOut pin to connect to bus bit
* @param p1 DigitalInOut pin to connect to bus bit
* @param p2 DigitalInOut pin to connect to bus bit
* @param p3 DigitalInOut pin to connect to bus bit
* @param p4 DigitalInOut pin to connect to bus bit
* @param p5 DigitalInOut pin to connect to bus bit
* @param p6 DigitalInOut pin to connect to bus bit
* @param p7 DigitalInOut pin to connect to bus bit
* @param p8 DigitalInOut pin to connect to bus bit
* @param p9 DigitalInOut pin to connect to bus bit
* @param p10 DigitalInOut pin to connect to bus bit
* @param p11 DigitalInOut pin to connect to bus bit
* @param p12 DigitalInOut pin to connect to bus bit
* @param p13 DigitalInOut pin to connect to bus bit
* @param p14 DigitalInOut pin to connect to bus bit
* @param p15 DigitalInOut pin to connect to bus bit
*
* @note
* It is only required to specify as many pin variables as is required
Expand All @@ -44,6 +59,10 @@ class BusInOut {
PinName p8 = NC, PinName p9 = NC, PinName p10 = NC, PinName p11 = NC,
PinName p12 = NC, PinName p13 = NC, PinName p14 = NC, PinName p15 = NC);

/** Create an BusInOut, connected to the specified pins
*
* @param pins An array of pins to construct a BusInOut from
*/
BusInOut(PinName pins[16]);

virtual ~BusInOut();
Expand Down Expand Up @@ -73,7 +92,7 @@ class BusInOut {

/** Set the input pin mode
*
* @param mode PullUp, PullDown, PullNone
* @param pull PullUp, PullDown, PullNone
*/
void mode(PinMode pull);

Expand Down Expand Up @@ -106,7 +125,7 @@ class BusInOut {
virtual void unlock();
DigitalInOut* _pin[16];

/** Mask of bus's NC pins
/* Mask of bus's NC pins
* If bit[n] is set to 1 - pin is connected
* if bit[n] is cleared - pin is not connected (NC)
*/
Expand All @@ -123,5 +142,3 @@ class BusInOut {
} // namespace mbed

#endif

/** @}*/
29 changes: 23 additions & 6 deletions drivers/BusOut.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,34 @@

namespace mbed {
/** \addtogroup drivers */
/** @{*/

/** A digital output bus, used for setting the state of a collection of pins
* @ingroup drivers
*/
class BusOut {

public:

/** Create an BusOut, connected to the specified pins
*
* @param p<n> DigitalOut pin to connect to bus bit <n> (p5-p30, NC)
* @param p0 DigitalOut pin to connect to bus bit
* @param p1 DigitalOut pin to connect to bus bit
* @param p2 DigitalOut pin to connect to bus bit
* @param p3 DigitalOut pin to connect to bus bit
* @param p4 DigitalOut pin to connect to bus bit
* @param p5 DigitalOut pin to connect to bus bit
* @param p6 DigitalOut pin to connect to bus bit
* @param p7 DigitalOut pin to connect to bus bit
* @param p8 DigitalOut pin to connect to bus bit
* @param p9 DigitalOut pin to connect to bus bit
* @param p10 DigitalOut pin to connect to bus bit
* @param p11 DigitalOut pin to connect to bus bit
* @param p12 DigitalOut pin to connect to bus bit
* @param p13 DigitalOut pin to connect to bus bit
* @param p14 DigitalOut pin to connect to bus bit
* @param p15 DigitalOut pin to connect to bus bit
*
* @Note Synchronization level: Thread safe
* @note Synchronization level: Thread safe
*
* @note
* It is only required to specify as many pin variables as is required
Expand All @@ -44,6 +59,10 @@ class BusOut {
PinName p8 = NC, PinName p9 = NC, PinName p10 = NC, PinName p11 = NC,
PinName p12 = NC, PinName p13 = NC, PinName p14 = NC, PinName p15 = NC);

/** Create an BusOut, connected to the specified pins
*
* @param pins An array of pins to connect to bus the bit
*/
BusOut(PinName pins[16]);

virtual ~BusOut();
Expand Down Expand Up @@ -90,7 +109,7 @@ class BusOut {
virtual void unlock();
DigitalOut* _pin[16];

/** Mask of bus's NC pins
/* Mask of bus's NC pins
* If bit[n] is set to 1 - pin is connected
* if bit[n] is cleared - pin is not connected (NC)
*/
Expand All @@ -107,5 +126,3 @@ class BusOut {
} // namespace mbed

#endif

/** @}*/
30 changes: 21 additions & 9 deletions drivers/CAN.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@

#include "platform/platform.h"

#if DEVICE_CAN
#if defined (DEVICE_CAN) || defined(DOXYGEN_ONLY)

#include "hal/can_api.h"
#include "platform/Callback.h"
#include "platform/PlatformMutex.h"

namespace mbed {
/** \addtogroup drivers */
/** @{*/

/** CANMessage class
*
* @Note Synchronization level: Thread safe
* @note Synchronization level: Thread safe
* @ingroup drivers
*/
class CANMessage : public CAN_Message {

Expand Down Expand Up @@ -67,6 +67,7 @@ class CANMessage : public CAN_Message {
};

/** A can bus client, used for communicating with can devices
* @ingroup drivers
*/
class CAN {

Expand Down Expand Up @@ -213,7 +214,7 @@ class CAN {
* generated.
*
* @param func A pointer to a void function, or 0 to set as none
* @param event Which CAN interrupt to attach the member function to (CAN::RxIrq for message received, CAN::TxIrq for transmitted or aborted, CAN::EwIrq for error warning, CAN::DoIrq for data overrun, CAN::WuIrq for wake-up, CAN::EpIrq for error passive, CAN::AlIrq for arbitration lost, CAN::BeIrq for bus error)
* @param type Which CAN interrupt to attach the member function to (CAN::RxIrq for message received, CAN::TxIrq for transmitted or aborted, CAN::EwIrq for error warning, CAN::DoIrq for data overrun, CAN::WuIrq for wake-up, CAN::EpIrq for error passive, CAN::AlIrq for arbitration lost, CAN::BeIrq for bus error)
*/
void attach(Callback<void()> func, IrqType type=RxIrq);

Expand All @@ -222,25 +223,37 @@ class CAN {
*
* @param obj pointer to the object to call the member function on
* @param method pointer to the member function to be called
* @param event Which CAN interrupt to attach the member function to (CAN::RxIrq for message received, TxIrq for transmitted or aborted, EwIrq for error warning, DoIrq for data overrun, WuIrq for wake-up, EpIrq for error passive, AlIrq for arbitration lost, BeIrq for bus error)
* @param type Which CAN interrupt to attach the member function to (CAN::RxIrq for message received, TxIrq for transmitted or aborted, EwIrq for error warning, DoIrq for data overrun, WuIrq for wake-up, EpIrq for error passive, AlIrq for arbitration lost, BeIrq for bus error)
* @deprecated
* The attach function does not support cv-qualifiers. Replaced by
* attach(callback(obj, method), type).
*/
template<typename T>
MBED_DEPRECATED_SINCE("mbed-os-5.1",
"The attach function does not support cv-qualifiers. Replaced by "
"attach(callback(obj, method), type).")
void attach(T* obj, void (T::*method)(), IrqType type=RxIrq) {
// Underlying call thread safe
attach(Callback<void()>(obj, method), type);
attach(callback(obj, method), type);
}

/** Attach a member function to call whenever a CAN frame received interrupt
* is generated.
*
* @param obj pointer to the object to call the member function on
* @param method pointer to the member function to be called
* @param event Which CAN interrupt to attach the member function to (CAN::RxIrq for message received, TxIrq for transmitted or aborted, EwIrq for error warning, DoIrq for data overrun, WuIrq for wake-up, EpIrq for error passive, AlIrq for arbitration lost, BeIrq for bus error)
* @param type Which CAN interrupt to attach the member function to (CAN::RxIrq for message received, TxIrq for transmitted or aborted, EwIrq for error warning, DoIrq for data overrun, WuIrq for wake-up, EpIrq for error passive, AlIrq for arbitration lost, BeIrq for bus error)
* @deprecated
* The attach function does not support cv-qualifiers. Replaced by
* attach(callback(obj, method), type).
*/
template<typename T>
MBED_DEPRECATED_SINCE("mbed-os-5.1",
"The attach function does not support cv-qualifiers. Replaced by "
"attach(callback(obj, method), type).")
void attach(T* obj, void (*method)(T*), IrqType type=RxIrq) {
// Underlying call thread safe
attach(Callback<void()>(obj, method), type);
attach(callback(obj, method), type);
}

static void _irq_handler(uint32_t id, CanIrqType type);
Expand All @@ -259,4 +272,3 @@ class CAN {

#endif // MBED_CAN_H

/** @}*/
Loading