Skip to content

Doxygen template #4450

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 4 commits into from
Jun 9, 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
5 changes: 5 additions & 0 deletions drivers/AnalogOut.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,25 @@ class AnalogOut {
}

/** An operator shorthand for write()
* \sa AnalogOut::write()
*/
AnalogOut& operator= (float percent) {
// Underlying write call is thread safe
write(percent);
return *this;
}

/** An operator shorthand for write()
* \sa AnalogOut::write()
*/
AnalogOut& operator= (AnalogOut& rhs) {
// Underlying write call is thread safe
write(rhs.read());
return *this;
}

/** An operator shorthand for read()
* \sa AnalogOut::read()
*/
operator float() {
// Underlying read call is thread safe
Expand Down
2 changes: 2 additions & 0 deletions drivers/BusIn.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,12 @@ class BusIn {
}

/** A shorthand for read()
* \sa DigitalIn::read()
*/
operator int();

/** Access to particular bit in random-iterator fashion
* @param index Position of bit
*/
DigitalIn & operator[] (int index);

Expand Down
7 changes: 5 additions & 2 deletions drivers/BusInOut.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,18 @@ class BusInOut {
}

/** A shorthand for write()
*/
* \sa BusInOut::write()
*/
BusInOut& operator= (int v);
BusInOut& operator= (BusInOut& rhs);

/** Access to particular bit in random-iterator fashion
*/
* @param index Bit Position
*/
DigitalInOut& operator[] (int index);

/** A shorthand for read()
* \sa BusInOut::read()
*/
operator int();

Expand Down
3 changes: 3 additions & 0 deletions drivers/BusOut.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,18 @@ class BusOut {
}

/** A shorthand for write()
* \sa BusOut::write()
*/
BusOut& operator= (int v);
BusOut& operator= (BusOut& rhs);

/** Access to particular bit in random-iterator fashion
* @param index Bit Position
*/
DigitalOut& operator[] (int index);

/** A shorthand for read()
* \sa BusOut::read()
*/
operator int();

Expand Down
17 changes: 15 additions & 2 deletions drivers/CAN.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ class CANMessage : public CAN_Message {
}

/** Creates CAN message with specific content.
*
* @param _id Message ID
* @param _data Mesaage Data
* @param _len Message Data length
* @param _type Type of Data: Use enum CANType for valid parameter values
* @param _format Data Format: Use enum CANFormat for valid parameter values
*/
CANMessage(int _id, const char *_data, char _len = 8, CANType _type = CANData, CANFormat _format = CANStandard) {
len = _len & 0xF;
Expand All @@ -56,6 +62,9 @@ class CANMessage : public CAN_Message {
}

/** Creates CAN remote message.
*
* @param _id Message ID
* @param _format Data Format: Use enum CANType for valid parameter values
*/
CANMessage(int _id, CANFormat _format = CANStandard) {
len = 0;
Expand Down Expand Up @@ -197,11 +206,15 @@ class CAN {
*/
int filter(unsigned int id, unsigned int mask, CANFormat format = CANAny, int handle = 0);

/** Returns number of read errors to detect read overflow errors.
/** Detects read errors - Used to detect read overflow errors.
*
* @returns number of read errors
*/
unsigned char rderror();

/** Returns number of write errors to detect write overflow errors.
/** Detects write errors - Used to detect write overflow errors.
*
* @returns number of write errors
*/
unsigned char tderror();

Expand Down
1 change: 1 addition & 0 deletions drivers/DigitalIn.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class DigitalIn {
}

/** An operator shorthand for read()
* \sa DigitalIn::read()
*/
operator int() {
// Underlying read is thread safe
Expand Down
5 changes: 5 additions & 0 deletions drivers/DigitalInOut.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,17 @@ class DigitalInOut {
}

/** A shorthand for write()
* \sa DigitalInOut::write()
*/
DigitalInOut& operator= (int value) {
// Underlying write is thread safe
write(value);
return *this;
}

/** A shorthand for write()
* \sa DigitalInOut::write()
*/
DigitalInOut& operator= (DigitalInOut& rhs) {
core_util_critical_section_enter();
write(rhs.read());
Expand All @@ -127,6 +131,7 @@ class DigitalInOut {
}

/** A shorthand for read()
* \sa DigitalInOut::read()
*/
operator int() {
// Underlying call is thread safe
Expand Down
5 changes: 5 additions & 0 deletions drivers/DigitalOut.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,17 @@ class DigitalOut {
}

/** A shorthand for write()
* \sa DigitalOut::write()
*/
DigitalOut& operator= (int value) {
// Underlying write is thread safe
write(value);
return *this;
}

/** A shorthand for write()
* \sa DigitalOut::write()
*/
DigitalOut& operator= (DigitalOut& rhs) {
core_util_critical_section_enter();
write(rhs.read());
Expand All @@ -113,6 +117,7 @@ class DigitalOut {
}

/** A shorthand for read()
* \sa DigitalOut::read()
*/
operator int() {
// Underlying call is thread safe
Expand Down
11 changes: 6 additions & 5 deletions drivers/Ethernet.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,16 @@ class Ethernet {

/** Read from an recevied ethernet packet.
*
* After receive returnd a number bigger than 0it is
* After receive returned a number bigger than 0 it is
* possible to read bytes from this packet.
* Read will write up to size bytes into data.
*
* It is possible to use read multible times.
* @param data Pointer to data packet
* @param size Size of data to be read.
* @returns The number of byte read.
*
* @note It is possible to use read multiple times.
* Each time read will start reading after the last read byte before.
*
* @returns
* The number of byte read.
*/
int read(char *data, int size);

Expand Down
4 changes: 3 additions & 1 deletion drivers/InterruptManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ namespace mbed {
*/
class InterruptManager {
public:
/** Return the only instance of this class
/** Get the instance of InterruptManager Class
*
* @return the only instance of this class
*/
static InterruptManager* get();

Expand Down
5 changes: 5 additions & 0 deletions drivers/PortInOut.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,23 @@ class PortInOut {
}

/** A shorthand for write()
* \sa PortInOut::write()
*/
PortInOut& operator= (int value) {
write(value);
return *this;
}

/** A shorthand for write()
* \sa PortInOut::write()
*/
PortInOut& operator= (PortInOut& rhs) {
write(rhs.read());
return *this;
}

/** A shorthand for read()
* \sa PortInOut::read()
*/
operator int() {
return read();
Expand Down
5 changes: 5 additions & 0 deletions drivers/PortOut.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,23 @@ class PortOut {
}

/** A shorthand for write()
* \sa PortOut::write()
*/
PortOut& operator= (int value) {
write(value);
return *this;
}

/** A shorthand for read()
* \sa PortOut::read()
*/
PortOut& operator= (PortOut& rhs) {
write(rhs.read());
return *this;
}

/** A shorthand for read()
* \sa PortOut::read()
*/
operator int() {
return read();
Expand Down
3 changes: 3 additions & 0 deletions drivers/PwmOut.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ class PwmOut {
}

/** A operator shorthand for write()
* \sa PwmOut::write()
*/
PwmOut& operator= (float value) {
// Underlying call is thread safe
Expand All @@ -159,6 +160,7 @@ class PwmOut {
}

/** A operator shorthand for write()
* \sa PwmOut::write()
*/
PwmOut& operator= (PwmOut& rhs) {
// Underlying call is thread safe
Expand All @@ -167,6 +169,7 @@ class PwmOut {
}

/** An operator shorthand for read()
* \sa PwmOut::read()
*/
operator float() {
// Underlying call is thread safe
Expand Down
8 changes: 7 additions & 1 deletion drivers/Timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,20 @@ class Timer {
void reset();

/** Get the time passed in seconds
*
* @returns Time passed in seconds
*/
float read();

/** Get the time passed in mili-seconds
/** Get the time passed in milli-seconds
*
* @returns Time passed in milli seconds
*/
int read_ms();

/** Get the time passed in micro-seconds
*
* @returns Time passed in micro seconds
*/
int read_us();

Expand Down
2 changes: 2 additions & 0 deletions drivers/TimerEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class TimerEvent {
TimerEvent(const ticker_data_t *data);

/** The handler registered with the underlying timer interrupt
*
* @param id Timer Event ID
*/
static void irq(uint32_t id);

Expand Down
3 changes: 1 addition & 2 deletions features/filesystem/Dir.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,12 @@ class Dir : public DirHandle {

/** Close a directory
*
* return 0 on success, negative error code on failure
* @return 0 on success, negative error code on failure
*/
virtual int close();

/** Read the next directory entry
*
* @param path The buffer to read the null terminated path name in to
* @param ent The directory entry to fill out
* @return 1 on reading a filename, 0 at end of directory, negative error on failure
*/
Expand Down
8 changes: 5 additions & 3 deletions features/filesystem/FileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ class File;
* Implementations must provide at minimum file operations and mount
* operations for block devices.
*
* @Note Synchronization level: Set by subclass
* @note Synchronization level: Set by subclass
*/
class FileSystem : public FileSystemLike {
public:
/** FileSystem lifetime
*
* @param name Name to add filesystem to tree as
*/
FileSystem(const char *name = NULL);
virtual ~FileSystem() {}
Expand Down Expand Up @@ -114,7 +116,7 @@ class FileSystem : public FileSystemLike {
/** Close a file
*
* @param file File handle
* return 0 on success, negative error code on failure
* @return 0 on success, negative error code on failure
*/
virtual int file_close(fs_file_t file) = 0;

Expand Down Expand Up @@ -195,7 +197,7 @@ class FileSystem : public FileSystemLike {
/** Close a directory
*
* @param dir Dir handle
* return 0 on success, negative error code on failure
* @return 0 on success, negative error code on failure
*/
virtual int dir_close(fs_dir_t dir);

Expand Down
9 changes: 4 additions & 5 deletions features/filesystem/bd/ChainingBlockDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,22 @@
* // contains 96 blocks of size 512 bytes
* BlockDevice *bds[] = {&mem1, &mem2};
* ChainingBlockDevice chainmem(bds);
* @endcode
*/
class ChainingBlockDevice : public BlockDevice
{
public:
/** Lifetime of the memory block device
*
* @param bds Array of block devices to chain with sequential block addresses
* @param count Number of block devices to chain
* @param bds Array of block devices to chain with sequential block addresses
* @param bd_count Number of block devices to chain
* @note All block devices must have the same block size
*/
ChainingBlockDevice(BlockDevice **bds, size_t bd_count);

/** Lifetime of the memory block device
*
* @param bds Array of block devices to chain with sequential block addresses
* @param bds Array of block devices to chain with sequential block addresses
* @note All block devices must have the same block size
*/
template <size_t Size>
Expand All @@ -69,8 +70,6 @@ class ChainingBlockDevice : public BlockDevice

/** Lifetime of the memory block device
*
* @param bds Array of block devices to chain with sequential block addresses
* @note All block devices must have the same block size
*/
virtual ~ChainingBlockDevice() {}

Expand Down
Loading