Merge pull request #4111 from sg-/fix-the-docs

[drivers] Update doxygen errors
pull/3886/merge
Anna Bridge 2017-04-21 14:10:17 +01:00 committed by GitHub
commit 47b1a9eeec
50 changed files with 271 additions and 233 deletions

12
doxygen_options.json Normal file
View File

@ -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/*"
}

View File

@ -18,7 +18,7 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_ANALOGIN #if defined (DEVICE_ANALOGIN) || defined(DOXYGEN_ONLY)
#include "hal/analogin_api.h" #include "hal/analogin_api.h"
#include "platform/SingletonPtr.h" #include "platform/SingletonPtr.h"
@ -26,11 +26,10 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** An analog input, used for reading the voltage on a pin /** An analog input, used for reading the voltage on a pin
* *
* @Note Synchronization level: Thread safe * @note Synchronization level: Thread safe
* *
* Example: * Example:
* @code * @code
@ -48,6 +47,7 @@ namespace mbed {
* } * }
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class AnalogIn { class AnalogIn {
@ -56,7 +56,6 @@ public:
/** Create an AnalogIn, connected to the specified pin /** Create an AnalogIn, connected to the specified pin
* *
* @param pin AnalogIn pin to connect to * @param pin AnalogIn pin to connect to
* @param name (optional) A string to identify the object
*/ */
AnalogIn(PinName pin) { AnalogIn(PinName pin) {
lock(); lock();
@ -129,4 +128,3 @@ protected:
#endif #endif
/** @}*/

View File

@ -18,18 +18,17 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_ANALOGOUT #if defined (DEVICE_ANALOGOUT) || defined(DOXYGEN_ONLY)
#include "hal/analogout_api.h" #include "hal/analogout_api.h"
#include "platform/PlatformMutex.h" #include "platform/PlatformMutex.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** An analog output, used for setting the voltage on a pin /** An analog output, used for setting the voltage on a pin
* *
* @Note Synchronization level: Thread safe * @note Synchronization level: Thread safe
* *
* Example: * Example:
* @code * @code
@ -48,6 +47,7 @@ namespace mbed {
* } * }
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class AnalogOut { class AnalogOut {
@ -55,7 +55,7 @@ public:
/** Create an AnalogOut connected to the specified pin /** 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(PinName pin) {
analogout_init(&_dac, pin); analogout_init(&_dac, pin);
@ -146,5 +146,3 @@ protected:
#endif #endif
#endif #endif
/** @}*/

View File

@ -22,11 +22,11 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A digital input bus, used for reading the state of a collection of pins /** 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 { class BusIn {
@ -35,7 +35,22 @@ public:
/** Create an BusIn, connected to the specified pins /** 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 * @note
* It is only required to specify as many pin variables as is required * It is only required to specify as many pin variables as is required
@ -46,7 +61,12 @@ public:
PinName p8 = NC, PinName p9 = NC, PinName p10 = NC, PinName p11 = NC, PinName p8 = NC, PinName p9 = NC, PinName p10 = NC, PinName p11 = NC,
PinName p12 = NC, PinName p13 = NC, PinName p14 = NC, PinName p15 = 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(); virtual ~BusIn();
@ -59,7 +79,7 @@ public:
/** Set the input pin mode /** Set the input pin mode
* *
* @param mode PullUp, PullDown, PullNone * @param pull PullUp, PullDown, PullNone
*/ */
void mode(PinMode pull); void mode(PinMode pull);
@ -85,7 +105,7 @@ public:
protected: protected:
DigitalIn* _pin[16]; 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 set to 1 - pin is connected
* if bit[n] is cleared - pin is not connected (NC) * if bit[n] is cleared - pin is not connected (NC)
*/ */
@ -105,4 +125,3 @@ private:
#endif #endif
/** @}*/

View File

@ -21,11 +21,11 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A digital input output bus, used for setting the state of a collection of pins /** 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 { class BusInOut {
@ -33,7 +33,22 @@ public:
/** Create an BusInOut, connected to the specified pins /** 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 * @note
* It is only required to specify as many pin variables as is required * It is only required to specify as many pin variables as is required
@ -44,6 +59,10 @@ public:
PinName p8 = NC, PinName p9 = NC, PinName p10 = NC, PinName p11 = NC, PinName p8 = NC, PinName p9 = NC, PinName p10 = NC, PinName p11 = NC,
PinName p12 = NC, PinName p13 = NC, PinName p14 = NC, PinName p15 = 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]); BusInOut(PinName pins[16]);
virtual ~BusInOut(); virtual ~BusInOut();
@ -73,7 +92,7 @@ public:
/** Set the input pin mode /** Set the input pin mode
* *
* @param mode PullUp, PullDown, PullNone * @param pull PullUp, PullDown, PullNone
*/ */
void mode(PinMode pull); void mode(PinMode pull);
@ -106,7 +125,7 @@ protected:
virtual void unlock(); virtual void unlock();
DigitalInOut* _pin[16]; 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 set to 1 - pin is connected
* if bit[n] is cleared - pin is not connected (NC) * if bit[n] is cleared - pin is not connected (NC)
*/ */
@ -123,5 +142,3 @@ private:
} // namespace mbed } // namespace mbed
#endif #endif
/** @}*/

View File

@ -21,9 +21,9 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A digital output bus, used for setting the state of a collection of pins /** A digital output bus, used for setting the state of a collection of pins
* @ingroup drivers
*/ */
class BusOut { class BusOut {
@ -31,9 +31,24 @@ public:
/** Create an BusOut, connected to the specified pins /** 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 * @note
* It is only required to specify as many pin variables as is required * It is only required to specify as many pin variables as is required
@ -44,6 +59,10 @@ public:
PinName p8 = NC, PinName p9 = NC, PinName p10 = NC, PinName p11 = NC, PinName p8 = NC, PinName p9 = NC, PinName p10 = NC, PinName p11 = NC,
PinName p12 = NC, PinName p13 = NC, PinName p14 = NC, PinName p15 = 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]); BusOut(PinName pins[16]);
virtual ~BusOut(); virtual ~BusOut();
@ -90,7 +109,7 @@ protected:
virtual void unlock(); virtual void unlock();
DigitalOut* _pin[16]; 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 set to 1 - pin is connected
* if bit[n] is cleared - pin is not connected (NC) * if bit[n] is cleared - pin is not connected (NC)
*/ */
@ -107,5 +126,3 @@ private:
} // namespace mbed } // namespace mbed
#endif #endif
/** @}*/

View File

@ -18,7 +18,7 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_CAN #if defined (DEVICE_CAN) || defined(DOXYGEN_ONLY)
#include "hal/can_api.h" #include "hal/can_api.h"
#include "platform/Callback.h" #include "platform/Callback.h"
@ -26,11 +26,11 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** CANMessage class /** CANMessage class
* *
* @Note Synchronization level: Thread safe * @note Synchronization level: Thread safe
* @ingroup drivers
*/ */
class CANMessage : public CAN_Message { class CANMessage : public CAN_Message {
@ -67,6 +67,7 @@ public:
}; };
/** A can bus client, used for communicating with can devices /** A can bus client, used for communicating with can devices
* @ingroup drivers
*/ */
class CAN { class CAN {
@ -213,7 +214,7 @@ public:
* generated. * generated.
* *
* @param func A pointer to a void function, or 0 to set as none * @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); void attach(Callback<void()> func, IrqType type=RxIrq);
@ -222,12 +223,18 @@ public:
* *
* @param obj pointer to the object to call the member function on * @param obj pointer to the object to call the member function on
* @param method pointer to the member function to be called * @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> 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) { void attach(T* obj, void (T::*method)(), IrqType type=RxIrq) {
// Underlying call thread safe // 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 /** Attach a member function to call whenever a CAN frame received interrupt
@ -235,12 +242,18 @@ public:
* *
* @param obj pointer to the object to call the member function on * @param obj pointer to the object to call the member function on
* @param method pointer to the member function to be called * @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> 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) { void attach(T* obj, void (*method)(T*), IrqType type=RxIrq) {
// Underlying call thread safe // Underlying call thread safe
attach(Callback<void()>(obj, method), type); attach(callback(obj, method), type);
} }
static void _irq_handler(uint32_t id, CanIrqType type); static void _irq_handler(uint32_t id, CanIrqType type);
@ -259,4 +272,3 @@ protected:
#endif // MBED_CAN_H #endif // MBED_CAN_H
/** @}*/

View File

@ -23,11 +23,10 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A digital input, used for reading the state of a pin /** A digital input, used for reading the state of a pin
* *
* @Note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
* *
* Example: * Example:
* @code * @code
@ -47,6 +46,7 @@ namespace mbed {
* } * }
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class DigitalIn { class DigitalIn {
@ -82,7 +82,7 @@ public:
/** Set the input pin mode /** Set the input pin mode
* *
* @param mode PullUp, PullDown, PullNone, OpenDrain * @param pull PullUp, PullDown, PullNone, OpenDrain
*/ */
void mode(PinMode pull) { void mode(PinMode pull) {
core_util_critical_section_enter(); core_util_critical_section_enter();
@ -115,5 +115,3 @@ protected:
} // namespace mbed } // namespace mbed
#endif #endif
/** @}*/

View File

@ -23,11 +23,11 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A digital input/output, used for setting or reading a bi-directional pin /** A digital input/output, used for setting or reading a bi-directional pin
* *
* @Note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
* @ingroup drivers
*/ */
class DigitalInOut { class DigitalInOut {
@ -92,7 +92,7 @@ public:
/** Set the input pin mode /** Set the input pin mode
* *
* @param mode PullUp, PullDown, PullNone, OpenDrain * @param pull PullUp, PullDown, PullNone, OpenDrain
*/ */
void mode(PinMode pull) { void mode(PinMode pull) {
core_util_critical_section_enter(); core_util_critical_section_enter();
@ -140,5 +140,3 @@ protected:
} // namespace mbed } // namespace mbed
#endif #endif
/** @}*/

View File

@ -22,11 +22,10 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A digital output, used for setting the state of a pin /** A digital output, used for setting the state of a pin
* *
* @Note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
* *
* Example: * Example:
* @code * @code
@ -42,6 +41,7 @@ namespace mbed {
* } * }
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class DigitalOut { class DigitalOut {
@ -126,5 +126,3 @@ protected:
} // namespace mbed } // namespace mbed
#endif #endif
/** @}*/

View File

@ -18,15 +18,14 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_ETHERNET #if defined (DEVICE_ETHERNET) || defined(DOXYGEN_ONLY)
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** An ethernet interface, to use with the ethernet pins. /** An ethernet interface, to use with the ethernet pins.
* *
* @Note Synchronization level: Not protected * @note Synchronization level: Not protected
* *
* Example: * Example:
* @code * @code
@ -53,6 +52,7 @@ namespace mbed {
* } * }
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class Ethernet { class Ethernet {
@ -172,5 +172,3 @@ public:
#endif #endif
#endif #endif
/** @}*/

View File

@ -22,7 +22,7 @@
#ifndef MBED_FLASHIAP_H #ifndef MBED_FLASHIAP_H
#define MBED_FLASHIAP_H #define MBED_FLASHIAP_H
#ifdef DEVICE_FLASH #if defined (DEVICE_FLASH) || defined(DOXYGEN_ONLY)
#include "flash_api.h" #include "flash_api.h"
#include "platform/SingletonPtr.h" #include "platform/SingletonPtr.h"
@ -31,11 +31,11 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** Flash IAP driver. It invokes flash HAL functions. /** Flash IAP driver. It invokes flash HAL functions.
* *
* Note Synchronization level: Thread safe * @note Synchronization level: Thread safe
* @ingroup drivers
*/ */
class FlashIAP { class FlashIAP {
public: public:
@ -117,7 +117,7 @@ public:
private: private:
/** Check if address and size are aligned to a sector /* Check if address and size are aligned to a sector
* *
* @param addr Address of block to check for alignment * @param addr Address of block to check for alignment
* @param size Size of block to check for alignment * @param size Size of block to check for alignment
@ -134,5 +134,3 @@ private:
#endif /* DEVICE_FLASH */ #endif /* DEVICE_FLASH */
#endif /* MBED_FLASHIAP_H */ #endif /* MBED_FLASHIAP_H */
/** @}*/

View File

@ -18,7 +18,7 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_I2C #if defined (DEVICE_I2C) || defined(DOXYGEN_ONLY)
#include "hal/i2c_api.h" #include "hal/i2c_api.h"
#include "platform/SingletonPtr.h" #include "platform/SingletonPtr.h"
@ -32,11 +32,10 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** An I2C Master, used for communicating with I2C slave devices /** An I2C Master, used for communicating with I2C slave devices
* *
* @Note Synchronization level: Thread safe * @note Synchronization level: Thread safe
* *
* Example: * Example:
* @code * @code
@ -52,6 +51,7 @@ namespace mbed {
* i2c.read(address, data, 2); * i2c.read(address, data, 2);
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class I2C { class I2C {
@ -194,5 +194,3 @@ protected:
#endif #endif
#endif #endif
/** @}*/

View File

@ -18,17 +18,16 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_I2CSLAVE #if defined (DEVICE_I2CSLAVE) || defined(DOXYGEN_ONLY)
#include "hal/i2c_api.h" #include "hal/i2c_api.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** An I2C Slave, used for communicating with an I2C Master device /** An I2C Slave, used for communicating with an I2C Master device
* *
* @Note Synchronization level: Not protected * @note Synchronization level: Not protected
* *
* Example: * Example:
* @code * @code
@ -61,6 +60,7 @@ namespace mbed {
* } * }
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class I2CSlave { class I2CSlave {
@ -127,7 +127,7 @@ public:
/** Write a single byte to an I2C master. /** Write a single byte to an I2C master.
* *
* @data the byte to write * @param data the byte to write
* *
* @returns * @returns
* '1' if an ACK was received, * '1' if an ACK was received,
@ -156,5 +156,3 @@ protected:
#endif #endif
#endif #endif
/** @}*/

View File

@ -18,7 +18,7 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_INTERRUPTIN #if defined (DEVICE_INTERRUPTIN) || defined(DOXYGEN_ONLY)
#include "hal/gpio_api.h" #include "hal/gpio_api.h"
#include "hal/gpio_irq_api.h" #include "hal/gpio_irq_api.h"
@ -28,11 +28,10 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A digital interrupt input, used to call a function on a rising or falling edge /** A digital interrupt input, used to call a function on a rising or falling edge
* *
* @Note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
* *
* Example: * Example:
* @code * @code
@ -55,6 +54,7 @@ namespace mbed {
* } * }
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class InterruptIn { class InterruptIn {
@ -63,7 +63,6 @@ public:
/** Create an InterruptIn connected to the specified pin /** Create an InterruptIn connected to the specified pin
* *
* @param pin InterruptIn pin to connect to * @param pin InterruptIn pin to connect to
* @param name (optional) A string to identify the object
*/ */
InterruptIn(PinName pin); InterruptIn(PinName pin);
virtual ~InterruptIn(); virtual ~InterruptIn();
@ -131,7 +130,7 @@ public:
/** Set the input pin mode /** Set the input pin mode
* *
* @param mode PullUp, PullDown, PullNone * @param pull PullUp, PullDown, PullNone
*/ */
void mode(PinMode pull); void mode(PinMode pull);
@ -160,5 +159,3 @@ protected:
#endif #endif
#endif #endif
/** @}*/

View File

@ -23,11 +23,10 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** Use this singleton if you need to chain interrupt handlers. /** Use this singleton if you need to chain interrupt handlers.
* *
* @Note Synchronization level: Thread safe * @note Synchronization level: Thread safe
* *
* Example (for LPC1768): * Example (for LPC1768):
* @code * @code
@ -52,6 +51,7 @@ namespace mbed {
* InterruptManager::get()->add_handler(handler, TIMER3_IRQn); * InterruptManager::get()->add_handler(handler, TIMER3_IRQn);
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class InterruptManager { class InterruptManager {
public: public:
@ -170,6 +170,3 @@ private:
} // namespace mbed } // namespace mbed
#endif #endif
/** @}*/

View File

@ -19,17 +19,17 @@
#include "platform/platform.h" #include "platform/platform.h"
#include "drivers/Ticker.h" #include "drivers/Ticker.h"
#if DEVICE_LOWPOWERTIMER #if defined (DEVICE_LOWPOWERTIMER) || defined(DOXYGEN_ONLY)
#include "hal/lp_ticker_api.h" #include "hal/lp_ticker_api.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** Low Power Ticker /** Low Power Ticker
* *
* @Note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
* @ingroup drivers
*/ */
class LowPowerTicker : public Ticker { class LowPowerTicker : public Ticker {
@ -46,5 +46,3 @@ public:
#endif #endif
#endif #endif
/** @}*/

View File

@ -18,18 +18,18 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_LOWPOWERTIMER #if defined (DEVICE_LOWPOWERTIMER) || defined(DOXYGEN_ONLY)
#include "hal/lp_ticker_api.h" #include "hal/lp_ticker_api.h"
#include "drivers/LowPowerTicker.h" #include "drivers/LowPowerTicker.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** Low Power Timout /** Low Power Timout
* *
* @Note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
* @ingroup drivers
*/ */
class LowPowerTimeout : public LowPowerTicker { class LowPowerTimeout : public LowPowerTicker {
@ -44,5 +44,3 @@ private:
#endif #endif
#endif #endif
/** @}*/

View File

@ -19,17 +19,17 @@
#include "platform/platform.h" #include "platform/platform.h"
#include "drivers/Timer.h" #include "drivers/Timer.h"
#if DEVICE_LOWPOWERTIMER #if defined (DEVICE_LOWPOWERTIMER) || defined(DOXYGEN_ONLY)
#include "hal/lp_ticker_api.h" #include "hal/lp_ticker_api.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** Low power timer /** Low power timer
* *
* @Note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
* @ingroup drivers
*/ */
class LowPowerTimer : public Timer { class LowPowerTimer : public Timer {
@ -44,5 +44,3 @@ public:
#endif #endif
#endif #endif
/** @}*/

View File

@ -18,18 +18,17 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_PORTIN #if defined (DEVICE_PORTIN) || defined(DOXYGEN_ONLY)
#include "hal/port_api.h" #include "hal/port_api.h"
#include "platform/mbed_critical.h" #include "platform/mbed_critical.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A multiple pin digital input /** A multiple pin digital input
* *
* @Note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
* *
* Example: * Example:
* @code * @code
@ -51,6 +50,7 @@ namespace mbed {
* } * }
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class PortIn { class PortIn {
public: public:
@ -100,5 +100,3 @@ private:
#endif #endif
#endif #endif
/** @}*/

View File

@ -18,18 +18,18 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_PORTINOUT #if defined (DEVICE_PORTINOUT) || defined(DOXYGEN_ONLY)
#include "hal/port_api.h" #include "hal/port_api.h"
#include "platform/mbed_critical.h" #include "platform/mbed_critical.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A multiple pin digital in/out used to set/read multiple bi-directional pins /** A multiple pin digital in/out used to set/read multiple bi-directional pins
* *
* @Note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
* @ingroup drivers
*/ */
class PortInOut { class PortInOut {
public: public:
@ -115,5 +115,3 @@ private:
#endif #endif
#endif #endif
/** @}*/

View File

@ -18,17 +18,16 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_PORTOUT #if defined (DEVICE_PORTOUT) || defined(DOXYGEN_ONLY)
#include "hal/port_api.h" #include "hal/port_api.h"
#include "platform/mbed_critical.h" #include "platform/mbed_critical.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A multiple pin digital out /** A multiple pin digital out
* *
* @Note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
* *
* Example: * Example:
* @code * @code
@ -50,6 +49,7 @@ namespace mbed {
* } * }
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class PortOut { class PortOut {
public: public:
@ -109,5 +109,3 @@ private:
#endif #endif
#endif #endif
/** @}*/

View File

@ -18,17 +18,16 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_PWMOUT #if defined (DEVICE_PWMOUT) || defined(DOXYGEN_ONLY)
#include "hal/pwmout_api.h" #include "hal/pwmout_api.h"
#include "platform/mbed_critical.h" #include "platform/mbed_critical.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A pulse-width modulation digital output /** A pulse-width modulation digital output
* *
* @Note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
* *
* Example * Example
* @code * @code
@ -47,13 +46,7 @@ namespace mbed {
* } * }
* } * }
* @endcode * @endcode
* * @ingroup drivers
* @note
* On the LPC1768 and LPC2368, the PWMs all share the same
* period - if you change the period for one, you change it for all.
* Although routines that change the period maintain the duty cycle
* for its PWM, all other PWMs will require their duty cycle to be
* refreshed.
*/ */
class PwmOut { class PwmOut {
@ -90,7 +83,7 @@ public:
* 0.0f (representing on 0%) and 1.0f (representing on 100%). * 0.0f (representing on 0%) and 1.0f (representing on 100%).
* *
* @note * @note
* This value may not match exactly the value set by a previous <write>. * This value may not match exactly the value set by a previous write().
*/ */
float read() { float read() {
core_util_critical_section_enter(); core_util_critical_section_enter();
@ -101,6 +94,7 @@ public:
/** Set the PWM period, specified in seconds (float), keeping the duty cycle the same. /** Set the PWM period, specified in seconds (float), keeping the duty cycle the same.
* *
* @param seconds Change the period of a PWM signal in seconds (float) without modifying the duty cycle
* @note * @note
* The resolution is currently in microseconds; periods smaller than this * The resolution is currently in microseconds; periods smaller than this
* will be set to zero. * will be set to zero.
@ -112,6 +106,7 @@ public:
} }
/** Set the PWM period, specified in milli-seconds (int), keeping the duty cycle the same. /** Set the PWM period, specified in milli-seconds (int), keeping the duty cycle the same.
* @param ms Change the period of a PWM signal in milli-seconds without modifying the duty cycle
*/ */
void period_ms(int ms) { void period_ms(int ms) {
core_util_critical_section_enter(); core_util_critical_section_enter();
@ -120,6 +115,7 @@ public:
} }
/** Set the PWM period, specified in micro-seconds (int), keeping the duty cycle the same. /** Set the PWM period, specified in micro-seconds (int), keeping the duty cycle the same.
* @param us Change the period of a PWM signal in micro-seconds without modifying the duty cycle
*/ */
void period_us(int us) { void period_us(int us) {
core_util_critical_section_enter(); core_util_critical_section_enter();
@ -128,6 +124,7 @@ public:
} }
/** Set the PWM pulsewidth, specified in seconds (float), keeping the period the same. /** Set the PWM pulsewidth, specified in seconds (float), keeping the period the same.
* @param seconds Change the pulse width of a PWM signal specified in seconds (float)
*/ */
void pulsewidth(float seconds) { void pulsewidth(float seconds) {
core_util_critical_section_enter(); core_util_critical_section_enter();
@ -136,6 +133,7 @@ public:
} }
/** Set the PWM pulsewidth, specified in milli-seconds (int), keeping the period the same. /** Set the PWM pulsewidth, specified in milli-seconds (int), keeping the period the same.
* @param ms Change the pulse width of a PWM signal specified in milli-seconds
*/ */
void pulsewidth_ms(int ms) { void pulsewidth_ms(int ms) {
core_util_critical_section_enter(); core_util_critical_section_enter();
@ -144,6 +142,7 @@ public:
} }
/** Set the PWM pulsewidth, specified in micro-seconds (int), keeping the period the same. /** Set the PWM pulsewidth, specified in micro-seconds (int), keeping the period the same.
* @param us Change the pulse width of a PWM signal specified in micro-seconds
*/ */
void pulsewidth_us(int us) { void pulsewidth_us(int us) {
core_util_critical_section_enter(); core_util_critical_section_enter();
@ -159,6 +158,8 @@ public:
return *this; return *this;
} }
/** A operator shorthand for write()
*/
PwmOut& operator= (PwmOut& rhs) { PwmOut& operator= (PwmOut& rhs) {
// Underlying call is thread safe // Underlying call is thread safe
write(rhs.read()); write(rhs.read());
@ -181,5 +182,3 @@ protected:
#endif #endif
#endif #endif
/** @}*/

View File

@ -18,14 +18,13 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_SERIAL #if defined (DEVICE_SERIAL) || defined(DOXYGEN_ONLY)
#include "drivers/SerialBase.h" #include "drivers/SerialBase.h"
#include "hal/serial_api.h" #include "hal/serial_api.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A serial port (UART) for communication with other serial devices /** A serial port (UART) for communication with other serial devices
* This is a variation of the Serial class that doesn't use streams, * This is a variation of the Serial class that doesn't use streams,
@ -34,7 +33,7 @@ namespace mbed {
* Can be used for Full Duplex communication, or Simplex by specifying * Can be used for Full Duplex communication, or Simplex by specifying
* one pin as NC (Not Connected) * one pin as NC (Not Connected)
* *
* @Note Synchronization level: Not protected * @note Synchronization level: Not protected
* *
* Example: * Example:
* @code * @code
@ -48,6 +47,7 @@ namespace mbed {
* pc.putc('A'); * pc.putc('A');
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class RawSerial: public SerialBase { class RawSerial: public SerialBase {
@ -89,11 +89,11 @@ public:
protected: protected:
/** Acquire exclusive access to this serial port /* Acquire exclusive access to this serial port
*/ */
virtual void lock(void); virtual void lock(void);
/** Release exclusive access to this serial port /* Release exclusive access to this serial port
*/ */
virtual void unlock(void); virtual void unlock(void);
}; };
@ -103,5 +103,3 @@ protected:
#endif #endif
#endif #endif
/** @}*/

View File

@ -18,7 +18,7 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_SPI #if defined (DEVICE_SPI) || defined(DOXYGEN_ONLY)
#include "platform/PlatformMutex.h" #include "platform/PlatformMutex.h"
#include "hal/spi_api.h" #include "hal/spi_api.h"
@ -34,16 +34,15 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A SPI Master, used for communicating with SPI slave devices /** A SPI Master, used for communicating with SPI slave devices
* *
* The default format is set to 8-bits, mode 0, and a clock frequency of 1MHz * The default format is set to 8-bits, mode 0, and a clock frequency of 1MHz
* *
* Most SPI devices will also require Chip Select and Reset signals. These * Most SPI devices will also require Chip Select and Reset signals. These
* can be controlled using <DigitalOut> pins * can be controlled using DigitalOut pins
* *
* @Note Synchronization level: Thread safe * @note Synchronization level: Thread safe
* *
* Example: * Example:
* @code * @code
@ -71,6 +70,7 @@ namespace mbed {
* *
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class SPI { class SPI {
@ -261,5 +261,3 @@ protected:
#endif #endif
#endif #endif
/** @}*/

View File

@ -18,19 +18,18 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_SPISLAVE #if defined (DEVICE_SPISLAVE) || defined(DOXYGEN_ONLY)
#include "hal/spi_api.h" #include "hal/spi_api.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A SPI slave, used for communicating with a SPI Master device /** A SPI slave, used for communicating with a SPI Master device
* *
* The default format is set to 8-bits, mode 0, and a clock frequency of 1MHz * The default format is set to 8-bits, mode 0, and a clock frequency of 1MHz
* *
* @Note Synchronization level: Not protected * @note Synchronization level: Not protected
* *
* Example: * Example:
* @code * @code
@ -51,6 +50,7 @@ namespace mbed {
* } * }
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class SPISlave { class SPISlave {
@ -124,5 +124,3 @@ protected:
#endif #endif
#endif #endif
/** @}*/

View File

@ -18,7 +18,7 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_SERIAL #if defined (DEVICE_SERIAL) || defined(DOXYGEN_ONLY)
#include "Stream.h" #include "Stream.h"
#include "SerialBase.h" #include "SerialBase.h"
@ -27,14 +27,13 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A serial port (UART) for communication with other serial devices /** A serial port (UART) for communication with other serial devices
* *
* Can be used for Full Duplex communication, or Simplex by specifying * Can be used for Full Duplex communication, or Simplex by specifying
* one pin as NC (Not Connected) * one pin as NC (Not Connected)
* *
* @Note Synchronization level: Thread safe * @note Synchronization level: Thread safe
* *
* Example: * Example:
* @code * @code
@ -48,6 +47,7 @@ namespace mbed {
* pc.printf("Hello World\n"); * pc.printf("Hello World\n");
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class Serial : public SerialBase, public Stream { class Serial : public SerialBase, public Stream {
@ -95,5 +95,3 @@ protected:
#endif #endif
#endif #endif
/** @}*/

View File

@ -18,7 +18,7 @@
#include "platform/platform.h" #include "platform/platform.h"
#if DEVICE_SERIAL #if defined (DEVICE_SERIAL) || defined(DOXYGEN_ONLY)
#include "Stream.h" #include "Stream.h"
#include "Callback.h" #include "Callback.h"
@ -32,12 +32,12 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A base class for serial port implementations /** A base class for serial port implementations
* Can't be instantiated directly (use Serial or RawSerial) * Can't be instantiated directly (use Serial or RawSerial)
* *
* @Note Synchronization level: Set by subclass * @note Synchronization level: Set by subclass
* @ingroup drivers
*/ */
class SerialBase { class SerialBase {
@ -74,7 +74,7 @@ public:
* *
* @param bits The number of bits in a word (5-8; default = 8) * @param bits The number of bits in a word (5-8; default = 8)
* @param parity The parity used (SerialBase::None, SerialBase::Odd, SerialBase::Even, SerialBase::Forced1, SerialBase::Forced0; default = SerialBase::None) * @param parity The parity used (SerialBase::None, SerialBase::Odd, SerialBase::Even, SerialBase::Forced1, SerialBase::Forced0; default = SerialBase::None)
* @param stop The number of stop bits (1 or 2; default = 1) * @param stop_bits The number of stop bits (1 or 2; default = 1)
*/ */
void format(int bits=8, Parity parity=SerialBase::None, int stop_bits=1); void format(int bits=8, Parity parity=SerialBase::None, int stop_bits=1);
@ -258,5 +258,3 @@ protected:
#endif #endif
#endif #endif
/** @}*/

View File

@ -22,13 +22,12 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A Ticker is used to call a function at a recurring interval /** A Ticker is used to call a function at a recurring interval
* *
* You can use as many seperate Ticker objects as you require. * You can use as many seperate Ticker objects as you require.
* *
* @Note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
* *
* Example: * Example:
* @code * @code
@ -58,6 +57,7 @@ namespace mbed {
* } * }
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class Ticker : public TimerEvent { class Ticker : public TimerEvent {
@ -97,7 +97,7 @@ public:
/** Attach a function to be called by the Ticker, specifiying the interval in micro-seconds /** Attach a function to be called by the Ticker, specifiying the interval in micro-seconds
* *
* @param fptr pointer to the function to be called * @param func pointer to the function to be called
* @param t the time between calls in micro-seconds * @param t the time between calls in micro-seconds
*/ */
void attach_us(Callback<void()> func, timestamp_t t) { void attach_us(Callback<void()> func, timestamp_t t) {
@ -107,8 +107,8 @@ public:
/** Attach a member function to be called by the Ticker, specifiying the interval in micro-seconds /** Attach a member function to be called by the Ticker, specifiying the interval in micro-seconds
* *
* @param tptr pointer to the object to call the member function on * @param obj pointer to the object to call the member function on
* @param mptr pointer to the member function to be called * @param method pointer to the member function to be called
* @param t the time between calls in micro-seconds * @param t the time between calls in micro-seconds
* @deprecated * @deprecated
* The attach_us function does not support cv-qualifiers. Replaced by * The attach_us function does not support cv-qualifiers. Replaced by
@ -135,12 +135,10 @@ protected:
virtual void handler(); virtual void handler();
protected: protected:
timestamp_t _delay; /**< Time delay (in microseconds) for re-setting the multi-shot callback. */ timestamp_t _delay; /* Time delay (in microseconds) for re-setting the multi-shot callback. */
Callback<void()> _function; /**< Callback. */ Callback<void()> _function; /* Callback. */
}; };
} // namespace mbed } // namespace mbed
#endif #endif
/** @}*/

View File

@ -20,13 +20,12 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A Timeout is used to call a function at a point in the future /** A Timeout is used to call a function at a point in the future
* *
* You can use as many seperate Timeout objects as you require. * You can use as many seperate Timeout objects as you require.
* *
* @Note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
* *
* Example: * Example:
* @code * @code
@ -51,6 +50,7 @@ namespace mbed {
* } * }
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class Timeout : public Ticker { class Timeout : public Ticker {
@ -61,5 +61,3 @@ protected:
} // namespace mbed } // namespace mbed
#endif #endif
/** @}*/

View File

@ -21,11 +21,10 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** A general purpose timer /** A general purpose timer
* *
* @Note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
* *
* Example: * Example:
* @code * @code
@ -45,6 +44,7 @@ namespace mbed {
* printf("Toggle the led takes %d us", end - begin); * printf("Toggle the led takes %d us", end - begin);
* } * }
* @endcode * @endcode
* @ingroup drivers
*/ */
class Timer { class Timer {
@ -93,5 +93,3 @@ protected:
} // namespace mbed } // namespace mbed
#endif #endif
/** @}*/

View File

@ -21,11 +21,11 @@
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup drivers */
/** @{*/
/** Base abstraction for timer interrupts /** Base abstraction for timer interrupts
* *
* @Note Synchronization level: Interrupt safe * @note Synchronization level: Interrupt safe
* @ingroup drivers
*/ */
class TimerEvent { class TimerEvent {
public: public:
@ -58,5 +58,3 @@ protected:
} // namespace mbed } // namespace mbed
#endif #endif
/** @}*/

View File

@ -21,11 +21,11 @@
namespace events { namespace events {
/** \addtogroup events */ /** \addtogroup events */
/** @{*/
/** Event /** Event
* *
* Representation of an event for fine-grain dispatch control * Representation of an event for fine-grain dispatch control
* @ingroup events
*/ */
template <typename F> template <typename F>
class Event; class Event;
@ -33,6 +33,7 @@ class Event;
/** Event /** Event
* *
* Representation of an event for fine-grain dispatch control * Representation of an event for fine-grain dispatch control
* @ingroup events
*/ */
template <> template <>
class Event<void()> { class Event<void()> {
@ -429,6 +430,7 @@ public:
/** Event /** Event
* *
* Representation of an event for fine-grain dispatch control * Representation of an event for fine-grain dispatch control
* @ingroup events
*/ */
template <typename A0> template <typename A0>
class Event<void(A0)> { class Event<void(A0)> {
@ -825,6 +827,7 @@ public:
/** Event /** Event
* *
* Representation of an event for fine-grain dispatch control * Representation of an event for fine-grain dispatch control
* @ingroup events
*/ */
template <typename A0, typename A1> template <typename A0, typename A1>
class Event<void(A0, A1)> { class Event<void(A0, A1)> {
@ -1221,6 +1224,7 @@ public:
/** Event /** Event
* *
* Representation of an event for fine-grain dispatch control * Representation of an event for fine-grain dispatch control
* @ingroup events
*/ */
template <typename A0, typename A1, typename A2> template <typename A0, typename A1, typename A2>
class Event<void(A0, A1, A2)> { class Event<void(A0, A1, A2)> {
@ -1617,6 +1621,7 @@ public:
/** Event /** Event
* *
* Representation of an event for fine-grain dispatch control * Representation of an event for fine-grain dispatch control
* @ingroup events
*/ */
template <typename A0, typename A1, typename A2, typename A3> template <typename A0, typename A1, typename A2, typename A3>
class Event<void(A0, A1, A2, A3)> { class Event<void(A0, A1, A2, A3)> {
@ -2013,6 +2018,7 @@ public:
/** Event /** Event
* *
* Representation of an event for fine-grain dispatch control * Representation of an event for fine-grain dispatch control
* @ingroup events
*/ */
template <typename A0, typename A1, typename A2, typename A3, typename A4> template <typename A0, typename A1, typename A2, typename A3, typename A4>
class Event<void(A0, A1, A2, A3, A4)> { class Event<void(A0, A1, A2, A3, A4)> {
@ -2407,6 +2413,8 @@ public:
}; };
/** \addtogroup events */
/** @{ */
// Convenience functions declared here to avoid cyclic // Convenience functions declared here to avoid cyclic
// dependency between Event and EventQueue // dependency between Event and EventQueue

View File

@ -24,7 +24,6 @@
namespace events { namespace events {
/** \addtogroup events */ /** \addtogroup events */
/** @{*/
/** EVENTS_EVENT_SIZE /** EVENTS_EVENT_SIZE
* Minimum size of an event * Minimum size of an event
@ -46,6 +45,7 @@ class Event;
/** EventQueue /** EventQueue
* *
* Flexible event queue for dispatching events * Flexible event queue for dispatching events
* @ingroup events
*/ */
class EventQueue { class EventQueue {
public: public:
@ -2698,4 +2698,3 @@ protected:
#endif #endif
/** @}*/

View File

@ -72,11 +72,13 @@
/* IRQ/Exception compatible thunk entry function */ /* IRQ/Exception compatible thunk entry function */
typedef void (*CThunkEntry)(void); typedef void (*CThunkEntry)(void);
/** @}*/
/** /**
* Class for created a pointer with data bound to it * Class for created a pointer with data bound to it
* *
* @Note Synchronization level: Not protected * @Note Synchronization level: Not protected
* @ingroup platform
*/ */
template<class T> template<class T>
class CThunk class CThunk
@ -242,4 +244,3 @@ class CThunk
#endif/*__CTHUNK_H__*/ #endif/*__CTHUNK_H__*/
/** @}*/

View File

@ -22,7 +22,6 @@
namespace mbed { namespace mbed {
/** \addtogroup platform */ /** \addtogroup platform */
/** @{*/
/** Group one or more functions in an instance of a CallChain, then call them in /** Group one or more functions in an instance of a CallChain, then call them in
* sequence using CallChain::call(). Used mostly by the interrupt chaining code, * sequence using CallChain::call(). Used mostly by the interrupt chaining code,
@ -60,6 +59,7 @@ namespace mbed {
* chain.call(); * chain.call();
* } * }
* @endcode * @endcode
* @ingroup platform
*/ */
typedef Callback<void()> *pFunctionPointer_t; typedef Callback<void()> *pFunctionPointer_t;
@ -189,4 +189,3 @@ private:
#endif #endif
/** @}*/

View File

@ -24,12 +24,12 @@
namespace mbed { namespace mbed {
/** \addtogroup platform */ /** \addtogroup platform */
/** @{*/
/** Callback class based on template specialization /** Callback class based on template specialization
* *
* @Note Synchronization level: Not protected * @note Synchronization level: Not protected
* @ingroup platform
*/ */
template <typename F> template <typename F>
class Callback; class Callback;
@ -60,7 +60,8 @@ namespace detail {
/** Callback class based on template specialization /** Callback class based on template specialization
* *
* @Note Synchronization level: Not protected * @note Synchronization level: Not protected
* @ingroup platform
*/ */
template <typename R> template <typename R>
class Callback<R()> { class Callback<R()> {
@ -655,7 +656,8 @@ private:
/** Callback class based on template specialization /** Callback class based on template specialization
* *
* @Note Synchronization level: Not protected * @note Synchronization level: Not protected
* @ingroup platform
*/ */
template <typename R, typename A0> template <typename R, typename A0>
class Callback<R(A0)> { class Callback<R(A0)> {
@ -1250,7 +1252,8 @@ private:
/** Callback class based on template specialization /** Callback class based on template specialization
* *
* @Note Synchronization level: Not protected * @note Synchronization level: Not protected
* @ingroup platform
*/ */
template <typename R, typename A0, typename A1> template <typename R, typename A0, typename A1>
class Callback<R(A0, A1)> { class Callback<R(A0, A1)> {
@ -1845,7 +1848,8 @@ private:
/** Callback class based on template specialization /** Callback class based on template specialization
* *
* @Note Synchronization level: Not protected * @note Synchronization level: Not protected
* @ingroup platform
*/ */
template <typename R, typename A0, typename A1, typename A2> template <typename R, typename A0, typename A1, typename A2>
class Callback<R(A0, A1, A2)> { class Callback<R(A0, A1, A2)> {
@ -2440,7 +2444,8 @@ private:
/** Callback class based on template specialization /** Callback class based on template specialization
* *
* @Note Synchronization level: Not protected * @note Synchronization level: Not protected
* @ingroup platform
*/ */
template <typename R, typename A0, typename A1, typename A2, typename A3> template <typename R, typename A0, typename A1, typename A2, typename A3>
class Callback<R(A0, A1, A2, A3)> { class Callback<R(A0, A1, A2, A3)> {
@ -3035,7 +3040,8 @@ private:
/** Callback class based on template specialization /** Callback class based on template specialization
* *
* @Note Synchronization level: Not protected * @note Synchronization level: Not protected
* @ingroup platform
*/ */
template <typename R, typename A0, typename A1, typename A2, typename A3, typename A4> template <typename R, typename A0, typename A1, typename A2, typename A3, typename A4>
class Callback<R(A0, A1, A2, A3, A4)> { class Callback<R(A0, A1, A2, A3, A4)> {
@ -4649,6 +4655,3 @@ Callback<R(A0, A1, A2, A3, A4)> callback(const volatile U *obj, R (*func)(const
} // namespace mbed } // namespace mbed
#endif #endif
/** @}*/

View File

@ -20,11 +20,11 @@
namespace mbed { namespace mbed {
/** \addtogroup platform */ /** \addtogroup platform */
/** @{*/
/** Templated Circular buffer class /** Templated Circular buffer class
* *
* @Note Synchronization level: Interrupt safe * @Note Synchronization level: Interrupt safe
* @ingroup platform
*/ */
template<typename T, uint32_t BufferSize, typename CounterType = uint32_t> template<typename T, uint32_t BufferSize, typename CounterType = uint32_t>
class CircularBuffer { class CircularBuffer {
@ -116,4 +116,3 @@ private:
#endif #endif
/** @}*/

View File

@ -21,8 +21,7 @@
#include "platform/FileHandle.h" #include "platform/FileHandle.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup platform */
/** @{*/
/** Represents a directory stream. Objects of this type are returned /** Represents a directory stream. Objects of this type are returned
@ -40,6 +39,7 @@ namespace mbed {
* *
* @note to create a directory, @see Dir * @note to create a directory, @see Dir
* @Note Synchronization level: Set by subclass * @Note Synchronization level: Set by subclass
* @ingroup platform
*/ */
class DirHandle { class DirHandle {
public: public:
@ -146,5 +146,3 @@ public:
} // namespace mbed } // namespace mbed
#endif /* MBED_DIRHANDLE_H */ #endif /* MBED_DIRHANDLE_H */
/** @}*/

View File

@ -26,14 +26,19 @@ typedef int FILEHANDLE;
#include "platform/PlatformMutex.h" #include "platform/PlatformMutex.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup platform */
/** @{*/ /** @{*/
typedef enum { typedef enum {
FilePathType, FilePathType,
FileSystemPathType FileSystemPathType
} PathType; } PathType;
/** @}*/
/**
* @class FileBase
* @ingroup platform
*/
class FileBase { class FileBase {
public: public:
FileBase(const char *name, PathType t); FileBase(const char *name, PathType t);
@ -62,4 +67,3 @@ private:
#endif #endif
/** @}*/

View File

@ -22,8 +22,7 @@ typedef int FILEHANDLE;
#include "platform/platform.h" #include "platform/platform.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup platform */
/** @{*/
/** Class FileHandle /** Class FileHandle
@ -34,6 +33,7 @@ namespace mbed {
* *
* @note to create a file, @see File * @note to create a file, @see File
* @note Synchronization level: Set by subclass * @note Synchronization level: Set by subclass
* @ingroup platform
*/ */
class FileHandle { class FileHandle {
public: public:
@ -155,7 +155,6 @@ public:
}; };
/** @}*/
} // namespace mbed } // namespace mbed
#endif #endif

View File

@ -21,8 +21,7 @@
#include "platform/FileHandle.h" #include "platform/FileHandle.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup platform */
/** @{*/
/* Class FileLike /* Class FileLike
@ -30,6 +29,7 @@ namespace mbed {
* fopen("/name", mode). * fopen("/name", mode).
* *
* @Note Synchronization level: Set by subclass * @Note Synchronization level: Set by subclass
* @ingroup platform
*/ */
class FileLike : public FileHandle, public FileBase { class FileLike : public FileHandle, public FileBase {
public: public:
@ -42,7 +42,6 @@ public:
}; };
/** @}*/
} // namespace mbed } // namespace mbed
#endif #endif

View File

@ -22,9 +22,12 @@
#include "platform/FileLike.h" #include "platform/FileLike.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup platform */
/** @{*/
/**
* @class FileSystem
* @ingroup platform
*/
class FileSystem; class FileSystem;
class FilePath { class FilePath {
@ -48,5 +51,3 @@ private:
} // namespace mbed } // namespace mbed
#endif #endif
/** @}*/

View File

@ -23,8 +23,7 @@
#include "platform/DirHandle.h" #include "platform/DirHandle.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup platform */
/** @{*/
/** A filesystem-like object is one that can be used to open files /** A filesystem-like object is one that can be used to open files
* though it by fopen("/name/filename", mode) * though it by fopen("/name/filename", mode)
@ -33,6 +32,7 @@ namespace mbed {
* of the rest of the functions just return error values). * of the rest of the functions just return error values).
* *
* @Note Synchronization level: Set by subclass * @Note Synchronization level: Set by subclass
* @ingroup platform
*/ */
class FileSystemLike : public FileBase { class FileSystemLike : public FileBase {
@ -120,5 +120,3 @@ public:
} // namespace mbed } // namespace mbed
#endif #endif
/** @}*/

View File

@ -23,11 +23,13 @@
namespace mbed { namespace mbed {
/** \addtogroup platform */ /** \addtogroup platform */
/** @{*/
// Declarations for backwards compatibility // Declarations for backwards compatibility
// To be foward compatible, code should adopt the Callback class // To be foward compatible, code should adopt the Callback class
/**
* @ingroup platform
*/
template <typename R, typename A1> template <typename R, typename A1>
class FunctionPointerArg1 : public Callback<R(A1)> { class FunctionPointerArg1 : public Callback<R(A1)> {
public: public:
@ -59,6 +61,9 @@ public:
} }
}; };
/**
* @ingroup platform
*/
template <typename R> template <typename R>
class FunctionPointerArg1<R, void> : public Callback<R()> { class FunctionPointerArg1<R, void> : public Callback<R()> {
public: public:
@ -96,5 +101,3 @@ typedef FunctionPointerArg1<void, void> FunctionPointer;
} // namespace mbed } // namespace mbed
#endif #endif
/** @}*/

View File

@ -24,11 +24,16 @@
#include "platform/PlatformMutex.h" #include "platform/PlatformMutex.h"
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup platform */
/** @{*/ /** @{*/
FILEHANDLE local_file_open(const char* name, int flags); FILEHANDLE local_file_open(const char* name, int flags);
/** @}*/
/**
* @class LocalFileHandle
* @ingroup platform
*/
class LocalFileHandle : public FileHandle { class LocalFileHandle : public FileHandle {
public: public:
@ -91,6 +96,7 @@ protected:
* *
* The drive will only re-appear when the microcontroller program exists. Note that if the program does * The drive will only re-appear when the microcontroller program exists. Note that if the program does
* not exit, you will need to hold down reset on the mbed Microcontroller to be able to see the drive again! * not exit, you will need to hold down reset on the mbed Microcontroller to be able to see the drive again!
* @ingroup platform
*/ */
class LocalFileSystem : public FileSystemLike { class LocalFileSystem : public FileSystemLike {
// No modifiable state // No modifiable state
@ -111,4 +117,3 @@ public:
#endif #endif
/** @}*/

View File

@ -1,6 +1,5 @@
/** \addtogroup platform */ /** \addtogroup platform */
/** @{*/
/* mbed Microcontroller Library /* mbed Microcontroller Library
* Copyright (c) 2006-2013 ARM Limited * Copyright (c) 2006-2013 ARM Limited
* *
@ -24,6 +23,7 @@
typedef rtos::Mutex PlatformMutex; typedef rtos::Mutex PlatformMutex;
#else #else
/** A stub mutex for when an RTOS is not present /** A stub mutex for when an RTOS is not present
* @ingroup platform
*/ */
class PlatformMutex { class PlatformMutex {
public: public:
@ -48,4 +48,3 @@ public:
#endif #endif
/** @}*/

View File

@ -55,6 +55,7 @@ inline static void singleton_unlock(void)
osMutexRelease (singleton_mutex_id); osMutexRelease (singleton_mutex_id);
#endif #endif
} }
/** @}*/
/** Utility class for creating an using a singleton /** Utility class for creating an using a singleton
* *
@ -67,6 +68,7 @@ inline static void singleton_unlock(void)
* @Note: This class is lazily initialized on first use. * @Note: This class is lazily initialized on first use.
* This class is a POD type so if it is not used it will * This class is a POD type so if it is not used it will
* be garbage collected. * be garbage collected.
* @ingroup platform
*/ */
template <class T> template <class T>
struct SingletonPtr { struct SingletonPtr {
@ -107,4 +109,3 @@ struct SingletonPtr {
#endif #endif
/** @}*/

View File

@ -22,16 +22,18 @@
#include <cstdarg> #include <cstdarg>
namespace mbed { namespace mbed {
/** \addtogroup drivers */ /** \addtogroup platform */
/** @{*/ /** @{*/
extern void mbed_set_unbuffered_stream(FILE *_file); extern void mbed_set_unbuffered_stream(FILE *_file);
extern int mbed_getc(FILE *_file); extern int mbed_getc(FILE *_file);
extern char* mbed_gets(char *s, int size, FILE *_file); extern char* mbed_gets(char *s, int size, FILE *_file);
/** @}*/
/** File stream /** File stream
* *
* @Note Synchronization level: Set by subclass * @Note Synchronization level: Set by subclass
* @ingroup platform
*/ */
class Stream : public FileLike { class Stream : public FileLike {
@ -88,4 +90,3 @@ private:
#endif #endif
/** @}*/

View File

@ -21,9 +21,9 @@
namespace mbed { namespace mbed {
/** \addtogroup platform */ /** \addtogroup platform */
/** @{*/
/** Transaction structure /** Transaction structure
* @ingroup platform
*/ */
typedef struct { typedef struct {
void *tx_buffer; /**< Tx buffer */ void *tx_buffer; /**< Tx buffer */
@ -38,6 +38,7 @@ typedef struct {
/** Transaction class defines a transaction. /** Transaction class defines a transaction.
* *
* @Note Synchronization level: Not protected * @Note Synchronization level: Not protected
* @ingroup platform
*/ */
template<typename Class> template<typename Class>
class Transaction { class Transaction {
@ -75,5 +76,3 @@ private:
} }
#endif #endif
/** @}*/